updating mimetypes activity

This commit is contained in:
tibbi 2022-12-31 10:45:15 +01:00
parent 4b2281abb4
commit ba67e74edd
2 changed files with 12 additions and 15 deletions

View File

@ -39,10 +39,13 @@ class MimeTypesActivity : SimpleActivity(), ItemOperationsListener {
private var currentViewType = VIEW_TYPE_LIST private var currentViewType = VIEW_TYPE_LIST
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_mimetypes) setContentView(R.layout.activity_mimetypes)
setupOptionsMenu() setupOptionsMenu()
refreshMenuItems() refreshMenuItems()
updateMaterialActivityViews(mimetypes_coordinator, mimetypes_list, true)
setupMaterialScrollListener(mimetypes_list, mimetypes_toolbar)
currentMimeType = intent.getStringExtra(SHOW_MIMETYPE) ?: return currentMimeType = intent.getStringExtra(SHOW_MIMETYPE) ?: return
mimetypes_toolbar.title = getString( mimetypes_toolbar.title = getString(

View File

@ -5,27 +5,21 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/mimetypes_app_bar_layout" android:id="@+id/mimetypes_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
<com.google.android.material.appbar.MaterialToolbar app:menu="@menu/menu"
android:id="@+id/mimetypes_toolbar" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu"
app:title=""
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/mimetypes_holder" android:id="@+id/mimetypes_holder"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> android:layout_marginTop="?attr/actionBarSize"
android:fillViewport="true"
android:scrollbars="none">
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/mimetypes_placeholder" android:id="@+id/mimetypes_placeholder"