diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/drawable/crosspost.xml | 17 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_view_post_detail.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/layout/item_footer_progress_bar.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post.xml | 395 |
4 files changed, 234 insertions, 200 deletions
diff --git a/app/src/main/res/drawable/crosspost.xml b/app/src/main/res/drawable/crosspost.xml new file mode 100644 index 00000000..c8b43c52 --- /dev/null +++ b/app/src/main/res/drawable/crosspost.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="27.963dp" + android:height="27.963dp" + android:viewportWidth="27.963" + android:viewportHeight="27.963"> + + <path + android:fillColor="#030104" + android:pathData="M7.254,12.923c-0.117,0-0.234-0.043-0.324-0.125c-0.316-0.295-0.588-0.533-0.834-0.73 c-1.076-0.887-1.9-1.195-2.312-1.195H0.475C0.213,10.872,0,10.655,0,10.395V6.763c0-0.256,0.213-0.471,0.475-0.471h3.268 c1.352,0.004,2.695,0.457,4.104,1.385c0.701,0.463,1.404,1.029,2.207,1.779c0.092,0.084,0.148,0.209,0.15,0.334 c0.004,0.125-0.045,0.25-0.131,0.342c-0.459,0.48-0.91,0.963-1.355,1.438c-0.386,0.419-0.757,0.818-1.122,1.204 C7.504,12.874,7.379,12.923,7.254,12.923z" /> + <path + android:fillColor="#030104" + android:pathData="M21.818,24.675c-0.068,0-0.133-0.012-0.199-0.043c-0.166-0.078-0.275-0.244-0.275-0.426v-2.402 h-2.342c-1.363-0.006-2.723-0.453-4.143-1.379c-0.703-0.459-1.406-1.02-2.213-1.764c-0.096-0.086-0.146-0.207-0.15-0.336 c-0.006-0.127,0.039-0.248,0.131-0.344c0.488-0.506,0.969-1.021,1.439-1.531c0.355-0.383,0.697-0.752,1.035-1.109 c0.18-0.186,0.475-0.197,0.67-0.023c0.301,0.281,0.564,0.51,0.805,0.697c0.932,0.762,1.822,1.211,2.389,1.211h2.379V14.65 c0-0.184,0.109-0.355,0.275-0.432s0.367-0.053,0.508,0.064l5.662,4.787c0.109,0.092,0.174,0.223,0.174,0.363 s-0.064,0.273-0.174,0.363l-5.662,4.768C22.039,24.64,21.93,24.675,21.818,24.675z" /> + <path + android:fillColor="#030104" + android:pathData="M3.689,21.804H0.475C0.213,21.804,0,21.591,0,21.327V17.7c0-0.262,0.213-0.475,0.475-0.475H3.69 c0.436,0,1.016-0.229,1.648-0.641c0.682-0.443,1.523-1.16,2.492-2.143c0.613-0.609,1.221-1.271,1.867-1.965 c1.27-1.377,2.588-2.801,4.016-3.963c1.27-1.023,3.014-2.199,5.23-2.223h2.4V3.763c0-0.186,0.109-0.354,0.275-0.432 c0.166-0.074,0.367-0.051,0.508,0.066l5.662,4.785c0.109,0.09,0.174,0.225,0.174,0.365c0,0.14-0.066,0.271-0.174,0.363 l-5.662,4.768c-0.141,0.117-0.342,0.146-0.508,0.07c-0.166-0.078-0.275-0.25-0.275-0.432v-2.444h-2.396 c-0.246,0-0.756,0.078-1.586,0.629c-0.676,0.441-1.506,1.164-2.475,2.146c-0.588,0.596-1.174,1.229-1.797,1.904 c-1.301,1.398-2.643,2.854-4.109,4.035c-1.289,1.023-3.045,2.195-5.289,2.217C3.691,21.804,3.691,21.804,3.689,21.804z" /> +</vector>
\ No newline at end of file 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 025f8ef1..b9c13bcb 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -98,7 +98,7 @@ android:id="@+id/type_text_view_view_post_detail" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="16dp" + android:layout_marginEnd="8dp" android:layout_centerVertical="true" android:background="@drawable/rounded_corner" android:textColor="@android:color/white" /> @@ -118,12 +118,24 @@ android:layout_marginStart="4dp" android:layout_marginEnd="8dp" android:layout_toEndOf="@id/gilded_image_view_view_post_detail" - android:layout_toStartOf="@id/nsfw_text_view_view_post_detail" android:layout_centerVertical="true" android:visibility="gone" android:textSize="20sp" android:textColor="@color/gold"/> + <ImageView + android:id="@+id/crosspost_image_view_view_post_detail" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + android:layout_toStartOf="@id/nsfw_text_view_item_best_post" + android:layout_toEndOf="@id/gilded_number_text_view_view_post_detail" + android:layout_centerVertical="true" + android:src="@drawable/crosspost" + android:tint="@color/colorAccent" + android:visibility="gone"/> + <TextView android:id="@+id/nsfw_text_view_view_post_detail" android:layout_width="wrap_content" diff --git a/app/src/main/res/layout/item_footer_progress_bar.xml b/app/src/main/res/layout/item_footer_progress_bar.xml index a84af3bc..270fc6ef 100644 --- a/app/src/main/res/layout/item_footer_progress_bar.xml +++ b/app/src/main/res/layout/item_footer_progress_bar.xml @@ -10,7 +10,7 @@ android:id="@+id/progress_bar_footer_progress_bar_item" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="16dp" + android:layout_marginTop="8dp" android:layout_marginBottom="16dp" android:layout_gravity="center" /> @@ -18,11 +18,9 @@ android:id="@+id/relative_layout_footer_progress_bar_item" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="16dp" + android:layout_marginTop="8dp" android:layout_marginBottom="16dp" - android:layout_marginLeft="16dp" android:layout_marginStart="16dp" - android:layout_marginRight="16dp" android:layout_marginEnd="16dp" android:visibility="gone"> diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index 8549d735..900e9817 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -1,233 +1,240 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:layout_marginBottom="8dp" android:id="@+id/card_view_view_post_detail"> -</android.support.v7.widget.CardView>--> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:background="#FFFFFF" - android:id="@+id/linear_layout_view_post_detail"> - <RelativeLayout - android:id="@+id/relative_view_item_best_post" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" - android:layout_marginTop="16dp"> - - <de.hdodenhof.circleimageview.CircleImageView - android:id="@+id/subreddit_icon_circle_image_view_best_post_item" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_alignParentStart="true" - android:layout_centerVertical="true"/> + android:orientation="vertical" + android:background="#FFFFFF"> - <TextView - android:id="@+id/subreddit_text_view_best_post_item" - android:layout_width="wrap_content" - android:layout_height="match_parent" + <RelativeLayout + android:id="@+id/relative_view_item_best_post" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" android:layout_marginStart="16dp" - android:layout_marginEnd="8dp" - android:layout_toStartOf="@id/stickied_post_image_view_best_post_item" - android:layout_toEndOf="@id/subreddit_icon_circle_image_view_best_post_item" - android:layout_centerVertical="true" - android:textColor="#E91E63"/> + android:layout_marginEnd="16dp" + android:layout_marginTop="16dp"> - <ImageView - android:id="@+id/stickied_post_image_view_best_post_item" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_toStartOf="@id/post_time_text_view_best_post_item" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:tint="@color/colorPrimary" - android:visibility="gone"/> + <de.hdodenhof.circleimageview.CircleImageView + android:id="@+id/subreddit_icon_circle_image_view_best_post_item" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_alignParentStart="true" + android:layout_centerVertical="true"/> - <TextView - android:id="@+id/post_time_text_view_best_post_item" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:gravity="center_vertical"/> - - </RelativeLayout> - - <TextView - android:id="@+id/title_text_view_best_post_item" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="16dp" - android:layout_marginStart="16dp" - android:layout_marginRight="16dp" - android:layout_marginEnd="16dp" - android:textSize="18sp" - android:textColor="#000000"/> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp"> + <TextView + android:id="@+id/subreddit_text_view_best_post_item" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginStart="16dp" + android:layout_marginEnd="8dp" + android:layout_toStartOf="@id/stickied_post_image_view_best_post_item" + android:layout_toEndOf="@id/subreddit_icon_circle_image_view_best_post_item" + android:layout_centerVertical="true" + android:textColor="#E91E63"/> + + <ImageView + android:id="@+id/stickied_post_image_view_best_post_item" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_toStartOf="@id/post_time_text_view_best_post_item" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + android:tint="@color/colorPrimary" + android:visibility="gone"/> - <TextView - android:id="@+id/type_text_view_item_best_post" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="@drawable/rounded_corner" - android:layout_marginEnd="8dp" - android:layout_centerVertical="true" - android:textColor="@android:color/white"/> + <TextView + android:id="@+id/post_time_text_view_best_post_item" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:gravity="center_vertical"/> - <ImageView - android:id="@+id/gilded_image_view_item_best_post" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_toEndOf="@id/type_text_view_item_best_post" - android:layout_centerVertical="true" - android:layout_marginStart="8dp" - android:visibility="gone"/> + </RelativeLayout> <TextView - android:id="@+id/gilded_number_text_view_item_best_post" - android:layout_width="wrap_content" + android:id="@+id/title_text_view_best_post_item" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="4dp" - android:layout_marginEnd="8dp" - android:layout_toEndOf="@id/gilded_image_view_item_best_post" - android:layout_toStartOf="@id/nsfw_text_view_item_best_post" - android:layout_centerVertical="true" - android:visibility="gone" - android:textSize="20sp" - android:textColor="@color/gold"/> + android:layout_marginLeft="16dp" + android:layout_marginStart="16dp" + android:layout_marginRight="16dp" + android:layout_marginEnd="16dp" + android:textSize="18sp" + android:textColor="#000000"/> - <TextView - android:id="@+id/nsfw_text_view_item_best_post" - android:text="@string/nsfw" - android:layout_width="wrap_content" + <RelativeLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/nsfw_rounded_corner" - android:layout_alignParentEnd="true" - android:layout_marginStart="8dp" - android:layout_centerVertical="true" - android:textColor="@android:color/white" - android:visibility="gone"/> + android:layout_marginTop="8dp" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp"> - </RelativeLayout> + <TextView + android:id="@+id/type_text_view_item_best_post" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/rounded_corner" + android:layout_marginEnd="8dp" + android:layout_centerVertical="true" + android:textColor="@android:color/white"/> + + <ImageView + android:id="@+id/gilded_image_view_item_best_post" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_toEndOf="@id/type_text_view_item_best_post" + android:layout_centerVertical="true" + android:layout_marginStart="8dp" + android:visibility="gone"/> - <RelativeLayout - android:id="@+id/image_view_wrapper_item_best_post" - android:layout_width="match_parent" - android:layout_height="350dp" - android:layout_marginTop="16dp" - android:visibility="gone"> + <TextView + android:id="@+id/gilded_number_text_view_item_best_post" + 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_best_post" + android:layout_centerVertical="true" + android:visibility="gone" + android:textSize="20sp" + android:textColor="@color/gold"/> + + <ImageView + android:id="@+id/crosspost_image_view_item_best_post" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + android:layout_toStartOf="@id/nsfw_text_view_item_best_post" + android:layout_toEndOf="@id/gilded_number_text_view_item_best_post" + android:layout_centerVertical="true" + android:src="@drawable/crosspost" + android:tint="@color/colorAccent" + android:visibility="gone"/> - <ProgressBar - android:id="@+id/progress_bar_best_post_item" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerInParent="true" /> + <TextView + android:id="@+id/nsfw_text_view_item_best_post" + android:text="@string/nsfw" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/nsfw_rounded_corner" + android:layout_alignParentEnd="true" + android:layout_marginStart="8dp" + android:layout_centerVertical="true" + android:textColor="@android:color/white" + android:visibility="gone"/> - <ImageView - android:id="@+id/image_view_best_post_item" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:scaleType="centerCrop" /> + </RelativeLayout> - <LinearLayout - android:id="@+id/load_image_error_linear_layout_best_post_item" + <RelativeLayout + android:id="@+id/image_view_wrapper_item_best_post" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="350dp" + android:layout_marginTop="16dp" android:visibility="gone"> - <TextView - android:layout_width="match_parent" + <ProgressBar + android:id="@+id/progress_bar_best_post_item" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_error_outline_black_24dp" - android:layout_gravity="center" - android:gravity="center" - android:text="@string/tap_to_retry" /> + android:layout_centerInParent="true" /> - </LinearLayout> + <ImageView + android:id="@+id/image_view_best_post_item" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="centerCrop" /> - </RelativeLayout> + <LinearLayout + android:id="@+id/load_image_error_linear_layout_best_post_item" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="gone"> - <ImageView - android:id="@+id/image_view_no_preview_link_best_post_item" - android:layout_width="match_parent" - android:layout_height="150dp" - android:layout_marginTop="16dp" - android:scaleType="center" - android:src="@drawable/ic_link" - android:background="#E0E0E0" - android:visibility="gone"/> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <TextView + 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/tap_to_retry" /> - <ImageView - android:id="@+id/plus_button_item_best_post" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:padding="16dp" - android:src="@drawable/ic_arrow_upward_black_24dp" - android:layout_centerVertical="true" - android:tint="@android:color/tab_indicator_text" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true"/> + </LinearLayout> - <TextView - android:id="@+id/score_text_view_item_best_post" - android:layout_width="64dp" - android:layout_height="match_parent" - android:layout_toEndOf="@id/plus_button_item_best_post" - android:layout_alignBottom="@id/plus_button_item_best_post" - android:layout_alignParentTop="true" - android:gravity="center"/> + </RelativeLayout> <ImageView - android:id="@+id/minus_button_item_best_post" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toEndOf="@id/score_text_view_item_best_post" - android:padding="16dp" - android:src="@drawable/ic_arrow_downward_black_24dp" - android:tint="@android:color/tab_indicator_text" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true"/> + android:id="@+id/image_view_no_preview_link_best_post_item" + android:layout_width="match_parent" + android:layout_height="150dp" + android:layout_marginTop="16dp" + android:scaleType="center" + android:src="@drawable/ic_link" + android:background="#E0E0E0" + android:visibility="gone"/> - <ImageView - android:id="@+id/share_button_item_best_post" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:padding="16dp" - android:src="@drawable/ic_share_black_24dp" - android:tint="@android:color/tab_indicator_text" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" /> - - </RelativeLayout> - - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="#F0F0F0"/> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/plus_button_item_best_post" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:padding="16dp" + android:src="@drawable/ic_arrow_upward_black_24dp" + android:layout_centerVertical="true" + android:tint="@android:color/tab_indicator_text" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true"/> + + <TextView + android:id="@+id/score_text_view_item_best_post" + android:layout_width="64dp" + android:layout_height="match_parent" + android:layout_toEndOf="@id/plus_button_item_best_post" + android:layout_alignBottom="@id/plus_button_item_best_post" + android:layout_alignParentTop="true" + android:gravity="center"/> + + <ImageView + android:id="@+id/minus_button_item_best_post" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toEndOf="@id/score_text_view_item_best_post" + android:padding="16dp" + android:src="@drawable/ic_arrow_downward_black_24dp" + android:tint="@android:color/tab_indicator_text" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true"/> + + <ImageView + android:id="@+id/share_button_item_best_post" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:padding="16dp" + android:src="@drawable/ic_share_black_24dp" + android:tint="@android:color/tab_indicator_text" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" /> + + </RelativeLayout> + + </LinearLayout> -</LinearLayout>
\ No newline at end of file +</android.support.v7.widget.CardView>
\ No newline at end of file |