diff options
author | Andrew Dolgov <[email protected]> | 2020-06-01 12:00:04 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-06-01 12:00:04 +0300 |
commit | 5c2759c358e4bf5506d76662a612ec43e6e9e5d5 (patch) | |
tree | c6507addd97f4313f143c49c2b25dcc1199774c6 /org.fox.ttrss/src/main/res | |
parent | d20a6e8432c60e2756da8fc82eda24520805d3d5 (diff) |
add an option to force phone layout on tablet devices
Diffstat (limited to 'org.fox.ttrss/src/main/res')
6 files changed, 90 insertions, 65 deletions
diff --git a/org.fox.ttrss/src/main/res/layout/activity_detail.xml b/org.fox.ttrss/src/main/res/layout/activity_detail.xml index e9cfdc35..c35ab296 100644 --- a/org.fox.ttrss/src/main/res/layout/activity_detail.xml +++ b/org.fox.ttrss/src/main/res/layout/activity_detail.xml @@ -1,24 +1,9 @@ -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/headlines" - android:fitsSystemWindows="true" - android:animateLayoutChanges="true" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> - <FrameLayout - android:id="@+id/article_fragment" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="?articleBackground"> - </FrameLayout> + <include layout="@layout/activity_detail_phone" /> - <FrameLayout - android:id="@+id/headlines_fragment" - android:visibility="gone" - android:layout_height="0dp" - android:layout_width="0dp" - android:background="?headlinesBackground"> - </FrameLayout> - - <include layout="@layout/toolbar" android:id="@+id/toolbar" /> </FrameLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml b/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml new file mode 100644 index 00000000..e9cfdc35 --- /dev/null +++ b/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml @@ -0,0 +1,24 @@ +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/headlines" + android:fitsSystemWindows="true" + android:animateLayoutChanges="true" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <FrameLayout + android:id="@+id/article_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?articleBackground"> + </FrameLayout> + + <FrameLayout + android:id="@+id/headlines_fragment" + android:visibility="gone" + android:layout_height="0dp" + android:layout_width="0dp" + android:background="?headlinesBackground"> + </FrameLayout> + + <include layout="@layout/toolbar" android:id="@+id/toolbar" /> +</FrameLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/activity_master.xml b/org.fox.ttrss/src/main/res/layout/activity_master.xml index 3cd0a62a..9bb9bff5 100755 --- a/org.fox.ttrss/src/main/res/layout/activity_master.xml +++ b/org.fox.ttrss/src/main/res/layout/activity_master.xml @@ -1,44 +1,8 @@ - <androidx.drawerlayout.widget.DrawerLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:fitsSystemWindows="true" - android:id="@+id/headlines_drawer" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <FrameLayout - android:fitsSystemWindows="true" - android:animateLayoutChanges="true" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <FrameLayout - android:id="@+id/headlines_fragment" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="?headlinesBackground"></FrameLayout> - - <include layout="@layout/toolbar" android:id="@+id/toolbar" /> - - </FrameLayout> - - <org.fox.ttrss.util.ScrimInsetsFrameLayout - xmlns:app="http://schemas.android.com/apk/res-auto" - android:id="@+id/scrimInsetsFrameLayout" - android:layout_width="300dp" - android:layout_height="match_parent" - android:layout_gravity="start" - android:background="@android:color/white" - android:elevation="10dp" - android:fitsSystemWindows="true" - app:insetForeground="#4000"> - - <FrameLayout - android:id="@+id/feeds_fragment" - android:layout_width="match_parent" - android:background="?feedlistBackground" - android:layout_height="match_parent" > - </FrameLayout> - - </org.fox.ttrss.util.ScrimInsetsFrameLayout> - - </androidx.drawerlayout.widget.DrawerLayout> +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/activity_master_phone" /> +</FrameLayout>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/activity_master_phone.xml b/org.fox.ttrss/src/main/res/layout/activity_master_phone.xml new file mode 100644 index 00000000..de3db618 --- /dev/null +++ b/org.fox.ttrss/src/main/res/layout/activity_master_phone.xml @@ -0,0 +1,44 @@ + <androidx.drawerlayout.widget.DrawerLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:fitsSystemWindows="true" + android:id="@+id/headlines_drawer" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <FrameLayout + android:fitsSystemWindows="true" + android:animateLayoutChanges="true" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <FrameLayout + android:id="@+id/headlines_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?headlinesBackground" /> + + <include layout="@layout/toolbar" android:id="@+id/toolbar" /> + + </FrameLayout> + + <org.fox.ttrss.util.ScrimInsetsFrameLayout + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/scrimInsetsFrameLayout" + android:layout_width="300dp" + android:layout_height="match_parent" + android:layout_gravity="start" + android:background="@android:color/white" + android:elevation="10dp" + android:fitsSystemWindows="true" + app:insetForeground="#4000"> + + <FrameLayout + android:id="@+id/feeds_fragment" + android:layout_width="match_parent" + android:background="?feedlistBackground" + android:layout_height="match_parent" > + </FrameLayout> + + </org.fox.ttrss.util.ScrimInsetsFrameLayout> + + </androidx.drawerlayout.widget.DrawerLayout> diff --git a/org.fox.ttrss/src/main/res/values/strings.xml b/org.fox.ttrss/src/main/res/values/strings.xml index a0b0f0b4..12604d45 100755 --- a/org.fox.ttrss/src/main/res/values/strings.xml +++ b/org.fox.ttrss/src/main/res/values/strings.xml @@ -282,4 +282,6 @@ <string name="prefs_always_downsample_images">Always resize images</string> <string name="prefs_always_downsample_images_long">Even on Wi-Fi</string> <string name="prefs_inline_video_player_title">Inline video player</string> + <string name="force_phone_layout_summary">On tablet devices</string> + <string name="force_phone_layout">Force phone layout</string> </resources> diff --git a/org.fox.ttrss/src/main/res/xml/preferences.xml b/org.fox.ttrss/src/main/res/xml/preferences.xml index 93bc74fa..9cf7bec1 100755 --- a/org.fox.ttrss/src/main/res/xml/preferences.xml +++ b/org.fox.ttrss/src/main/res/xml/preferences.xml @@ -62,6 +62,12 @@ android:defaultValue="true" android:key="open_fresh_on_startup" android:title="@string/prefs_open_fresh_on_startup" /> + + <org.fox.ttrss.util.LessBrokenSwitchPreference + android:defaultValue="false" + android:key="force_phone_layout" + android:summary="@string/force_phone_layout_summary" + android:title="@string/force_phone_layout" /> </PreferenceCategory> <PreferenceCategory |