diff options
Diffstat (limited to 'app/src/main/res')
36 files changed, 318 insertions, 90 deletions
diff --git a/app/src/main/res/drawable/ic_dot_outline.xml b/app/src/main/res/drawable/ic_dot_outline.xml new file mode 100644 index 00000000..dd9c5588 --- /dev/null +++ b/app/src/main/res/drawable/ic_dot_outline.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="oval" + android:tint="?attr/colorOnPrimary"> + <size + android:width="24dp" + android:height="24dp" /> + <solid android:color="#7F000000" /> +</shape> diff --git a/app/src/main/res/layout/activity_anonymous_subscriptions.xml b/app/src/main/res/layout/activity_anonymous_subscriptions.xml index eb030fd8..66efc9bb 100644 --- a/app/src/main/res/layout/activity_anonymous_subscriptions.xml +++ b/app/src/main/res/layout/activity_anonymous_subscriptions.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_anonymous_subscriptions_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_comment_full_markdown.xml b/app/src/main/res/layout/activity_comment_full_markdown.xml index e1f89252..df690767 100644 --- a/app/src/main/res/layout/activity_comment_full_markdown.xml +++ b/app/src/main/res/layout/activity_comment_full_markdown.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_comment_full_markdown_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_create_multi_reddit.xml b/app/src/main/res/layout/activity_create_multi_reddit.xml index 5b088546..e1b3a3e1 100644 --- a/app/src/main/res/layout/activity_create_multi_reddit.xml +++ b/app/src/main/res/layout/activity_create_multi_reddit.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_create_multi_reddit_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_edit_multi_reddit.xml b/app/src/main/res/layout/activity_edit_multi_reddit.xml index 2e2442eb..71b98553 100644 --- a/app/src/main/res/layout/activity_edit_multi_reddit.xml +++ b/app/src/main/res/layout/activity_edit_multi_reddit.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_edit_multi_reddit_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_edit_profile.xml b/app/src/main/res/layout/activity_edit_profile.xml new file mode 100644 index 00000000..453ad5c4 --- /dev/null +++ b/app/src/main/res/layout/activity_edit_profile.xml @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="utf-8"?> +<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:id="@+id/root_layout_view_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".activities.EditProfileActivity"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_view_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_view_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + app:navigationIcon="?attr/homeAsUpIndicator" + app:popupTheme="@style/AppTheme.PopupOverlay" + app:title="@string/action_edit_profile" /> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.core.widget.NestedScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> + + <LinearLayout + android:id="@+id/content_view_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <FrameLayout + android:id="@+id/frame_layout_view_banner_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp"> + + <ImageView + android:id="@+id/image_view_banner_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="180dp" + android:contentDescription="@null" + android:scaleType="centerCrop" + tools:src="@tools:sample/backgrounds/scenic" /> + + <ImageView + android:id="@+id/image_view_change_banner_edit_profile_activity" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="end|bottom" + android:layout_margin="4dp" + android:background="@drawable/ic_dot_outline" + android:contentDescription="@null" + android:padding="4dp" + app:srcCompat="@drawable/ic_outline_add_a_photo_day_night_24dp" /> + + </FrameLayout> + + <FrameLayout + android:id="@+id/frame_layout_view_avatar_edit_profile_activity" + android:layout_width="74dp" + android:layout_height="74dp" + android:layout_marginStart="24dp" + android:layout_marginTop="143dp" + android:elevation="4dp"> + + <ImageView + android:id="@+id/image_view_avatar_edit_profile_activity" + android:layout_width="74dp" + android:layout_height="74dp" + android:contentDescription="@null" + tools:src="@tools:sample/avatars" /> + + <ImageView + android:id="@+id/image_view_change_avatar_edit_profile_activity" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="end|bottom" + android:layout_margin="4dp" + android:background="@drawable/ic_dot_outline" + android:contentDescription="@null" + android:padding="4dp" + app:srcCompat="@drawable/ic_outline_add_a_photo_day_night_24dp" /> + + </FrameLayout> + + </FrameLayout> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_margin="8dp" + android:background="?dividerVertical" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:orientation="vertical" + android:padding="8dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="?attr/font_family" + android:text="@string/display_name_text" + android:textSize="?attr/font_18" /> + + <EditText + android:id="@+id/edit_text_display_name_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="top" + android:hint="@string/display_name_hint" + android:importantForAutofill="no" + android:inputType="textCapSentences" + android:lines="1" + android:maxLength="30" + android:maxLines="1" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:paddingBottom="16dp" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/display_name_description" /> + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:orientation="vertical" + android:padding="8dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="?attr/font_family" + android:text="@string/about_you_text" + android:textSize="?attr/font_18" /> + + <EditText + android:id="@+id/edit_text_about_you_edit_profile_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="top" + android:hint="@string/about_you_hint" + android:importantForAutofill="no" + android:inputType="textCapSentences|textMultiLine" + android:lines="4" + android:maxLength="200" + android:maxLines="4" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:paddingBottom="16dp" /> + + </LinearLayout> + + </LinearLayout> + + </androidx.core.widget.NestedScrollView> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_multireddit_selection.xml b/app/src/main/res/layout/activity_multireddit_selection.xml index aec94a4f..0cfe6e8d 100644 --- a/app/src/main/res/layout/activity_multireddit_selection.xml +++ b/app/src/main/res/layout/activity_multireddit_selection.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_multireddit_selection_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_rules.xml b/app/src/main/res/layout/activity_rules.xml index 0cb088b2..38256a63 100644 --- a/app/src/main/res/layout/activity_rules.xml +++ b/app/src/main/res/layout/activity_rules.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_rules_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_search_result.xml b/app/src/main/res/layout/activity_search_result.xml index 58100f8d..6e293e2c 100644 --- a/app/src/main/res/layout/activity_search_result.xml +++ b/app/src/main/res/layout/activity_search_result.xml @@ -12,6 +12,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_search_result_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_selected_subreddits.xml b/app/src/main/res/layout/activity_selected_subreddits.xml index 9482cba4..66dfa6f8 100644 --- a/app/src/main/res/layout/activity_selected_subreddits.xml +++ b/app/src/main/res/layout/activity_selected_subreddits.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_selected_subreddits_and_users_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 339d4685..4ede004f 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -10,6 +10,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_settings_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_subreddit_selection.xml b/app/src/main/res/layout/activity_subreddit_selection.xml index 8d027137..78bac0d3 100644 --- a/app/src/main/res/layout/activity_subreddit_selection.xml +++ b/app/src/main/res/layout/activity_subreddit_selection.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_subreddit_selection_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml b/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml index 506375e7..428047f4 100644 --- a/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml +++ b/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_subscribed_subreddits_multiselection_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_subscribed_thing_listing.xml b/app/src/main/res/layout/activity_subscribed_thing_listing.xml index 109d3f74..10037a07 100644 --- a/app/src/main/res/layout/activity_subscribed_thing_listing.xml +++ b/app/src/main/res/layout/activity_subscribed_thing_listing.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_subscribed_thing_listing_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index da98158d..3746f5c6 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_view_post_detail_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" @@ -53,7 +54,8 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" android:visibility="gone" - app:cardElevation="16dp"> + app:cardElevation="16dp" + style="?attr/materialCardViewElevatedStyle"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml index bdb46784..6709af9f 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -140,7 +140,7 @@ </RelativeLayout> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml index 3d5501da..c312e808 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_view_user_detail_activity" - tools:application=".ViewUserDetailActivity"> + tools:application="ml.docilealligator.infinityforreddit.activities.ViewUserDetailActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_view_user_detail" @@ -107,15 +107,15 @@ </RelativeLayout> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar_view_user_detail_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" app:layout_collapseMode="pin" - app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" + app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/AppTheme.PopupOverlay" - app:navigationIcon="?attr/homeAsUpIndicator"/> + app:navigationIcon="?attr/homeAsUpIndicator" /> </com.google.android.material.appbar.CollapsingToolbarLayout> diff --git a/app/src/main/res/layout/activity_view_video.xml b/app/src/main/res/layout/activity_view_video.xml index bd314ccc..cd98291d 100644 --- a/app/src/main/res/layout/activity_view_video.xml +++ b/app/src/main/res/layout/activity_view_video.xml @@ -6,6 +6,7 @@ android:id="@+id/hauler_view_view_video_activity" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="#000000" android:keepScreenOn="true" app:dragUpEnabled="true" tools:application="ml.docilealligator.infinityforreddit.activities.ViewVideoActivity"> diff --git a/app/src/main/res/layout/activity_wiki.xml b/app/src/main/res/layout/activity_wiki.xml index c8f49864..ead5eedd 100644 --- a/app/src/main/res/layout/activity_wiki.xml +++ b/app/src/main/res/layout/activity_wiki.xml @@ -14,6 +14,7 @@ android:theme="@style/AppTheme.AppBarOverlay"> <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_wiki_activity" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index 9aef7ff3..fe3656be 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -21,7 +21,7 @@ app:titleEnabled="false" app:toolbarId="@+id/toolbar"> - <androidx.appcompat.widget.Toolbar + <com.google.android.material.appbar.MaterialToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/fragment_theme_preview_posts.xml b/app/src/main/res/layout/fragment_theme_preview_posts.xml index aaf14a30..8c0169cf 100644 --- a/app/src/main/res/layout/fragment_theme_preview_posts.xml +++ b/app/src/main/res/layout/fragment_theme_preview_posts.xml @@ -11,7 +11,8 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" app:cardCornerRadius="16dp" - app:cardElevation="2dp"> + app:cardElevation="2dp" + style="?attr/materialCardViewElevatedStyle"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_post_card_2_video_autoplay.xml b/app/src/main/res/layout/item_post_card_2_video_autoplay.xml index 1846c3df..ef8794ce 100644 --- a/app/src/main/res/layout/item_post_card_2_video_autoplay.xml +++ b/app/src/main/res/layout/item_post_card_2_video_autoplay.xml @@ -16,7 +16,8 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" app:cardElevation="2dp" - app:cardCornerRadius="8dp"> + app:cardCornerRadius="8dp" + style="?attr/materialCardViewElevatedStyle"> <com.google.android.exoplayer2.ui.AspectRatioFrameLayout android:id="@+id/aspect_ratio_frame_layout_item_post_card_2_video_autoplay" diff --git a/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml index 81030a91..4f5dc4f2 100644 --- a/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml @@ -16,7 +16,8 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" app:cardElevation="2dp" - app:cardCornerRadius="8dp"> + app:cardCornerRadius="8dp" + style="?attr/materialCardViewElevatedStyle"> <com.google.android.exoplayer2.ui.AspectRatioFrameLayout android:id="@+id/aspect_ratio_frame_layout_item_post_card_2_video_autoplay" diff --git a/app/src/main/res/layout/item_post_card_2_with_preview.xml b/app/src/main/res/layout/item_post_card_2_with_preview.xml index 0accab55..298e77ce 100644 --- a/app/src/main/res/layout/item_post_card_2_with_preview.xml +++ b/app/src/main/res/layout/item_post_card_2_with_preview.xml @@ -16,7 +16,8 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" app:cardElevation="2dp" - app:cardCornerRadius="8dp"> + app:cardCornerRadius="8dp" + style="?attr/materialCardViewElevatedStyle"> <ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView android:id="@+id/image_view_item_post_card_2_with_preview" @@ -42,25 +43,18 @@ android:layout_height="wrap_content" android:layout_gravity="center" /> - <RelativeLayout - android:id="@+id/load_image_error_relative_layout_item_post_card_2_with_preview" + <TextView + android:id="@+id/load_image_error_text_view_item_post_card_2_with_preview" android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone"> - - <TextView - android:id="@+id/load_image_error_text_view_item_post_card_2_with_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_error_outline_black_24dp" - android:layout_centerInParent="true" - android:paddingStart="16dp" - android:paddingEnd="16dp" - android:text="@string/error_loading_image_tap_to_retry" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> - - </RelativeLayout> + android:layout_height="wrap_content" + android:drawableTop="@drawable/ic_error_outline_black_24dp" + android:layout_gravity="center" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:text="@string/error_loading_image_tap_to_retry" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:visibility="gone" /> <ImageView android:id="@+id/image_view_no_preview_gallery_item_post_card_2_with_preview" diff --git a/app/src/main/res/layout/item_post_gallery.xml b/app/src/main/res/layout/item_post_gallery.xml index 19a2e418..128b65dc 100644 --- a/app/src/main/res/layout/item_post_gallery.xml +++ b/app/src/main/res/layout/item_post_gallery.xml @@ -7,7 +7,8 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" app:cardElevation="2dp" - app:cardCornerRadius="8dp"> + app:cardCornerRadius="8dp" + style="?attr/materialCardViewElevatedStyle"> <ProgressBar android:id="@+id/progress_bar_item_post_gallery" @@ -40,26 +41,19 @@ android:background="@drawable/play_button_round_background" android:visibility="gone" /> - <RelativeLayout - android:id="@+id/load_image_error_relative_layout_item_post_gallery" + <TextView + android:id="@+id/load_image_error_text_view_item_gallery" android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone" - tools:visibility="visible"> - - <TextView - android:id="@+id/load_image_error_text_view_item_gallery" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingStart="16dp" - android:paddingEnd="16dp" - app:drawableTopCompat="@drawable/ic_error_outline_black_24dp" - android:layout_centerInParent="true" - android:text="@string/error_loading_image_tap_to_retry" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> - - </RelativeLayout> + android:layout_height="wrap_content" + android:layout_gravity="center" + android:paddingStart="16dp" + android:paddingEnd="16dp" + app:drawableTopCompat="@drawable/ic_error_outline_black_24dp" + android:layout_centerInParent="true" + android:text="@string/error_loading_image_tap_to_retry" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:visibility="gone" /> <TextView android:id="@+id/title_text_view_item_post_gallery" diff --git a/app/src/main/res/layout/item_post_text.xml b/app/src/main/res/layout/item_post_text.xml index cd9eb21b..b2b979b1 100644 --- a/app/src/main/res/layout/item_post_text.xml +++ b/app/src/main/res/layout/item_post_text.xml @@ -7,7 +7,8 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" app:cardElevation="2dp" - app:cardCornerRadius="16dp"> + app:cardCornerRadius="16dp" + style="?attr/materialCardViewElevatedStyle"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_post_video_type_autoplay.xml b/app/src/main/res/layout/item_post_video_type_autoplay.xml index 33bdf97f..5afde9c1 100644 --- a/app/src/main/res/layout/item_post_video_type_autoplay.xml +++ b/app/src/main/res/layout/item_post_video_type_autoplay.xml @@ -7,7 +7,8 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" app:cardElevation="2dp" - app:cardCornerRadius="16dp"> + app:cardCornerRadius="16dp" + style="?attr/materialCardViewElevatedStyle"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml index bb3a07e2..b8f4a27c 100644 --- a/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml @@ -7,7 +7,8 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" app:cardElevation="2dp" - app:cardCornerRadius="16dp"> + app:cardCornerRadius="16dp" + style="?attr/materialCardViewElevatedStyle"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_post_with_preview.xml b/app/src/main/res/layout/item_post_with_preview.xml index b3ef0a9b..91014578 100644 --- a/app/src/main/res/layout/item_post_with_preview.xml +++ b/app/src/main/res/layout/item_post_with_preview.xml @@ -7,7 +7,8 @@ android:layout_marginTop="8dp" android:layout_marginBottom="8dp" app:cardElevation="2dp" - app:cardCornerRadius="16dp"> + app:cardCornerRadius="16dp" + style="?attr/materialCardViewElevatedStyle"> <LinearLayout android:layout_width="match_parent" @@ -113,10 +114,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="4dp" - android:text="@string/gallery" android:textSize="?attr/font_12" android:fontFamily="?attr/font_family" - app:lib_setRadius="3dp" + app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -130,7 +130,7 @@ android:fontFamily="?attr/font_family" android:padding="4dp" android:visibility="gone" - app:lib_setRadius="3dp" + app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -143,7 +143,7 @@ android:textSize="?attr/font_12" android:fontFamily="?attr/font_family" android:visibility="gone" - app:lib_setRadius="3dp" + app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -156,7 +156,7 @@ android:fontFamily="?attr/font_family" android:padding="4dp" android:visibility="gone" - app:lib_setRadius="3dp" + app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -168,7 +168,7 @@ android:textSize="?attr/font_12" android:fontFamily="?attr/font_family" android:visibility="gone" - app:lib_setRadius="3dp" + app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -206,7 +206,7 @@ android:fontFamily="?attr/font_family" android:visibility="gone" /> - <RelativeLayout + <FrameLayout android:id="@+id/image_wrapper_relative_layout_item_post_with_preview" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -224,7 +224,6 @@ android:layout_width="36dp" android:layout_height="36dp" android:layout_margin="16dp" - android:layout_gravity="start" android:scaleType="center" android:background="@drawable/play_button_round_background" android:visibility="gone" /> @@ -233,29 +232,21 @@ android:id="@+id/progress_bar_item_post_with_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerInParent="true" /> + android:layout_gravity="center" /> - <RelativeLayout - android:id="@+id/load_image_error_relative_layout_item_post_with_preview" + <TextView + android:id="@+id/load_image_error_text_view_item_post_with_preview" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_centerInParent="true" - android:visibility="gone"> - - <TextView - android:id="@+id/load_image_error_text_view_item_post_with_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_error_outline_black_24dp" - android:layout_gravity="center" - android:gravity="center" - android:text="@string/error_loading_image_tap_to_retry" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> - - </RelativeLayout> - - </RelativeLayout> + android:layout_height="wrap_content" + android:drawableTop="@drawable/ic_error_outline_black_24dp" + android:layout_gravity="center" + android:gravity="center" + android:text="@string/error_loading_image_tap_to_retry" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:visibility="gone" /> + + </FrameLayout> <ImageView android:id="@+id/image_view_no_preview_gallery_item_post_with_preview" diff --git a/app/src/main/res/layout/item_trending_search.xml b/app/src/main/res/layout/item_trending_search.xml index d1cdbded..8a14922a 100644 --- a/app/src/main/res/layout/item_trending_search.xml +++ b/app/src/main/res/layout/item_trending_search.xml @@ -8,7 +8,8 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" app:cardCornerRadius="16dp" - app:cardElevation="2dp"> + app:cardElevation="2dp" + style="?attr/materialCardViewElevatedStyle"> <RelativeLayout android:id="@+id/image_wrapper_relative_layout_item_trending_search" diff --git a/app/src/main/res/menu/edit_profile_activity.xml b/app/src/main/res/menu/edit_profile_activity.xml new file mode 100644 index 00000000..fe96ba20 --- /dev/null +++ b/app/src/main/res/menu/edit_profile_activity.xml @@ -0,0 +1,11 @@ +<menu 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" + tools:application="ml.docilealligator.infinityforreddit.activities.EditProfileActivity"> + <item + android:id="@+id/action_save_edit_profile_activity" + android:orderInCategory="1" + android:title="@string/action_save" + android:icon="@drawable/ic_save_to_database_24dp" + app:showAsAction="ifRoom" /> +</menu>
\ No newline at end of file diff --git a/app/src/main/res/menu/view_user_detail_activity.xml b/app/src/main/res/menu/view_user_detail_activity.xml index 437c6e23..ec9128e4 100644 --- a/app/src/main/res/menu/view_user_detail_activity.xml +++ b/app/src/main/res/menu/view_user_detail_activity.xml @@ -59,4 +59,9 @@ android:id="@+id/action_block_user_view_user_detail_activity" android:orderInCategory="10" android:title="@string/action_block_user" /> + + <item + android:id="@+id/action_edit_profile_view_user_detail_activity" + android:orderInCategory="11" + android:title="@string/action_edit_profile" /> </menu> diff --git a/app/src/main/res/values-land-v28/styles.xml b/app/src/main/res/values-land-v28/styles.xml index 037bf7e3..c3e82635 100644 --- a/app/src/main/res/values-land-v28/styles.xml +++ b/app/src/main/res/values-land-v28/styles.xml @@ -1,6 +1,6 @@ <resources> - <style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> + <style name="AppTheme" parent="Theme.Material3.DayNight"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> diff --git a/app/src/main/res/values-v28/styles.xml b/app/src/main/res/values-v28/styles.xml index 80d2dd21..272e1ebf 100644 --- a/app/src/main/res/values-v28/styles.xml +++ b/app/src/main/res/values-v28/styles.xml @@ -1,7 +1,7 @@ <resources> <!-- Base application theme. --> - <style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> + <style name="AppTheme" parent="Theme.Material3.DayNight"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6a5890c7..3b8753e8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1215,4 +1215,29 @@ <string name="app_lock_timeout_12_hours">12 hours</string> <string name="app_lock_timeout_24_hours">24 hours</string> + <!--EditProfileService Notification--> + <string name="submit_change_avatar">Submit Change Avatar</string> + <string name="submit_change_banner">Submit Change Banner</string> + <string name="submit_save_profile">Submit Save Profile</string> + + <!--EditProfileActivity--> + <string name="action_edit_profile">Edit Profile</string> + <string name="remove_avatar">Remove Avatar</string> + <string name="remove_banner">Remove Banner</string> + <string name="display_name_text">Display Name</string> + <string name="display_name_hint">Show on your profile page</string> + <string name="display_name_description">This will be displayed to viewer of your profile page and does not change your username</string> + <string name="about_you_text">About You</string> + <string name="about_you_hint">A little description of your self</string> + <string name="message_remove_avatar_success">Success remove Avatar</string> + <string name="message_remove_avatar_failed_fmt">Failed remove Avatar %s</string> + <string name="message_remove_banner_success">Success remove Banner</string> + <string name="message_remove_banner_failed_fmt">Failed remove Banner %s</string> + <string name="message_change_avatar_success">Success changing Avatar</string> + <string name="message_change_avatar_failed_fmt">Failed changing Avatar %s</string> + <string name="message_change_banner_success">Success changing Banner</string> + <string name="message_change_banner_failed_fmt">Failed changing Banner %s</string> + <string name="message_save_profile_success">Success save profile</string> + <string name="message_save_profile_failed_fmt">Failed save profile %s</string> + </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 350b0f29..9fdc6369 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ <resources xmlns:tools="http://schemas.android.com/tools"> <!-- Base application theme. --> - <style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> + <style name="AppTheme" parent="Theme.Material3.DayNight"> <item name="colorPrimary">?attr/colorPrimary</item> <item name="colorPrimaryDark">?attr/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> @@ -58,7 +58,7 @@ <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.DayNight" /> - <style name="MaterialAlertDialogTheme" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog"> + <style name="MaterialAlertDialogTheme" parent="ThemeOverlay.Material3.MaterialAlertDialog"> <item name="android:textSize">?attr/font_default</item> <item name="android:background">?attr/cardViewBackgroundColor</item> <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialogTitleTextStyle @@ -78,15 +78,15 @@ </item> </style> - <style name="MaterialAlertDialogPositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> + <style name="MaterialAlertDialogPositiveButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog"> <item name="android:textColor">@color/colorAccent</item> </style> - <style name="MaterialAlertDialogNegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> + <style name="MaterialAlertDialogNegativeButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog"> <item name="android:textColor">?attr/primaryTextColor</item> </style> - <style name="MaterialAlertDialogTitleTextStyle" parent="MaterialAlertDialog.MaterialComponents.Title.Text"> + <style name="MaterialAlertDialogTitleTextStyle" parent="MaterialAlertDialog.Material3.Title.Text"> <item name="android:textSize">?attr/font_20</item> </style> |