handle device rotation in some activities
This commit is contained in:
parent
58abbf32d4
commit
67c17f4cfe
4 changed files with 23 additions and 17 deletions
|
@ -28,18 +28,21 @@
|
|||
<application android:supportsRtl="true">
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.ContributorsActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:label="@string/contributors"
|
||||
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
|
||||
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.FAQActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:label="@string/frequently_asked_questions"
|
||||
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
|
||||
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.LicenseActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:label="@string/third_party_licences"
|
||||
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
android:allowBackup="true"
|
||||
android:icon="@mipmap/commons_launcher"
|
||||
android:label="@string/smtco_app_name"
|
||||
android:localeConfig="@xml/locale_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true"
|
||||
android:localeConfig="@xml/locale_config"
|
||||
android:theme="@style/TranslucentTheme">
|
||||
|
||||
<activity
|
||||
|
@ -25,7 +25,11 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="com.simplemobiletools.commons.activities.AboutActivity" />
|
||||
<activity android:name="com.simplemobiletools.commons.activities.CustomizationActivity" />
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.AboutActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize" />
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -24,6 +24,9 @@ class MainActivity : BaseSimpleActivity() {
|
|||
setContentView(R.layout.activity_main)
|
||||
appLaunched(BuildConfig.APPLICATION_ID)
|
||||
|
||||
updateMaterialActivityViews(main_coordinator, main_holder)
|
||||
setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
|
||||
|
||||
main_color_customization.setOnClickListener {
|
||||
startCustomizationActivity()
|
||||
}
|
||||
|
|
|
@ -5,28 +5,24 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/main_app_bar_layout"
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:title="@string/simple_commons"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:title="@string/simple_commons"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/main_nested_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/big_margin"
|
||||
|
|
Loading…
Reference in a new issue