diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/drawable/ic_preview_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_theme_preview.xml | 204 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_view_subreddit_detail.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_theme_preview_comments.xml | 220 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_theme_preview_posts.xml | 321 | ||||
-rw-r--r-- | app/src/main/res/menu/customize_theme_activity.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 13 |
7 files changed, 776 insertions, 2 deletions
diff --git a/app/src/main/res/drawable/ic_preview_24dp.xml b/app/src/main/res/drawable/ic_preview_24dp.xml new file mode 100644 index 00000000..4153950d --- /dev/null +++ b/app/src/main/res/drawable/ic_preview_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M12,6.5c3.79,0 7.17,2.13 8.82,5.5 -1.65,3.37 -5.02,5.5 -8.82,5.5S4.83,15.37 3.18,12C4.83,8.63 8.21,6.5 12,6.5m0,-2C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,9.5c1.38,0 2.5,1.12 2.5,2.5s-1.12,2.5 -2.5,2.5 -2.5,-1.12 -2.5,-2.5 1.12,-2.5 2.5,-2.5m0,-2c-2.48,0 -4.5,2.02 -4.5,4.5s2.02,4.5 4.5,4.5 4.5,-2.02 4.5,-4.5 -2.02,-4.5 -4.5,-4.5z" + android:fillColor="#000000"/> +</vector> diff --git a/app/src/main/res/layout/activity_theme_preview.xml b/app/src/main/res/layout/activity_theme_preview.xml new file mode 100644 index 00000000..0fbc028b --- /dev/null +++ b/app/src/main/res/layout/activity_theme_preview.xml @@ -0,0 +1,204 @@ +<?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:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/coordinator_layout_theme_preview_activity" + tools:context=".Activity.ThemePreviewActivity"> + + <androidx.viewpager.widget.ViewPager + android:id="@+id/view_pager_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:titleEnabled="false" + app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" + app:toolbarId="@+id/toolbar"> + + <LinearLayout + android:id="@+id/toolbar_linear_layout_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingTop="180dp" + android:paddingStart="16dp" + android:paddingEnd="16dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:id="@+id/subreddit_name_text_view_theme_preview_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:text="@string/subreddit_preview" + android:textSize="?attr/font_18"/> + + <TextView + android:id="@+id/user_name_text_view_theme_preview_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/username_preview" + android:textSize="?attr/font_18"/> + + </LinearLayout> + + <com.google.android.material.chip.Chip + android:id="@+id/subscribe_subreddit_chip_theme_preview_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/subscribe" + android:textColor="@android:color/white" + android:layout_gravity="center_horizontal"/> + + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp"> + + <TextView + android:id="@+id/primary_text_text_view_theme_preview_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/primary_text_preview" + android:textSize="?attr/font_default" /> + + <TextView + android:id="@+id/secondary_text_text_view_theme_preview_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="end" + android:text="@string/secondary_text_preview" + android:textSize="?attr/font_default" /> + + </LinearLayout> + + </LinearLayout> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:layout_collapseMode="pin" + app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> + + </com.google.android.material.appbar.CollapsingToolbarLayout> + + <com.google.android.material.tabs.TabLayout + android:id="@+id/tab_layout_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + app:layout_scrollFlags="scroll|enterAlways" + app:tabGravity="fill" + app:tabMode="fixed" + app:tabIndicatorHeight="3dp" + app:tabRippleColor="?attr/colorControlHighlight" + app:tabUnboundedRipple="false" /> + + </com.google.android.material.appbar.AppBarLayout> + + <com.google.android.material.bottomappbar.BottomAppBar + android:id="@+id/bottom_navigation_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + app:fabAlignmentMode="center"> + + <LinearLayout + android:id="@+id/linear_layout_bottom_app_bar_theme_preview_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:weightSum="5"> + + <ImageView + android:id="@+id/subscriptions_bottom_app_bar_theme_preview_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="center" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp" + android:background="?attr/selectableItemBackgroundBorderless" /> + + <ImageView + android:id="@+id/multi_reddit_bottom_app_bar_theme_preview_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="center" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:src="@drawable/ic_multi_reddit_24dp" + android:background="?attr/selectableItemBackgroundBorderless" /> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="@android:color/transparent"/> + + <ImageView + android:id="@+id/message_bottom_app_bar_theme_preview_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="center" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:src="@drawable/ic_inbox_24dp" + android:background="?attr/selectableItemBackgroundBorderless" /> + + <ImageView + android:id="@+id/profile_bottom_app_bar_theme_preview_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginEnd="16dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:gravity="center" + android:src="@drawable/ic_account_circle_24dp" + android:background="?attr/selectableItemBackgroundBorderless" /> + + </LinearLayout> + </com.google.android.material.bottomappbar.BottomAppBar> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_theme_preview_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/fab_margin" + app:srcCompat="@drawable/ic_add_day_night_24dp" + app:tint="@android:color/white" + app:layout_anchor="@id/bottom_navigation_theme_preview_activity" /> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file 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 837df600..f7b2ee50 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -15,7 +15,7 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <com.google.android.material.appbar.AppBarLayout - android:id="@+id/appbar_layout_view_subreddit_detail" + android:id="@+id/appbar_layout_view_subreddit_detail_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/toolbarAndTabBackgroundColor" diff --git a/app/src/main/res/layout/fragment_theme_preview_comments.xml b/app/src/main/res/layout/fragment_theme_preview_comments.xml new file mode 100644 index 00000000..89447a51 --- /dev/null +++ b/app/src/main/res/layout/fragment_theme_preview_comments.xml @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView 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="wrap_content" + tools:context=".Fragment.ThemePreviewCommentsFragment"> + + <LinearLayout + android:id="@+id/linear_layout_theme_preview_comments_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <View + android:id="@+id/vertical_block_theme_preview_comments_fragment" + android:layout_width="4dp" + android:layout_height="match_parent" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:orientation="vertical"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="16dp" + android:paddingEnd="16dp"> + + <ImageView + android:id="@+id/author_type_image_view_theme_preview_comments_fragment" + android:layout_width="?attr/font_default" + android:layout_height="?attr/font_default" + android:layout_marginEnd="4dp" + android:src="@drawable/ic_mic_14dp" + app:layout_constraintBottom_toTopOf="@id/author_flair_text_view_theme_preview_comments_fragment" + app:layout_constraintEnd_toStartOf="@id/author_text_view_theme_preview_comments_fragment" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/author_text_view_theme_preview_comments_fragment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="8dp" + android:ellipsize="end" + android:maxLines="2" + android:text="@string/username_preview" + android:textSize="?attr/font_default" + app:layout_constraintBottom_toTopOf="@id/author_flair_text_view_theme_preview_comments_fragment" + app:layout_constraintEnd_toStartOf="@+id/comment_time_text_view_theme_preview_comments_fragment" + app:layout_constraintStart_toEndOf="@id/author_type_image_view_theme_preview_comments_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/author_flair_text_view_theme_preview_comments_fragment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="8dp" + android:ellipsize="end" + android:maxLines="2" + android:text="@string/author_flair_preview" + android:textSize="?attr/font_12" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/comment_time_text_view_theme_preview_comments_fragment" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/author_text_view_theme_preview_comments_fragment" /> + + <TextView + android:id="@+id/comment_time_text_view_theme_preview_comments_fragment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:gravity="end" + android:text="2 Hours" + android:textSize="?attr/font_default" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <TextView + android:id="@+id/comment_markdown_view_theme_preview_comments_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="8dp" + android:text="@string/comment_content_preview" + android:textSize="?attr/content_font_default" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_theme_preview_comments_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="12dp" + android:paddingStart="4dp" + android:paddingEnd="4dp"> + + <ImageView + android:id="@+id/up_vote_button_theme_preview_comments_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:src="@drawable/ic_arrow_upward_grey_24dp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + + <TextView + android:id="@+id/score_text_view_theme_preview_comments_fragment" + android:layout_width="64dp" + android:layout_height="wrap_content" + android:gravity="center" + android:text="1234" + android:textSize="?attr/font_12" + android:textStyle="bold" + app:layout_constraintStart_toEndOf="@+id/up_vote_button_theme_preview_comments_fragment" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <ImageView + android:id="@+id/down_vote_button_theme_preview_comments_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:src="@drawable/ic_arrow_downward_grey_24dp" + android:tint="@android:color/tab_indicator_text" + app:layout_constraintStart_toEndOf="@+id/score_text_view_theme_preview_comments_fragment" + app:layout_constraintEnd_toStartOf="@id/more_button_theme_preview_comments_fragment" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintHorizontal_bias="0" /> + + <ImageView + android:id="@+id/more_button_theme_preview_comments_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:src="@drawable/ic_more_vert_grey_24dp" + app:layout_constraintEnd_toStartOf="@+id/expand_button_theme_preview_comments_fragment" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <ImageView + android:id="@+id/expand_button_theme_preview_comments_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:src="@drawable/ic_expand_less_grey_24dp" + android:tint="@android:color/tab_indicator_text" + app:layout_constraintEnd_toStartOf="@+id/save_button_theme_preview_comments_fragment" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <ImageView + android:id="@+id/save_button_theme_preview_comments_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:src="@drawable/ic_bookmark_border_grey_24dp" + app:layout_constraintEnd_toStartOf="@+id/reply_button_theme_preview_comments_fragment" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <ImageView + android:id="@+id/reply_button_theme_preview_comments_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:src="@drawable/ic_reply_grey_24dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </LinearLayout> + + </LinearLayout> + + <View + android:id="@+id/divider_theme_preview_comments_fragment" + android:layout_width="match_parent" + android:layout_height="1dp" /> + + </LinearLayout> + +</androidx.core.widget.NestedScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_theme_preview_posts.xml b/app/src/main/res/layout/fragment_theme_preview_posts.xml new file mode 100644 index 00000000..4b4f7cb0 --- /dev/null +++ b/app/src/main/res/layout/fragment_theme_preview_posts.xml @@ -0,0 +1,321 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_view_theme_preview_posts_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + app:cardCornerRadius="16dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp"> + + <ml.docilealligator.infinityforreddit.CustomView.AspectRatioGifImageView + android:id="@+id/icon_gif_image_view_theme_preview_posts_fragment" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="center" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/subreddit_name_text_view_theme_preview_posts_fragment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginStart="16dp" + android:layout_marginEnd="8dp" + android:text="@string/subreddit_preview" + android:textSize="?attr/font_default" + app:layout_constraintBottom_toTopOf="@id/user_text_view_theme_preview_posts_fragment" + app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_theme_preview_posts_fragment" + app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_theme_preview_posts_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/user_text_view_theme_preview_posts_fragment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginEnd="8dp" + android:ellipsize="end" + android:maxLines="2" + android:text="@string/username_preview" + android:textSize="?attr/font_default" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_theme_preview_posts_fragment" + app:layout_constraintHorizontal_bias="0" + app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_theme_preview_posts_fragment" + app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_theme_preview_posts_fragment" /> + + <ImageView + android:id="@+id/stickied_post_image_view_theme_preview_posts_fragment" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginEnd="8dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/guideline2" + app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_theme_preview_posts_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/post_time_text_view_best_theme_preview_posts_fragment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:gravity="end" + android:text="2 Hours" + android:textSize="?attr/font_default" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/guideline2" + app:layout_constraintTop_toTopOf="parent" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.6" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <TextView + android:id="@+id/title_text_view_best_theme_preview_posts_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:text="@string/post_title_preview" + android:textSize="?attr/title_font_18" /> + + <TextView + android:id="@+id/content_text_view_theme_preview_posts_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:maxLines="4" + android:text="@string/post_content_preview" + android:textSize="?attr/content_font_default" + android:ellipsize="end" /> + + <com.nex3z.flowlayout.FlowLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + app:flChildSpacing="16dp" + app:flChildSpacingForLastRow="align" + app:flRowSpacing="8dp"> + + <com.libRG.CustomTextView + android:id="@+id/type_text_view_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="4dp" + android:text="@string/post_type_preview" + android:textColor="@android:color/white" + android:textSize="?attr/font_12" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> + + <com.libRG.CustomTextView + android:id="@+id/spoiler_custom_text_view_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:padding="4dp" + android:text="@string/spoiler" + android:textColor="@android:color/white" + android:textSize="?attr/font_12" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> + + <com.libRG.CustomTextView + android:id="@+id/nsfw_text_view_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="4dp" + android:text="@string/nsfw" + android:textColor="@android:color/white" + android:textSize="?attr/font_12" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> + + <com.libRG.CustomTextView + android:id="@+id/flair_custom_text_view_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:padding="4dp" + android:text="@string/flair_preview" + android:textColor="@android:color/white" + android:textSize="?attr/font_12" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:drawableStart="@drawable/gold" + android:drawablePadding="4dp" + android:text="@string/gilded_preview" + android:textColor="@color/gold" + android:textSize="?attr/font_default" /> + + <ImageView + android:id="@+id/archived_image_view_theme_preview_posts_fragment" + android:layout_width="24dp" + android:layout_height="24dp" + android:src="@drawable/ic_archive_outline" /> + + <ImageView + android:id="@+id/locked_image_view_theme_preview_posts_fragment" + android:layout_width="24dp" + android:layout_height="24dp" + android:src="@drawable/ic_outline_lock_24dp" /> + + <ImageView + android:id="@+id/crosspost_image_view_theme_preview_posts_fragment" + android:layout_width="24dp" + android:layout_height="24dp" + android:src="@drawable/crosspost" /> + + </com.nex3z.flowlayout.FlowLayout> + + <TextView + android:id="@+id/link_text_view_theme_preview_posts_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:text="abcd.efg" + android:textSize="?attr/font_12" /> + + <ProgressBar + android:id="@+id/progress_bar_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginBottom="16dp" /> + + <ImageView + android:id="@+id/image_view_no_preview_link_theme_preview_posts_fragment" + android:layout_width="match_parent" + android:layout_height="150dp" + android:scaleType="center" + android:src="@drawable/ic_link" + android:tint="@android:color/tab_indicator_text" + android:background="?attr/noPreviewLinkBackgroundColor" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/plus_button_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:padding="12dp" + android:src="@drawable/ic_arrow_upward_grey_24dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/score_text_view_theme_preview_posts_fragment" + android:layout_width="64dp" + android:layout_height="wrap_content" + android:gravity="center" + android:text="1234" + android:textSize="?attr/font_12" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/plus_button_theme_preview_posts_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/minus_button_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:padding="12dp" + android:src="@drawable/ic_arrow_downward_grey_24dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/score_text_view_theme_preview_posts_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/comments_count_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:drawableStart="@drawable/ic_comment_grey_24dp" + android:drawablePadding="12dp" + android:gravity="center_vertical" + android:padding="12dp" + android:text="567" + android:textSize="?attr/font_12" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/minus_button_theme_preview_posts_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/save_button_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:padding="12dp" + android:src="@drawable/ic_bookmark_border_grey_24dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/share_button_theme_preview_posts_fragment" + app:layout_constraintHorizontal_bias="1" + app:layout_constraintStart_toEndOf="@id/comments_count_theme_preview_posts_fragment" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/share_button_theme_preview_posts_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" + android:padding="12dp" + android:src="@drawable/ic_share_grey_24dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + +</androidx.core.widget.NestedScrollView>
\ No newline at end of file diff --git a/app/src/main/res/menu/customize_theme_activity.xml b/app/src/main/res/menu/customize_theme_activity.xml index 0e363e0f..b48416ae 100644 --- a/app/src/main/res/menu/customize_theme_activity.xml +++ b/app/src/main/res/menu/customize_theme_activity.xml @@ -2,9 +2,16 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item - android:id="@+id/action_save_customize_theme_activity" + android:id="@+id/action_preview_customize_theme_activity" android:orderInCategory="1" android:title="@string/action_save" + android:icon="@drawable/ic_preview_24dp" + app:showAsAction="ifRoom" /> + + <item + android:id="@+id/action_save_customize_theme_activity" + android:orderInCategory="2" + android:title="@string/action_save" android:icon="@drawable/ic_check_circle_toolbar_24dp" app:showAsAction="ifRoom" /> </menu>
\ 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 fc00e0f6..e87d9a60 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -22,6 +22,7 @@ <string name="custom_theme_listing_activity_label">Custom Themes</string> <string name="customize_theme_activity_label">Customize Theme</string> <string name="customize_theme_activity_create_theme_label">Create Theme</string> + <string name="theme_preview_activity_label">Theme Preview</string> <string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string> @@ -658,5 +659,17 @@ <string name="delete_all_themes_success">Delete all themes successful</string> <string name="reset_all_settings_success">Reset all settings successful</string> + <string name="theme_preview">Theme Preview</string> + <string name="username_preview">u/Hostilenemy</string> + <string name="subreddit_preview">r/Infinity_For_Reddit</string> + <string name="primary_text_preview">Primary Text</string> + <string name="secondary_text_preview">Secondary Text</string> + <string name="post_title_preview">This is a post</string> + <string name="post_content_preview">This gravity joke is getting a bit old, but I fall for it every time.</string> + <string name="post_type_preview">POST</string> + <string name="flair_preview">Flair</string> + <string name="gilded_preview">x4</string> + <string name="author_flair_preview">Author Flair</string> + <string name="comment_content_preview">I got my girlfriend a “Get better soon” card.\nShe\'s not ill or anything, but she could definitely get better.</string> </resources> |