diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java index 5d8aa004..e72930d4 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java @@ -5,6 +5,8 @@ import android.content.SharedPreferences; import android.net.Uri; import android.os.Build; import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; import android.widget.Toast; import androidx.appcompat.app.AppCompatDelegate; @@ -84,6 +86,10 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF return; //Avoid executing the code below } + toolbar = findViewById(R.id.toolbar); + toolbar.setTitle(""); + setSupportActionBar(toolbar); + //Initialize drawer createDrawer(); diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java index be9ec059..9d71710b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java @@ -721,11 +721,10 @@ public abstract class BaseActivity extends AppCompatActivity { @Override public void onRequestPermissionsResult(int permsRequestCode, @NonNull String[] permissions , @NonNull int[] grantResults) { - switch (permsRequestCode) { - case DOWNLOAD_REQUEST_CODE: - if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) - prepareDownload(tempThmmyFile); - break; + super.onRequestPermissionsResult(permsRequestCode, permissions, grantResults); + if (permsRequestCode == DOWNLOAD_REQUEST_CODE) { + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) + prepareDownload(tempThmmyFile); } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 053c2fb7..22c1bcbf 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -14,21 +14,37 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ToolbarTheme"> - + android:gravity="center_vertical" + android:orientation="horizontal"> + + + + + + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0eae379c..43af28b3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -234,5 +234,4 @@ SessionSharedPrefs - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 28fe1690..5906eabc 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -57,7 +57,7 @@