Merge pull request #5667 from k9mail/fix_split_screen

Fix split screen
This commit is contained in:
cketti 2021-09-16 05:45:29 +02:00 committed by GitHub
commit cc715dfcae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 90 additions and 91 deletions

View file

@ -342,6 +342,7 @@ open class MessageList :
messageListFragment!!.setActiveMessage(activeMessage)
}
}
setDrawerLockState()
}
}
}
@ -1444,18 +1445,22 @@ open class MessageList :
messageListFragment!!.setActiveMessage(null)
if (isDrawerEnabled) {
if (isAdditionalMessageListDisplayed) {
lockDrawer()
} else {
unlockDrawer()
}
}
setDrawerLockState()
showDefaultTitleView()
configureMenu(menu)
}
private fun setDrawerLockState() {
if (!isDrawerEnabled) return
if (isAdditionalMessageListDisplayed) {
lockDrawer()
} else {
unlockDrawer()
}
}
private fun showMessageView() {
displayMode = DisplayMode.MESSAGE_VIEW

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="start">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/material_drawer_swipe_refresh"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1">
<com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
android:id="@+id/material_drawer_slider"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/messageListDividerColor" />
<LinearLayout
android:id="@+id/material_drawer_button_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="4dp"
android:background="?android:attr/windowBackground">
<ImageView
android:id="@+id/drawer_button_refresh_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/iconActionRefresh"
android:contentDescription="@string/check_mail_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
<ImageView
android:id="@+id/drawer_button_refresh_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_refresh_all"
android:contentDescription="@string/check_all_mail_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/drawer_button_manage_folders"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_folder_manage"
android:contentDescription="@string/folders_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
<ImageView
android:id="@+id/drawer_button_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/iconActionSettings"
android:contentDescription="@string/preferences_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
</LinearLayout>
</LinearLayout>

View file

@ -47,78 +47,6 @@
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="start">
<include layout="@layout/drawer_contents"/>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/material_drawer_swipe_refresh"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1">
<com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
android:id="@+id/material_drawer_slider"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/messageListDividerColor" />
<LinearLayout
android:id="@+id/material_drawer_button_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="4dp"
android:background="?android:attr/windowBackground">
<ImageView
android:id="@+id/drawer_button_refresh_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/iconActionRefresh"
android:contentDescription="@string/check_mail_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
<ImageView
android:id="@+id/drawer_button_refresh_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_refresh_all"
android:contentDescription="@string/check_all_mail_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/drawer_button_manage_folders"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_folder_manage"
android:contentDescription="@string/folders_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
<ImageView
android:id="@+id/drawer_button_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/iconActionSettings"
android:contentDescription="@string/preferences_action"
android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless" />
</LinearLayout>
</LinearLayout>
</androidx.drawerlayout.widget.DrawerLayout>

View file

@ -58,16 +58,6 @@
</LinearLayout>
</RelativeLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/material_drawer_swipe_refresh"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start">
<include layout="@layout/drawer_contents"/>
<com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
android:id="@+id/material_drawer_slider"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.drawerlayout.widget.DrawerLayout>