diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/layout/activity_login.xml | 21 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_detail.xml | 62 | ||||
-rw-r--r-- | app/src/main/res/values/arrays.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/xml/main_preferences.xml | 9 |
5 files changed, 44 insertions, 65 deletions
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 236d52e4..e993cd2d 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -1,14 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:application="ml.docilealligator.infinityforreddit.LoginActivity"> + <com.google.android.material.appbar.AppBarLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_login_activity" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> + + </com.google.android.material.appbar.AppBarLayout> + <WebView android:id="@+id/webview_login_activity" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> -</androidx.constraintlayout.widget.ConstraintLayout> +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index b1299ca5..32a0f3b1 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -169,68 +169,6 @@ </androidx.constraintlayout.widget.ConstraintLayout> - <!--<RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingStart="16dp" - android:paddingEnd="16dp" - android:paddingTop="16dp"> - - <com.google.android.material.chip.Chip - android:id="@+id/type_text_view_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="16dp" - android:textColor="@android:color/white" - android:layout_centerVertical="true" - app:chipBackgroundColor="@color/backgroundColorPrimaryDark"/> - - <ImageView - android:id="@+id/gilded_image_view_item_post_detail" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_toEndOf="@id/type_text_view_item_post_detail" - android:layout_centerVertical="true" - android:visibility="gone"/> - - <TextView - android:id="@+id/gilded_number_text_view_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="4dp" - android:layout_marginEnd="8dp" - android:layout_toEndOf="@id/gilded_image_view_item_post_detail" - android:layout_centerVertical="true" - android:visibility="gone" - android:textSize="20sp" - android:textColor="@color/gold"/> - - <ImageView - android:id="@+id/crosspost_image_view_item_post_detail" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:layout_toEndOf="@id/gilded_number_text_view_item_post_detail" - android:layout_centerVertical="true" - android:src="@drawable/crosspost" - android:tint="@color/colorAccent" - android:visibility="gone"/> - - <com.google.android.material.chip.Chip - android:id="@+id/nsfw_text_view_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/nsfw" - android:layout_alignParentEnd="true" - android:layout_marginStart="8dp" - android:textColor="@android:color/white" - android:visibility="gone" - android:layout_centerVertical="true" - app:chipBackgroundColor="@color/colorAccent"/> - - </RelativeLayout>--> - <LinearLayout android:id="@+id/spoiler_flair_linear_layout_item_post_detail" android:layout_width="match_parent" diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 56477516..f82fc670 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -36,4 +36,20 @@ <item>1</item> <item>2</item> </string-array> + + <string-array name="settings_lazy_mode_interval"> + <item>2.5s</item> + <item>3s</item> + <item>5s</item> + <item>7s</item> + <item>10s</item> + </string-array> + + <string-array name="settings_lazy_mode_interval_values"> + <item>2.5</item> + <item>3</item> + <item>5</item> + <item>7</item> + <item>10</item> + </string-array> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 09740a2f..2d19ae76 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -258,6 +258,7 @@ <string name="settings_theme_light__theme_summary">Light Theme</string> <string name="settings_theme_dark_theme_summary">Dark Theme</string> <string name="settings_theme_system_default_summary">Device default</string> + <string name="settings_lazy_mode_interval_title">Lazy Mode Interval</string> <string name="settings_enable_nsfw_title">Enable NSFW</string> <string name="settings_acknowledgement_master_title">Acknowledgement</string> diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index 7ccfa301..7d482fae 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -16,6 +16,15 @@ app:title="@string/settings_theme_title" app:useSimpleSummaryProvider="true" /> + <ListPreference + app:defaultValue="2.5" + android:entries="@array/settings_lazy_mode_interval" + app:entryValues="@array/settings_lazy_mode_interval_values" + app:key="lazy_mode_interval" + app:icon="@drawable/ic_outline_access_time_24px" + app:title="@string/settings_lazy_mode_interval_title" + app:useSimpleSummaryProvider="true" /> + <SwitchPreference app:defaultValue="false" app:key="nsfw" |