text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/item_card_list_vertical_padding" android:paddingLeft="@dimen/item_card_list_horizontal_padding" android:paddingRight="@dimen/item_card_list_horizontal_padding"> <me.zhanghai.android.douya.ui.FriendlyCardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_card_horizontal_margin" android:layout_marginRight="@dimen/item_card_horizontal_margin" android:layout_marginTop="@dimen/item_card_vertical_margin" android:layout_marginBottom="@dimen/item_card_vertical_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:id="@+id/title_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin" android:paddingBottom="@dimen/card_content_vertical_space" android:background="?selectableItemBackground" android:gravity="center_vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/item_related_doulist_list_title" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/more" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textColor="?colorControlActivated" /> </LinearLayout> <me.zhanghai.android.douya.ui.AdapterLinearLayout android:id="@+id/related_doulist_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/card_content_vertical_space_half" android:orientation="vertical" /> </LinearLayout> </me.zhanghai.android.douya.ui.FriendlyCardView> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_related_doulist_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
548
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.RatioFrameLayout android:id="@+id/item" android:layout_width="wrap_content" android:layout_height="match_parent" android:foreground="?selectableItemBackground" android:theme="?darkTheme"> <ImageView android:id="@+id/cover" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" /> <View android:id="@+id/scrim" android:layout_width="match_parent" android:layout_height="@dimen/scrim_height" android:layout_gravity="bottom" /> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="@dimen/card_content_horizontal_margin" android:layout_marginRight="@dimen/card_content_horizontal_margin" android:layout_marginTop="@dimen/card_content_vertical_space" android:layout_marginBottom="@dimen/card_content_vertical_space" android:ellipsize="end" android:maxLines="2" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> </me.zhanghai.android.douya.ui.RatioFrameLayout> <Space android:id="@+id/divider" android:layout_width="@dimen/vertical_space_width" android:layout_height="0dp" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_item_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
388
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_space_half" android:paddingBottom="@dimen/card_content_vertical_space_half" android:background="?selectableItemBackground" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/follower_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_related_doulist_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
236
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="wrap_content" android:minWidth="@dimen/abc_action_button_min_width_material" android:layout_height="wrap_content" android:minHeight="@dimen/abc_action_button_min_height_material" android:layout_gravity="center" android:animateLayoutChanges="true" android:background="?attr/actionBarItemBackground"> <!-- According to abc_action_menu_item_layout.xml. --> <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="4dp" android:paddingBottom="4dp" android:gravity="center" android:scaleType="center" /> <TextView android:id="@+id/badge" android:layout_width="wrap_content" android:minWidth="14dp" android:layout_height="wrap_content" android:minHeight="14dp" android:layout_gravity="right|top" android:layout_marginTop="8dp" android:layout_marginRight="4dp" android:paddingLeft="4dp" android:paddingRight="4dp" android:gravity="center" android:textSize="10dp" android:textStyle="bold" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/action_item_badge.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
340
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/backdrop_wrapper" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/backdrop_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:foreground="?selectableItemBackground" android:theme="?darkTheme"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/backdrop" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="invisible" /> <View android:id="@+id/backdrop_scrim" android:layout_width="match_parent" android:layout_height="@dimen/scrim_height" /> <FrameLayout android:layout_width="match_parent" android:layout_height="@dimen/item_backdrop_play_layout_height"> <ImageView android:id="@+id/backdrop_play" android:layout_width="56dp" android:layout_height="56dp" android:layout_gravity="center" android:background="@drawable/item_backdrop_play_background" android:scaleType="center" android:src="@drawable/play_icon_white_36dp" android:visibility="gone" /> </FrameLayout> </FrameLayout> </FrameLayout> <me.zhanghai.android.douya.ui.ContentStateLayout android:id="@+id/contentState" android:layout_width="match_parent" android:layout_height="match_parent"> <me.zhanghai.android.douya.item.ui.ItemContentStateViewsLayout xmlns:android="path_to_url" android:id="@+id/content_state_views" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/loading" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating"> <include layout="@layout/content_state_layout_default_loading_view" /> </FrameLayout> <FrameLayout android:id="@+id/empty" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating"> <include layout="@layout/content_state_layout_default_empty_view" /> </FrameLayout> <FrameLayout android:id="@+id/error" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating"> <include layout="@layout/content_state_layout_default_error_view" /> </FrameLayout> </me.zhanghai.android.douya.item.ui.ItemContentStateViewsLayout> <me.zhanghai.android.douya.item.ui.ItemContentRecyclerView android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> </me.zhanghai.android.douya.ui.ContentStateLayout> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true"> <me.zhanghai.android.douya.ui.TransparentDoubleClickToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,048
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <com.google.android.material.internal.ForegroundLinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?colorBackgroundFloating" android:foreground="?selectableItemBackground" android:orientation="vertical"> <View android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:background="?dividerHorizontal" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/content_vertical_space" android:layout_marginBottom="@dimen/content_vertical_space" android:text="@string/item_author_title" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <TextView android:id="@+id/introduction" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:lineSpacingMultiplier="1.2" android:maxLines="4" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/content_vertical_space" android:layout_marginBottom="@dimen/content_vertical_space" android:layout_gravity="center_horizontal" android:includeFontPadding="false" android:text="@string/view_more" android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored" /> </com.google.android.material.internal.ForegroundLinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_author.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
427
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/cover" android:layout_width="@dimen/item_cover_width_square" android:layout_height="wrap_content" android:visibility="gone" /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_horizontal_margin" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/artists" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/detail" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/genres" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_music_header.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
531
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:orientation="vertical"> <LinearLayout android:id="@+id/button_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin_with_4dp_padding" android:paddingRight="@dimen/screen_edge_horizontal_margin_with_4dp_padding" android:paddingTop="@dimen/content_vertical_space_with_6dp_padding" android:paddingBottom="@dimen/content_vertical_space_with_6dp_padding" android:divider="@drawable/transparent_divider_vertical_button_bar" android:orientation="horizontal" android:showDividers="middle"> <me.zhanghai.android.douya.ui.ColoredBorderButton android:id="@+id/todo" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" style="@style/Widget.AppCompat.Button.Borderless.Colored" /> <me.zhanghai.android.douya.ui.ColoredBorderButton android:id="@+id/doing" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" style="@style/Widget.AppCompat.Button.Borderless.Colored" /> <me.zhanghai.android.douya.ui.ColoredBorderButton android:id="@+id/done" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" style="@style/Widget.AppCompat.Button.Borderless.Colored" /> </LinearLayout> <Space android:id="@+id/button_bar_space" android:layout_width="0dp" android:layout_height="@dimen/content_vertical_space" /> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout android:id="@+id/item_collection_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:background="?colorPrimaryLight" android:clipToPadding="false" android:foreground="?selectableItemBackground"> <ImageView android:id="@+id/bookmark" android:layout_width="24dp" android:layout_height="24dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:src="@drawable/bookmark_icon_white_24dp" app:tint="?textColorPrimaryDark" /> <TextView android:id="@+id/state" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/bookmark" android:layout_alignTop="@id/bookmark" android:layout_marginLeft="@dimen/content_horizontal_space" android:layout_marginTop="0.75dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?textColorPrimaryDark" /> <me.zhanghai.android.materialratingbar.MaterialRatingBar android:id="@+id/rating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="16dp" android:maxHeight="16dp" android:layout_toRightOf="@id/state" android:layout_alignTop="@id/state" android:layout_alignBottom="@id/state" android:layout_marginLeft="7dp" android:layout_marginRight="-1dp" android:layout_marginTop="-2dp" android:layout_marginBottom="-2dp" app:mrb_progressTint="?textColorPrimaryDark" style="@style/Widget.MaterialRatingBar.RatingBar.Indicator.Small" /> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/rating" android:layout_alignBottom="@id/state" android:layout_marginLeft="16dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?textColorPrimaryDark" /> <ImageButton android:id="@+id/menu" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_marginRight="-16dp" android:layout_marginTop="-6dp" android:layout_marginBottom="-6dp" android:padding="6dp" android:background="?selectableItemBackgroundBorderless" android:src="@drawable/more_vertical_icon_white_24dp" app:tint="?textColorPrimaryDark" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/comment" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@id/state" android:layout_below="@id/state" android:layout_marginRight="@dimen/content_horizontal_space" android:layout_marginTop="12dp" android:layout_marginBottom="2dp" android:lineSpacingMultiplier="1.3" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?textColorPrimaryDark" /> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> <View android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/screen_edge_horizontal_margin" android:layout_marginRight="@dimen/screen_edge_horizontal_margin" android:background="?dividerHorizontal" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_collection.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,395
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- This layout ensures correct z-order during transition. --> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/shared" android:layout_width="@dimen/card_activity_width" android:layout_height="match_parent" android:layout_gravity="center_horizontal" android:layout_marginLeft="@dimen/card_activity_horizontal_margin" android:layout_marginRight="@dimen/card_activity_horizontal_margin" android:layout_marginTop="@dimen/toolbar_height" android:layout_marginBottom="@dimen/toolbar_height" android:background="?android:colorBackground"> <androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout android:id="@+id/swipe_refresh" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/broadcast_comment_list" android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> </androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" android:visibility="gone" style="@style/Widget.MaterialProgressBar.ProgressBar" /> </FrameLayout> </FrameLayout> <!-- TODO: Add a compatible shadow. --> <!-- ~ Set android:clickable="true" so that user's touch on this layout won't be handled by parent ~ which will finish the activity. --> <LinearLayout android:layout_width="@dimen/card_activity_width" android:layout_height="wrap_content" android:minHeight="@dimen/toolbar_height" android:layout_gravity="center_horizontal|bottom" android:layout_marginLeft="@dimen/card_activity_horizontal_margin" android:layout_marginRight="@dimen/card_activity_horizontal_margin" android:paddingLeft="@dimen/toolbar_edit_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:background="?colorBackgroundFloating" android:clickable="true" android:elevation="@dimen/appbar_elevation" android:orientation="horizontal"> <me.zhanghai.android.materialedittext.MaterialEditText android:id="@+id/comment" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_gravity="center_vertical" android:layout_marginRight="@dimen/toolbar_edit_right_margin" android:hint="@string/broadcast_send_comment_hint" android:maxLines="4"> <requestFocus /> </me.zhanghai.android.materialedittext.MaterialEditText> <me.zhanghai.android.douya.ui.GetOnLongClickListenerImageButton android:id="@+id/send" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_gravity="center_vertical" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_comment" android:padding="@dimen/icon_button_padding" android:src="@drawable/send_icon_white_24dp" app:tint="?colorControlActivated" tools:ignore="MissingPrefix" /> </LinearLayout> <!-- Appbar layout must be on top of content so that transition can have correct z-order. --> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.ui.DoubleClickToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,091
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/two_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin" android:paddingBottom="@dimen/card_content_vertical_margin" android:gravity="center_vertical" android:orientation="vertical"> <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <me.zhanghai.android.douya.ui.TimeTextView android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorTertiary" /> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:background="?dividerHorizontal" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/notification_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
345
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url" xmlns:app="path_to_url"> <RelativeLayout android:id="@+id/broadcastlayout_author_time_action_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/card_content_vertical_margin_with_4dp_padding" android:layout_marginBottom="@dimen/card_content_vertical_space_with_4dp_padding" android:paddingLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:paddingRight="@dimen/card_content_horizontal_margin"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/broadcastlayout_avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:padding="@dimen/avatar_padding" /> <TextView android:id="@+id/broadcastlayout_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/broadcastlayout_avatar" android:layout_alignTop="@id/broadcastlayout_avatar" android:layout_marginLeft="@dimen/card_content_horizontal_space_with_4dp_padding" android:layout_marginTop="@dimen/avatar_padding" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textStyle="bold" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@id/broadcastlayout_name" android:layout_alignBottom="@id/broadcastlayout_avatar" android:layout_marginBottom="@dimen/avatar_padding" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.TimeTextView android:id="@+id/broadcastlayout_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <TextView android:id="@+id/broadcastlayout_time_action_space" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:text="@string/space" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <TextView android:id="@+id/broadcastlayout_action" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> </RelativeLayout> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/broadcastlayout_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_content_horizontal_margin" android:layout_marginRight="@dimen/card_content_horizontal_margin" android:layout_marginBottom="@dimen/card_content_vertical_space" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <com.google.android.material.internal.ForegroundLinearLayout android:id="@+id/broadcastlayout_rebroadcasted_attachment_images_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:foreground="?selectableItemBackground"> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout android:id="@+id/broadcastlayout_rebroadcasted_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/card_content_vertical_space" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin"> <View android:id="@+id/broadcastlayout_rebroadcasted_divider" android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:layout_alignParentTop="true" android:layout_marginBottom="@dimen/card_content_vertical_space" android:background="?dividerHorizontal" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/broadcastlayout_rebroadcasted_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@id/broadcastlayout_rebroadcasted_divider" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textStyle="bold" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/broadcastlayout_rebroadcasted_action" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/broadcastlayout_rebroadcasted_name" android:layout_alignTop="@id/broadcastlayout_rebroadcasted_name" android:layout_marginLeft="8dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/broadcastlayout_rebroadcasted_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@id/broadcastlayout_rebroadcasted_name" android:layout_marginTop="8dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/broadcastlayout_rebroadcasted_broadcast_deleted" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@id/broadcastlayout_rebroadcasted_divider" android:text="@string/broadcast_rebroadcasted_broadcast_deleted" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout android:id="@+id/broadcastlayout_attachment" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingBottom="@dimen/card_content_vertical_space" android:foreground="?selectableItemBackground"> <View android:id="@+id/broadcastlayout_divider" android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:layout_alignParentTop="true" android:layout_marginBottom="@dimen/card_content_vertical_space" android:background="?dividerHorizontal" /> <ImageView android:id="@+id/broadcastlayout_attachment_image" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignParentLeft="true" android:layout_below="@id/broadcastlayout_divider" android:layout_marginRight="16dp" android:scaleType="centerCrop" /> <TextView android:id="@+id/broadcastlayout_attachment_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/broadcastlayout_attachment_image" android:layout_below="@id/broadcastlayout_divider" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/broadcastlayout_attachment_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@id/broadcastlayout_attachment_title" android:layout_below="@id/broadcastlayout_attachment_title" android:layout_marginTop="8dp" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> <me.zhanghai.android.douya.ui.ImageLayout android:id="@+id/broadcastlayout_single_image" android:layout_width="match_parent" android:layout_height="wrap_content" android:foreground="?selectableItemBackground" android:theme="?darkTheme" app:fillOrientation="horizontal" /> <FrameLayout android:id="@+id/broadcastlayout_image_list_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="?darkTheme"> <me.zhanghai.android.douya.ui.NestedRatioHeightRecyclerView android:id="@+id/broadcastlayout_image_list" android:layout_width="match_parent" android:layout_height="wrap_content" app:ratio="6:5" /> <FrameLayout android:id="@+id/broadcastlayout_image_list_description_layout" android:layout_width="match_parent" android:layout_height="@dimen/scrim_height" android:layout_gravity="bottom"> <TextView android:id="@+id/broadcastlayout_image_list_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="@dimen/card_content_horizontal_margin" android:layout_marginRight="@dimen/card_content_horizontal_margin" android:layout_marginTop="@dimen/card_content_vertical_margin" android:layout_marginBottom="@dimen/card_content_vertical_margin" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </FrameLayout> </FrameLayout> </com.google.android.material.internal.ForegroundLinearLayout> <Space android:id="@+id/broadcastlayout_rebroadcasted_attachment_images_space" android:layout_width="0dp" android:layout_height="@dimen/card_content_vertical_space" /> <LinearLayout android:id="@+id/broadcastlayout_actions" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/card_content_vertical_margin_small" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.CardIconButton android:id="@+id/broadcastlayout_like" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/broadcast_like" android:src="@drawable/like_icon_white_18dp" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <me.zhanghai.android.douya.ui.CardIconButton android:id="@+id/broadcastlayout_comment" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="16dp" android:contentDescription="@string/broadcast_comment" android:src="@drawable/comment_icon_white_18dp" /> <me.zhanghai.android.douya.ui.CardIconButton android:id="@+id/broadcastlayout_rebroadcast" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/broadcast_rebroadcast" android:src="@drawable/rebroadcast_icon_white_18dp" /> </LinearLayout> </merge> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
2,647
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_with_avatar_height" android:paddingLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:gravity="center_vertical" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:padding="@dimen/avatar_padding" /> <TextView android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_content_horizontal_space_with_4dp_padding" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_user_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
261
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <!-- Use Theme.Douya for ?dividerHorizontal --> <View android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:layout_gravity="bottom" android:background="?dividerHorizontal" android:theme="@style/Theme.Douya" /> <com.google.android.material.tabs.TabLayout android:id="@+id/tab" android:layout_width="match_parent" android:layout_height="wrap_content" /> </FrameLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:minHeight="48dp"> <androidx.viewpager.widget.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_gravity="bottom" android:background="?colorControlHighlight"/> </FrameLayout> <include layout="@layout/abc_alert_dialog_button_bar_material" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_activity_dialog_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
336
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <com.google.android.material.internal.ForegroundLinearLayout xmlns:android="path_to_url" android:layout_width="wrap_content" android:layout_height="wrap_content" android:foreground="?selectableItemBackground" android:orientation="vertical"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/avatar" android:layout_width="wrap_content" android:layout_height="@dimen/item_celebrity_avatar_height" android:scaleType="centerCrop" /> <TextView android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" android:ellipsize="end" android:gravity="center_horizontal" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/description" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:gravity="center_horizontal" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </com.google.android.material.internal.ForegroundLinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_celebrity_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
295
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url"> <!-- LayoutParams will be set the same as parent after inflation. --> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/imagelayout_image" android:layout_width="wrap_content" android:minWidth="@dimen/image_min_width" android:layout_height="wrap_content" android:maxHeight="@dimen/image_max_height" /> <ImageView android:id="@+id/imagelayout_gif" android:layout_width="36dp" android:layout_height="36dp" android:layout_marginLeft="@dimen/card_content_horizontal_margin" android:layout_marginRight="@dimen/card_content_horizontal_margin" android:layout_marginTop="@dimen/card_content_vertical_space" android:layout_marginBottom="@dimen/card_content_vertical_space" android:layout_gravity="left|bottom" android:background="@color/dark_30_percent" android:src="@drawable/gif_icon_white_36dp" /> </merge> ```
/content/code_sandbox/app/src/main/res/layout/image_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
249
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" tools:parentTag="android.widget.LinearLayout" tools:orientation="horizontal"> <TextView android:id="@+id/rating_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-2.5dp" android:layout_marginTop="-13dp" android:layout_marginBottom="-13dp" android:paddingTop="2dp" android:fontFamily="sans-serif-light" android:includeFontPadding="false" android:textAppearance="@style/TextAppearance.AppCompat.Display3" android:textColor="?android:textColorPrimary" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:layout_marginTop="-13dp" android:baselineAlignedChildIndex="1" android:orientation="vertical"> <me.zhanghai.android.materialratingbar.MaterialRatingBar android:id="@+id/rating_bar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-1dp" android:layout_marginRight="-1dp" android:layout_marginTop="-2dp" android:layout_marginBottom="-2dp" android:minHeight="14dp" android:maxHeight="14dp" app:mrb_progressTint="?android:textColorSecondary" style="@style/Widget.MaterialRatingBar.RatingBar.Indicator.Small" /> <include layout="@layout/item_rating_count_layout"/> </LinearLayout> </merge> ```
/content/code_sandbox/app/src/main/res/layout/item_rating_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
411
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_with_avatar_height" android:orientation="horizontal" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?attr/selectableItemBackground" android:gravity="center_vertical"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="@dimen/avatar_size" android:layout_height="@dimen/avatar_size" /> <TextView android:id="@+id/name" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_marginLeft="@dimen/content_horizontal_margin_from_screen_edge_with_40dp_padding" android:ellipsize="end" android:textAppearance="@style/TextAppearance.AppCompat.Body2" android:maxLines="1" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/navigation_account_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
253
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url"> <!-- ~ Unable to use a SwipeRefreshLayout here, because web page can set an onTouchListener for ~ custom scrolling, but SwipeRefreshLayout has no knowledge of this and will intercept the ~ touch event. --> <WebView android:id="@+id/web" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" /> <!-- Don't set background color on this layout because it will mess up with wrap_content. --> <!-- Appbar layout must be on top of content so that transition can have correct z-order. --> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="?actionBarTheme"> <include layout="@layout/webview_acitivity_toolbar" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </merge> ```
/content/code_sandbox/app/src/main/res/layout/webview_activity.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
253
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.navigation.ui.NavigationAccountListLayout xmlns:android="path_to_url" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" /> ```
/content/code_sandbox/app/src/main/res/layout/navigation_account_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
76
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:orientation="vertical"> <View android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/screen_edge_horizontal_margin" android:layout_marginRight="@dimen/screen_edge_horizontal_margin" android:background="?dividerHorizontal" /> <LinearLayout android:id="@+id/introduction_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?selectableItemBackground" android:gravity="center_horizontal" android:orientation="vertical"> <TextView android:id="@+id/introduction" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/content_horizontal_space_with_4dp_padding" android:layout_marginRight="@dimen/content_horizontal_space_with_4dp_padding" android:layout_marginTop="@dimen/content_vertical_space_with_4dp_padding" android:layout_marginBottom="@dimen/content_vertical_space_with_4dp_padding" android:ellipsize="end" android:gravity="center_horizontal" android:lineSpacingMultiplier="1.2" android:maxLines="4" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-1dp" android:layout_marginBottom="@dimen/content_vertical_space" android:includeFontPadding="false" android:text="@string/view_more" android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored" /> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_introduction.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
482
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/item_collection_list_title" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <me.zhanghai.android.douya.ui.ColoredBorderButton android:id="@+id/create" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="0dp" android:minHeight="0dp" android:layout_marginLeft="-4dp" android:layout_marginRight="-4dp" android:layout_marginTop="-6dp" android:layout_marginBottom="-6dp" android:padding="6dp" android:text="@string/item_collection_list_create" android:textSize="@dimen/abc_text_size_caption_material" style="@style/Widget.AppCompat.Button.Borderless.Colored" /> </LinearLayout> <me.zhanghai.android.douya.ui.AdapterLinearLayout android:id="@+id/item_collection_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <Button android:id="@+id/view_more" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:includeFontPadding="false" android:text="@string/item_collection_list_view_more" android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_collection_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
570
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/uploadimagelayout_image" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <ImageView android:id="@+id/uploadimagelayout_gif" android:layout_width="36dp" android:layout_height="36dp" android:layout_gravity="left|bottom" android:layout_marginLeft="@dimen/card_content_horizontal_margin" android:layout_marginRight="@dimen/card_content_horizontal_margin" android:layout_marginTop="@dimen/card_content_vertical_space" android:layout_marginBottom="@dimen/card_content_vertical_space" android:background="@color/dark_30_percent" android:src="@drawable/gif_icon_white_36dp" /> <me.zhanghai.android.douya.ui.ForegroundImageButton android:id="@+id/uploadimagelayout_remove" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="right|top" android:padding="12dp" android:background="@null" android:foreground="@drawable/selectable_item_background_oval" android:src="@drawable/remove_image_icon_24dp" /> </merge> ```
/content/code_sandbox/app/src/main/res/layout/upload_image_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
310
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:id="@+id/settings" android:name="me.zhanghai.android.douya.settings.ui.SettingsFragment" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" /> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </LinearLayout> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/settings_activity_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
358
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <View android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" /> <me.zhanghai.android.douya.ui.NestedRecyclerView android:id="@+id/photo_list" android:layout_width="match_parent" android:layout_height="@dimen/item_photo_list_height" android:paddingLeft="@dimen/item_content_horizontal_margin" android:clipToPadding="false" android:scrollbarStyle="outsideOverlay" /> </FrameLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating"> <Button android:id="@+id/view_more" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:background="?selectableItemBackground" android:includeFontPadding="false" android:text="@string/item_photo_list_view_more" android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored" /> </FrameLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_photo_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
401
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/item_forum_topic_list_title" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <me.zhanghai.android.douya.ui.ColoredBorderButton android:id="@+id/create" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="0dp" android:minHeight="0dp" android:layout_marginLeft="-4dp" android:layout_marginRight="-4dp" android:layout_marginTop="-6dp" android:layout_marginBottom="-6dp" android:padding="6dp" android:text="@string/item_forum_topic_list_create" android:textSize="@dimen/abc_text_size_caption_material" style="@style/Widget.AppCompat.Button.Borderless.Colored" /> </LinearLayout> <me.zhanghai.android.douya.ui.AdapterLinearLayout android:id="@+id/forum_topic_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <Button android:id="@+id/view_more" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:includeFontPadding="false" android:text="@string/item_forum_topic_list_view_more" android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_forum_topic_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
573
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url"> <!-- See AppCompatImageView for app:tint . --> <ImageView android:id="@+id/cardiconbutton_image" android:layout_width="36dp" android:layout_height="36dp" android:padding="9dp" android:background="@drawable/card_icon_button_background" android:duplicateParentState="true" app:tint="@drawable/card_icon_button_tint" tools:ignore="MissingPrefix" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/cardiconbutton_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </merge> ```
/content/code_sandbox/app/src/main/res/layout/card_icon_button.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
237
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.profile.ui.ProfileLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".profile.ui.ProfileActivity"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <me.zhanghai.android.douya.profile.ui.ProfileHeaderLayout android:id="@+id/header" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="@dimen/appbar_elevation"> <View android:id="@+id/dismiss" android:layout_width="match_parent" android:layout_height="0dp" /> <LinearLayout android:id="@+id/appBar" android:layout_width="match_parent" android:layout_height="0dp" android:background="?colorPrimary" android:clipChildren="false" android:orientation="vertical" android:theme="?actionBarTheme"> <include layout="@layout/profile_header_appbar_content_include" /> </LinearLayout> <include layout="@layout/profile_header_avatar_include" /> </me.zhanghai.android.douya.profile.ui.ProfileHeaderLayout> <me.zhanghai.android.douya.profile.ui.ProfileContentLayout android:id="@+id/contentState" android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme"> <!-- NOTE: Theme will be reset back to Theme.Douya in ProfileDataAdapter. --> <me.zhanghai.android.douya.ui.FlexibleSpaceContentRecyclerView android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/card_list_horizontal_padding" android:paddingRight="@dimen/card_list_horizontal_padding" android:paddingTop="@dimen/card_vertical_space_half" android:paddingBottom="@dimen/card_vertical_space_half" android:clipToPadding="false" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> </me.zhanghai.android.douya.profile.ui.ProfileContentLayout> </FrameLayout> </me.zhanghai.android.douya.profile.ui.ProfileLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_fragment_wide.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
553
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:background="?selectableItemBackground" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="5.5dp" android:paddingBottom="0.5dp" android:clipToPadding="false" android:gravity="center_vertical" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="16dp" android:layout_height="16dp" android:layout_marginBottom="-0.5dp" /> <TextView android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <TextView android:id="@+id/like_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <TextView android:id="@+id/comment_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <me.zhanghai.android.douya.ui.TimeTextView android:id="@+id/update_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:text="@string/item_forum_topic_update" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_forum_topic_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
659
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.profile.ui.ProfileLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".profile.ui.ProfileActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <me.zhanghai.android.douya.profile.ui.ProfileHeaderLayout android:id="@+id/header" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="@dimen/appbar_elevation"> <View android:id="@+id/dismiss" android:layout_width="match_parent" android:layout_height="0dp" /> <LinearLayout android:id="@+id/appBar" android:layout_width="match_parent" android:layout_height="0dp" android:background="?colorPrimary" android:clipChildren="false" android:orientation="vertical" android:theme="?actionBarTheme"> <include layout="@layout/profile_header_appbar_content_include" /> </LinearLayout> <include layout="@layout/profile_header_avatar_include" /> </me.zhanghai.android.douya.profile.ui.ProfileHeaderLayout> <me.zhanghai.android.douya.profile.ui.ProfileContentLayout android:id="@+id/contentState" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?android:colorBackground"> <me.zhanghai.android.douya.ui.FlexibleSpaceContentRecyclerView android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/card_list_horizontal_padding" android:paddingRight="@dimen/card_list_horizontal_padding" android:paddingTop="@dimen/card_vertical_space_half" android:paddingBottom="@dimen/card_vertical_space_half" android:clipToPadding="false" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> <include layout="@layout/appbar_shadow_compat" /> </me.zhanghai.android.douya.profile.ui.ProfileContentLayout> </LinearLayout> </me.zhanghai.android.douya.profile.ui.ProfileLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
540
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileReviewsLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_reviews_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
183
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin_with_16dp_padding" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:background="?selectableItemBackground" android:clickable="true" android:focusable="true" android:gravity="center_vertical" android:orientation="horizontal"> <FrameLayout android:layout_width="56dp" android:layout_height="match_parent"> <TextView android:id="@+id/number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.materialplaypausedrawable.MaterialPlayPauseView android:id="@+id/play_pause" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:visibility="gone" app:tint="?colorControlActivated" tools:ignore="MissingPrefix" /> </FrameLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/duration" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_track_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
512
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <com.github.chrisbanes.photoview.PhotoView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone" /> <me.zhanghai.android.douya.ui.SaveStateSubsamplingScaleImageView android:id="@+id/largeImage" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone" /> <TextView android:id="@+id/error" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Title" android:visibility="gone" /> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:visibility="gone" app:mpb_setBothDrawables="true" app:mpb_showProgressBackground="true" style="@style/Widget.MaterialProgressBar.ProgressBar" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/gallery_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
337
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/cover" android:layout_width="@dimen/item_cover_width_long" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_cover_horizontal_margin" android:layout_marginTop="@dimen/item_cover_vertical_margin" /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_horizontal_margin" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/subtitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/authors" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/translators" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/detail" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/genres" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_book_header.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
721
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="?dividerHorizontal" android:showDividers="middle" android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:theme="?actionBarTheme" app:navigationIcon="@drawable/close_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_vertical_margin" android:paddingBottom="@dimen/screen_edge_vertical_margin"> <TextView android:id="@+id/table_of_contents" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/content_horizontal_space_with_4dp_padding" android:layout_marginRight="@dimen/content_horizontal_space_with_4dp_padding" android:layout_marginTop="@dimen/content_vertical_space_with_4dp_padding" android:layout_marginBottom="@dimen/content_vertical_space_with_4dp_padding" android:lineSpacingMultiplier="1.2" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textIsSelectable="true" /> </FrameLayout> </ScrollView> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_table_of_contents_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
449
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="36dp" android:paddingRight="36dp" android:background="@android:color/white" android:orientation="vertical" tools:ignore="SpUsage"> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="@color/calendar_secondary_text_light" android:textSize="16dp" /> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/chinese_calendar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/calendar_chinese_calendar" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="@color/calendar_secondary_text_light" android:textSize="16dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/day_of_week" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="@color/calendar_secondary_text_light" android:textSize="16dp" /> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/chinese_calendar_date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="@color/calendar_secondary_text_light" android:textSize="16dp" /> </LinearLayout> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/day_of_month" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="-47dp" android:layout_marginBottom="-51dp" android:includeFontPadding="false" android:textAppearance="@style/TextAppearance.AppCompat.Display1" android:textSize="220dp" /> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <FrameLayout android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/calendar_secondary_text_light" /> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/comment" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="@color/calendar_secondary_text_light" android:textSize="16dp" /> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <LinearLayout android:id="@+id/movie" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-9dp" android:ellipsize="middle" android:singleLine="true" android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textSize="18dp" android:textStyle="bold" /> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical"> <ProgressBar android:id="@+id/rating" android:layout_width="80dp" android:layout_height="16dp" android:minHeight="16dp" android:maxHeight="16dp" android:layout_marginLeft="-1.5dp" android:layout_marginRight="-1.5dp" android:indeterminateDrawable="@null" android:indeterminateOnly="false" android:progressDrawable="@drawable/calendar_rating_progress" /> <TextView android:id="@+id/rating_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="6dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="@color/calendar_control_activated" android:textSize="14dp" /> </LinearLayout> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/event" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-9dp" android:ellipsize="middle" android:singleLine="true" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textSize="14dp" /> </LinearLayout> <!-- ~ Must set a fixed height here because both LinearLayout and RelativeLayout cannot handle ~ ImageView adjustViewBounds correctly. --> <ImageView android:id="@+id/poster" android:layout_width="wrap_content" android:layout_height="59dp" android:layout_marginTop="3dp" android:layout_marginBottom="3dp" android:adjustViewBounds="true" /> </LinearLayout> <FrameLayout android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/calendar_appwidget.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,519
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" android:fillViewport="true"> <LinearLayout android:id="@+id/text_and_broadcast" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <EditText android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_vertical_margin" android:paddingBottom="@dimen/screen_edge_vertical_margin" android:background="@null" android:gravity="top" android:hint="@string/broadcast_rebroadcast_text_hint"> <requestFocus /> </EditText> <me.zhanghai.android.douya.broadcast.ui.BroadcastLayout android:id="@+id/broadcast" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </ScrollView> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" android:visibility="gone" style="@style/Widget.MaterialProgressBar.ProgressBar" /> <!-- Appbar layout must be on top of content so that transition can have correct z-order. --> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/close_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_rebroadcast_broadcast_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
617
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:layout_marginTop="@dimen/item_cover_vertical_margin" android:background="?colorBackgroundFloating" android:clipToPadding="false" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/cover" android:layout_width="@dimen/item_cover_width_long" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_cover_horizontal_margin" android:layout_marginTop="@dimen/item_cover_vertical_margin_negative" /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_horizontal_margin" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/platforms" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/detail" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/genres" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> </LinearLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_game_header.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
612
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="?dividerHorizontal" android:showDividers="middle" android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:theme="?actionBarTheme" app:navigationIcon="@drawable/close_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true"> <me.zhanghai.android.douya.ui.TallFrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <include layout="@layout/calendar_layout" /> </me.zhanghai.android.douya.ui.TallFrameLayout> </ScrollView> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/calendar_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
299
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.ImageLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="match_parent" android:foreground="?selectableItemBackground" android:theme="?darkTheme" app:fillOrientation="vertical" /> ```
/content/code_sandbox/app/src/main/res/layout/horizontal_image_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
108
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="?dividerHorizontal" android:orientation="vertical" android:showDividers="middle"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:ellipsize="end" android:gravity="center_vertical" android:maxLines="1" android:text="@string/profile_introduction_title" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoLinkTextView android:id="@+id/content" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin" android:paddingBottom="@dimen/card_content_vertical_margin" android:gravity="center_vertical" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_introduction_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
331
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/two_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin" android:paddingBottom="@dimen/card_content_vertical_margin" android:foreground="?selectableItemBackground"> <ImageView android:id="@+id/image" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginRight="16dp" android:scaleType="centerCrop" /> <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/image" android:layout_alignParentTop="true" android:ellipsize="end" android:maxLines="3" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/image" android:layout_alignBottom="@id/image" android:layout_below="@id/text" android:layout_marginTop="8dp" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.TimeTextView android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:gravity="bottom" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <TextView android:id="@+id/time_action_space" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:gravity="bottom" android:maxLines="1" android:text="@string/space" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <TextView android:id="@+id/action" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:gravity="bottom" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_broadcast_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
602
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="?dividerHorizontal" android:orientation="vertical" android:showDividers="middle"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:ellipsize="end" android:gravity="center_vertical" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.NestedRatioHeightRecyclerView android:id="@+id/item_list" android:layout_width="match_parent" android:layout_height="wrap_content" app:ratio="3:2" /> <TextView android:id="@+id/empty" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:gravity="center_vertical" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/view_more" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:clickable="true" android:drawableLeft="@drawable/forward_icon_white_24dp" android:drawablePadding="@dimen/card_content_horizontal_space_with_4dp_padding" android:ellipsize="end" android:focusable="true" android:gravity="center_vertical" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" app:drawableTint="?android:textColorSecondary" /> <TextView android:id="@+id/secondary" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:clickable="true" android:ellipsize="end" android:focusable="true" android:gravity="center_vertical" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/tertiary" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:clickable="true" android:ellipsize="end" android:focusable="true" android:gravity="center_vertical" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_items_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
790
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <androidx.appcompat.widget.Toolbar xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:elevation="@dimen/appbar_elevation" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:background="?colorPrimary" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin"> <include layout="@layout/toolbar_progress"/> </androidx.appcompat.widget.Toolbar> ```
/content/code_sandbox/app/src/main/res/layout/webview_acitivity_toolbar.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
184
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="?dividerHorizontal" android:showDividers="middle" android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:theme="?actionBarTheme" app:navigationIcon="@drawable/close_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="?dividerHorizontal" android:dividerPadding="@dimen/screen_edge_horizontal_margin" android:orientation="vertical" android:showDividers="middle"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_vertical_margin" android:paddingBottom="@dimen/screen_edge_vertical_margin"> <TextView android:id="@+id/introduction" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/content_horizontal_space_with_4dp_padding" android:layout_marginRight="@dimen/content_horizontal_space_with_4dp_padding" android:layout_marginTop="@dimen/content_vertical_space_with_4dp_padding" android:layout_marginBottom="@dimen/content_vertical_space_with_4dp_padding" android:lineSpacingMultiplier="1.2" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textIsSelectable="true" /> </FrameLayout> <me.zhanghai.android.douya.ui.AdapterGridLinearLayout android:id="@+id/information" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:divider="@drawable/transparent_divider_horizontal_16dp" android:orientation="vertical" android:showDividers="middle" /> </LinearLayout> </ScrollView> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_introduction_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
643
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.UploadImageLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="match_parent" android:foreground="?selectableItemBackground" android:theme="?darkTheme" app:fillOrientation="vertical" /> ```
/content/code_sandbox/app/src/main/res/layout/horizontal_upload_image_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
110
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" android:theme="?actionBarTheme"> <LinearLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_horizontal_margin" android:paddingBottom="@dimen/screen_edge_horizontal_margin" android:gravity="center" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-24dp" android:text="@string/about_name" android:textAppearance="@style/TextAppearance.AppCompat.Display4" android:textColor="?android:attr/textColorPrimary" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_words" android:textAppearance="@style/TextAppearance.AppCompat.Headline" /> <TextView android:id="@+id/version" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="48dp" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:text="@string/about_credit" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <Button android:id="@+id/douban" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="-16dp" android:text="@string/about_douban" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" style="?borderlessButtonStyle" /> </LinearLayout> </ScrollView> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:theme="?actionBarTheme" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/about_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
610
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <RelativeLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:id="@+id/rating_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Caption"/> <ImageView android:id="@+id/rating_count_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/rating_count" android:layout_alignBaseline="@id/rating_count" android:layout_marginLeft="2dp" android:baselineAlignBottom="true" android:src="@drawable/person_icon_white_8dp" app:tint="?android:textColorSecondary" tools:ignore="MissingPrefix" /> </RelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_rating_count_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
230
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <ScrollView xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="vertical"> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <!-- Using android:layout_marginTop here to compensate for CardView's margin. --> <!-- Using dp as unit for android:textSize because this TextView functions as imagery. --> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/screen_edge_horizontal_margin" android:ellipsize="end" android:gravity="center" android:maxLines="1" android:text="@string/app_name" android:textColor="@android:color/white" android:textSize="72dp" tools:ignore="SpUsage" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <!-- Using app:cardMaxElevation as margin. --> <me.zhanghai.android.douya.ui.FriendlyCardView android:layout_width="@dimen/card_view_width" android:layout_height="wrap_content" android:layout_marginTop="@dimen/screen_edge_horizontal_margin_negative_half" android:layout_marginBottom="@dimen/screen_edge_horizontal_margin_negative_half" app:cardMaxElevation="@dimen/screen_edge_horizontal_margin"> <LinearLayout android:id="@+id/form" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <me.zhanghai.android.materialedittext.MaterialTextInputLayout android:id="@+id/username_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:layout_marginRight="@dimen/card_content_horizontal_margin_with_4dp_padding" android:layout_marginTop="@dimen/card_content_vertical_margin_large" android:hint="@string/auth_username" app:errorEnabled="true"> <me.zhanghai.android.materialedittext.MaterialEditText android:id="@+id/username" android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textEmailAddress" /> </me.zhanghai.android.materialedittext.MaterialTextInputLayout> <me.zhanghai.android.materialedittext.MaterialTextInputLayout android:id="@+id/password_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:layout_marginRight="@dimen/card_content_horizontal_margin_with_4dp_padding" android:hint="@string/auth_password" app:errorEnabled="true" app:passwordToggleEnabled="true"> <me.zhanghai.android.materialedittext.MaterialEditText android:id="@+id/password" android:layout_width="match_parent" android:layout_height="wrap_content" android:imeActionId="@integer/ime_action_done" android:imeActionLabel="@string/auth_sign_in" android:imeOptions="actionDone" android:inputType="textPassword" /> </me.zhanghai.android.materialedittext.MaterialTextInputLayout> <Button android:id="@+id/sign_in" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_marginLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:layout_marginRight="@dimen/card_content_horizontal_margin_with_4dp_padding" android:text="@string/auth_sign_in" android:textAppearance="?android:textAppearanceButton" android:theme="?darkTheme" style="@style/Widget.AppCompat.Button.Colored" /> <Button android:id="@+id/sign_up" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_marginLeft="@dimen/card_action_margin_with_4dp_padding" android:layout_marginRight="@dimen/card_action_margin_with_4dp_padding" android:layout_marginTop="@dimen/card_action_margin" android:layout_marginBottom="@dimen/card_action_margin" android:text="@string/auth_sign_up" android:textColor="?android:textColorLink" style="?borderlessButtonStyle" /> </LinearLayout> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" android:visibility="invisible" style="@style/Widget.MaterialProgressBar.ProgressBar" /> </me.zhanghai.android.douya.ui.FriendlyCardView> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="@dimen/weight_1_when_tablet" /> </LinearLayout> </ScrollView> ```
/content/code_sandbox/app/src/main/res/layout/authenticator_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,221
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.navigation.ui.NavigationHeaderLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="@dimen/navigation_header_height" android:theme="?actionBarTheme" /> ```
/content/code_sandbox/app/src/main/res/layout/navigation_header.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
80
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.DispatchInsetsDrawerLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:id="@+id/drawer" android:layout_height="match_parent" android:layout_width="match_parent" tools:context=".main.ui.MainActivity"> <me.zhanghai.android.douya.ui.InsetBackgroundFrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:insetBackground="?colorPrimaryDarkWithoutSystemWindowScrim" /> <fragment android:id="@+id/navigation_fragment" android:name="me.zhanghai.android.douya.navigation.ui.NavigationFragment" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" tools:layout="@layout/navigation_fragment" /> <me.zhanghai.android.douya.ui.MaxDimensionDispatchInsetsFrameLayout android:id="@+id/notification_list_drawer" android:layout_width="wrap_content" android:maxWidth="@dimen/drawer_max_width" android:layout_height="match_parent" android:layout_gravity="end" android:background="?android:colorBackground" /> </me.zhanghai.android.douya.ui.DispatchInsetsDrawerLayout> ```
/content/code_sandbox/app/src/main/res/layout/main_activity.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
330
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".main.ui.MainActivity"> <FrameLayout android:id="@+id/broadcast_list_fragment" android:layout_width="match_parent" android:layout_height="match_parent" /> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.ui.DoubleClickToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_list_activity_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
324
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <com.google.android.material.internal.ForegroundLinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?colorBackgroundFloating" android:foreground="?selectableItemBackground" android:orientation="vertical"> <View android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:background="?dividerHorizontal" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/content_vertical_space" android:layout_marginBottom="@dimen/content_vertical_space" android:text="@string/item_table_of_contents_title" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <TextView android:id="@+id/table_of_contents" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:lineSpacingMultiplier="1.2" android:maxLines="4" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/content_vertical_space" android:layout_marginBottom="@dimen/content_vertical_space" android:layout_gravity="center_horizontal" android:includeFontPadding="false" android:text="@string/view_more" android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored" /> </com.google.android.material.internal.ForegroundLinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_table_of_contents.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
430
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="?dividerHorizontal" android:orientation="vertical" android:showDividers="middle"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:ellipsize="end" android:gravity="center_vertical" android:maxLines="1" android:text="@string/profile_broadcasts_title" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" /> <LinearLayout android:id="@+id/broadcast_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="?dividerHorizontal" android:dividerPadding="@dimen/card_content_horizontal_margin" android:orientation="vertical" android:showDividers="middle" /> <TextView android:id="@+id/empty" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:gravity="center_vertical" android:text="@string/profile_broadcasts_empty" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/view_more" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin_with_4dp_padding" android:paddingRight="@dimen/card_content_horizontal_margin" android:background="?selectableItemBackground" android:clickable="true" android:drawableLeft="@drawable/forward_icon_white_24dp" android:drawablePadding="@dimen/card_content_horizontal_space_with_4dp_padding" android:drawableTint="?android:textColorSecondary" android:ellipsize="end" android:focusable="true" android:gravity="center_vertical" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" app:drawableTint="?android:textColorSecondary" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_broadcasts_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
584
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileBroadcastsLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_broadcasts_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
184
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.materialprogressbar.MaterialProgressBar xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/toolbar_progress" android:layout_width="@dimen/icon_size" android:layout_height="@dimen/icon_size" android:layout_gravity="right|center_vertical" android:layout_margin="@dimen/icon_button_padding" android:indeterminate="true" app:mrb_progressTint="@android:color/white" style="@style/Widget.MaterialProgressBar.ProgressBar"/> ```
/content/code_sandbox/app/src/main/res/layout/toolbar_progress.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
142
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <com.google.android.material.internal.ForegroundLinearLayout xmlns:android="path_to_url" android:layout_width="wrap_content" android:layout_height="wrap_content" android:foreground="?selectableItemBackground" android:orientation="vertical"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/cover" android:layout_width="wrap_content" android:layout_height="@dimen/item_recommendation_cover_height" android:scaleType="centerCrop" /> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textColor="?android:textColorPrimary" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical"> <TextView android:id="@+id/rating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> <TextView android:id="@+id/rating_star" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="2dp" android:text="" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textSize="8sp" /> </LinearLayout> </com.google.android.material.internal.ForegroundLinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_recommendation_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
380
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/card_vertical_margin"> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" style="@style/Widget.MaterialProgressBar.ProgressBar" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/load_more_card_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
140
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/two_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin" android:paddingBottom="@dimen/card_content_vertical_margin" android:foreground="?selectableItemBackground"> <ImageView android:id="@+id/cover" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginRight="16dp" android:scaleType="centerCrop" /> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/cover" android:layout_alignParentTop="true" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <TextView android:id="@+id/abstract_" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/cover" android:layout_below="@id/title" android:layout_marginTop="8dp" android:ellipsize="end" android:maxLines="3" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_review_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
414
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="wrap_content" android:layout_height="wrap_content" tools:parentTag="android.widget.HorizontalScrollView"> <LinearLayout android:id="@+id/badge_list" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="horizontal"> <LinearLayout android:id="@+id/top_250_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/item_badge_list_space" android:background="?selectableItemBackgroundBorderless" android:gravity="center_horizontal" android:orientation="vertical"> <FrameLayout android:layout_width="@dimen/item_badge_size" android:layout_height="@dimen/item_badge_size"> <TextView android:id="@+id/top_250_rank" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/item_badge_circle_outline_white" android:gravity="center" android:textColor="?android:textColorSecondary" android:textSize="24dp" app:backgroundTint="?colorAccent" tools:ignore="MissingPrefix,SpUsage" /> <TextView android:id="@+id/top_250_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|bottom" android:paddingLeft="4.5dp" android:paddingRight="4.5dp" android:paddingTop="2.5dp" android:paddingBottom="2dp" android:background="@drawable/item_badge_circle_outline_white" android:includeFontPadding="false" android:text="@string/item_top_250_badge" android:textColor="?android:textColorPrimary" android:textSize="9dp" android:theme="?darkTheme" app:backgroundTint="?colorAccent" tools:ignore="MissingPrefix,SpUsage" /> </FrameLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6dp" android:text="@string/item_top_250" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> <LinearLayout android:id="@+id/rating_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackgroundBorderless" android:gravity="center_horizontal" android:orientation="vertical"> <LinearLayout android:id="@+id/rating_badge" android:layout_width="@dimen/item_badge_size" android:layout_height="@dimen/item_badge_size" android:gravity="center" android:orientation="vertical" android:theme="?darkTheme"> <TextView android:id="@+id/rating_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-4dp" android:layout_marginBottom="-2dp" android:includeFontPadding="false" android:textColor="?android:textColorPrimary" android:textSize="22dp" android:textStyle="bold" tools:ignore="SpUsage" /> <me.zhanghai.android.materialratingbar.MaterialRatingBar android:id="@+id/rating_bar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-0.5dp" android:layout_marginRight="-0.5dp" android:layout_marginTop="-1dp" android:layout_marginBottom="-1dp" android:minHeight="7.5dp" android:maxHeight="7.5dp" app:mrb_progressTint="?android:textColorPrimary" style="@style/Widget.MaterialRatingBar.RatingBar.Indicator.Small" /> </LinearLayout> <include layout="@layout/item_rating_count_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6dp" /> </LinearLayout> <LinearLayout android:id="@+id/followings_rating_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_badge_list_space" android:background="?selectableItemBackgroundBorderless" android:gravity="center_horizontal" android:orientation="vertical"> <LinearLayout android:id="@+id/followings_rating_badge" android:layout_width="@dimen/item_badge_size" android:layout_height="@dimen/item_badge_size" android:gravity="center" android:orientation="vertical" android:theme="?darkTheme"> <TextView android:id="@+id/followings_rating_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-4dp" android:layout_marginBottom="-2dp" android:includeFontPadding="false" android:textColor="?android:textColorPrimary" android:textSize="22dp" android:textStyle="bold" tools:ignore="SpUsage" /> <me.zhanghai.android.materialratingbar.MaterialRatingBar android:id="@+id/followings_rating_bar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-0.5dp" android:layout_marginRight="-0.5dp" android:layout_marginTop="-1dp" android:layout_marginBottom="-1dp" android:minHeight="7.5dp" android:maxHeight="7.5dp" app:mrb_progressTint="?android:textColorPrimary" style="@style/Widget.MaterialRatingBar.RatingBar.Indicator.Small" /> </LinearLayout> <include layout="@layout/item_followings_rating_count_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6dp" /> </LinearLayout> <LinearLayout android:id="@+id/genre_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_badge_list_space" android:background="?selectableItemBackgroundBorderless" android:gravity="center_horizontal" android:orientation="vertical"> <ImageView android:id="@+id/genre_badge" android:layout_width="@dimen/item_badge_size" android:layout_height="@dimen/item_badge_size" android:padding="@dimen/item_badge_padding" android:background="@drawable/item_badge_circle_filled_white" app:backgroundTint="?colorAccent" tools:ignore="MissingPrefix" /> <TextView android:id="@+id/genre_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6dp" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> <LinearLayout android:id="@+id/similar_items_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_badge_list_space" android:background="?selectableItemBackgroundBorderless" android:gravity="center_horizontal" android:orientation="vertical"> <ImageView android:layout_width="@dimen/item_badge_size" android:layout_height="@dimen/item_badge_size" android:padding="@dimen/item_badge_padding" android:background="@drawable/item_badge_circle_filled_white" android:src="@drawable/similar_items_badge_white_40dp" app:backgroundTint="?colorAccent" tools:ignore="MissingPrefix" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6dp" android:text="@string/item_similar_items" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> </LinearLayout> </merge> ```
/content/code_sandbox/app/src/main/res/layout/item_badge_list_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,846
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginLeft="@dimen/screen_edge_horizontal_margin" android:layout_marginRight="@dimen/screen_edge_horizontal_margin" android:text="@string/not_yet_implemented" android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textColor="?android:textColorSecondary" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/not_yet_implemented_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
154
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" android:fillViewport="true"> <EditText android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_vertical_margin" android:paddingBottom="@dimen/screen_edge_vertical_margin" android:background="@null" android:gravity="top" android:hint="@string/broadcast_send_comment_hint"> <requestFocus /> </EditText> </ScrollView> <!-- Appbar layout must be on top of content so that transition can have correct z-order. --> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/close_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_send_comment_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
448
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileBooksLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_books_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
183
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:layout_marginTop="@dimen/item_cover_vertical_margin" android:background="?colorBackgroundFloating" android:clipToPadding="false" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.RatioImageView android:id="@+id/poster" android:layout_width="@dimen/item_cover_width_long" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_cover_horizontal_margin" android:layout_marginTop="@dimen/item_cover_vertical_margin_negative" /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_horizontal_margin" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/original_title" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/detail" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/genres" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> </LinearLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_movie_header.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
612
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileFollowshipLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_followship_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
184
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileIntroductionLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_introduction_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
183
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin_with_12dp_padding" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin_with_12dp_padding" android:paddingBottom="@dimen/card_content_vertical_margin"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:padding="@dimen/avatar_small_padding" /> <TextView android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/avatar" android:layout_toLeftOf="@+id/time" android:layout_alignTop="@id/avatar" android:layout_marginLeft="@dimen/card_content_horizontal_space_with_12dp_padding" android:layout_marginTop="@dimen/avatar_small_padding" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textStyle="bold" /> <me.zhanghai.android.douya.ui.TimeTextView android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignBaseline="@id/name" android:layout_marginLeft="@dimen/card_content_horizontal_space" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textColor="?android:textColorSecondary" /> <!-- HACK: Use android:layout_marginTop="1dp" to align with user_item. --> <TextView android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignLeft="@id/name" android:layout_toLeftOf="@id/time" android:layout_below="@id/name" android:layout_marginTop="1dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </RelativeLayout> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="?android:dividerHorizontal" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/rebroadcast_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
630
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:gravity="center_horizontal" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <TextView android:id="@+id/category" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:gravity="center_horizontal" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_award_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
210
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url" xmlns:app="path_to_url"> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout android:id="@+id/sendbroadcastattachmentlayout_link_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingBottom="@dimen/card_content_vertical_space" android:foreground="?selectableItemBackground"> <View android:id="@+id/broadcastlayout_divider" android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:layout_alignParentTop="true" android:layout_marginBottom="@dimen/card_content_vertical_space" android:background="?dividerHorizontal" /> <ImageView android:id="@+id/sendbroadcastattachmentlayout_link_image" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignParentLeft="true" android:layout_below="@id/broadcastlayout_divider" android:layout_marginRight="16dp" android:scaleType="centerCrop" /> <TextView android:id="@+id/sendbroadcastattachmentlayout_link_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/sendbroadcastattachmentlayout_link_image" android:layout_below="@id/broadcastlayout_divider" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <me.zhanghai.android.douya.ui.AutoGoneTextView android:id="@+id/sendbroadcastattachmentlayout_link_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@id/sendbroadcastattachmentlayout_link_title" android:layout_below="@id/sendbroadcastattachmentlayout_link_title" android:layout_marginTop="8dp" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> <me.zhanghai.android.douya.ui.UploadImageLayout android:id="@+id/sendbroadcastattachmentlayout_single_image" android:layout_width="match_parent" android:layout_height="wrap_content" android:foreground="?selectableItemBackground" android:theme="?darkTheme" app:fillOrientation="horizontal" /> <FrameLayout android:id="@+id/sendbroadcastattachmentlayout_image_list_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="?darkTheme"> <me.zhanghai.android.douya.ui.NestedRatioHeightRecyclerView android:id="@+id/sendbroadcastattachmentlayout_image_list" android:layout_width="match_parent" android:layout_height="wrap_content" app:ratio="6:5" /> <FrameLayout android:id="@+id/sendbroadcastattachmentlayout_image_list_description_layout" android:layout_width="match_parent" android:layout_height="@dimen/scrim_height" android:layout_gravity="bottom"> <TextView android:id="@+id/sendbroadcastattachmentlayout_image_list_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="@dimen/card_content_horizontal_margin" android:layout_marginRight="@dimen/card_content_horizontal_margin" android:layout_marginTop="@dimen/card_content_vertical_margin" android:layout_marginBottom="@dimen/card_content_vertical_margin" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </FrameLayout> </FrameLayout> </merge> ```
/content/code_sandbox/app/src/main/res/layout/send_broadcast_attachment_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
856
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin_with_4dp_padding" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin_with_4dp_padding" android:paddingBottom="@dimen/card_content_vertical_margin_with_4dp_padding" android:gravity="center_vertical"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:padding="@dimen/avatar_padding" /> <TextView android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/avatar" android:layout_alignTop="@id/avatar" android:layout_marginLeft="@dimen/content_horizontal_margin_from_screen_edge_with_44dp_padding" android:layout_marginTop="@dimen/avatar_padding" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textStyle="bold" /> <TextView android:id="@+id/description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@id/name" android:layout_alignBottom="@id/avatar" android:layout_marginBottom="@dimen/avatar_padding" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </RelativeLayout> <View android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:background="?dividerHorizontal" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/user_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
518
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:foreground="?selectableItemBackground" android:orientation="vertical"> <!-- Setting top and bottom padding on the list so that user can scroll better. --> <me.zhanghai.android.douya.ui.DispatchTouchEventToParentNestedRecyclerView android:id="@+id/award_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:clipToPadding="false" android:scrollbarStyle="outsideOverlay" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_award_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
248
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.ForegroundRelativeLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/two_line_list_item_height" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin" android:paddingBottom="@dimen/card_content_vertical_margin" android:foreground="?selectableItemBackground"> <ImageView android:id="@+id/cover" android:layout_width="80dp" android:layout_height="80dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginRight="16dp" android:scaleType="centerCrop" /> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/cover" android:layout_alignParentTop="true" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> <TextView android:id="@+id/abstract_" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/cover" android:layout_below="@id/title" android:layout_marginTop="8dp" android:ellipsize="end" android:maxLines="3" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </me.zhanghai.android.douya.ui.ForegroundRelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_diary_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
414
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:id="@+id/cast_and_credits_wrapper" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:divider="@drawable/transparent_divider_horizontal_16dp" android:orientation="vertical" android:showDividers="middle"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/item_introduction_movie_cast_and_credits" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> <me.zhanghai.android.douya.ui.AdapterLinearLayout android:id="@+id/cast_and_credits" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="@drawable/transparent_divider_horizontal_16dp" android:orientation="vertical" android:showDividers="middle" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_introduction_fragment_movie_cast_and_credits.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
289
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <RelativeLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:id="@+id/followings_rating_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Caption"/> <ImageView android:id="@+id/followings_rating_count_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/followings_rating_count" android:layout_alignBaseline="@id/followings_rating_count" android:layout_marginLeft="2dp" android:baselineAlignBottom="true" android:src="@drawable/favorite_icon_white_8dp" app:tint="?android:textColorSecondary" tools:ignore="MissingPrefix" /> </RelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_followings_rating_count_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
239
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:background="?colorBackgroundFloating" android:foreground="?selectableItemBackground"> <LinearLayout android:id="@+id/rating_wrapper" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:gravity="center_vertical" android:orientation="horizontal"> <me.zhanghai.android.douya.item.ui.RatingLayout android:id="@+id/rating_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <me.zhanghai.android.douya.item.ui.RatingDistributionLayout android:id="@+id/rating_distribution_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="24dp" /> </LinearLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_rating.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
310
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout android:id="@+id/swipe_refresh" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/list" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/card_list_horizontal_padding" android:paddingRight="@dimen/card_list_horizontal_padding" android:paddingTop="@dimen/card_vertical_space_half" android:clipToPadding="false" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> </androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" android:visibility="gone" style="@style/Widget.MaterialProgressBar.ProgressBar" /> <me.zhanghai.android.douya.ui.FriendlyFloatingActionButton android:id="@+id/send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|bottom" android:layout_margin="@dimen/fab_margin" android:contentDescription="@string/broadcast_send_title" android:src="@drawable/create_icon_white_24dp" android:theme="?darkTheme" app:backgroundTint="?colorAccent" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_list_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
411
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?selectableItemBackground" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin_with_12dp_padding" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_margin_with_12dp_padding" android:paddingBottom="@dimen/card_content_vertical_margin"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:padding="@dimen/avatar_small_padding" /> <TextView android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/avatar" android:layout_toLeftOf="@+id/time" android:layout_alignTop="@id/avatar" android:layout_marginLeft="@dimen/card_content_horizontal_space_with_12dp_padding" android:layout_marginTop="@dimen/avatar_small_padding" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textStyle="bold" /> <me.zhanghai.android.douya.ui.TimeTextView android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignBaseline="@id/name" android:layout_marginLeft="@dimen/card_content_horizontal_space" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textColor="?android:textColorSecondary" /> <!-- HACK: Use android:layout_marginTop="1dp" to align with user_item. --> <TextView android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignLeft="@id/name" android:layout_toLeftOf="@id/time" android:layout_below="@id/name" android:layout_marginTop="1dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </RelativeLayout> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="?android:dividerHorizontal" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_comment_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
630
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileMoviesLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_movies_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
183
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_content_horizontal_margin" android:layout_marginRight="@dimen/item_content_horizontal_margin" android:paddingTop="@dimen/content_vertical_space" android:paddingBottom="@dimen/content_vertical_space" android:background="?colorBackgroundFloating" android:orientation="vertical"> <me.zhanghai.android.douya.ui.NestedRecyclerView android:id="@+id/celebrity_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:clipToPadding="false" android:scrollbarStyle="outsideOverlay" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_celebrity_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
217
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <View xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="18dp" android:background="?android:windowContentOverlay" /> ```
/content/code_sandbox/app/src/main/res/layout/appbar_shadow_compat.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
66
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <TextView xmlns:android="path_to_url" android:id="@android:id/text1" android:layout_width="match_parent" android:layout_height="?attr/dropdownListPreferredItemHeight" android:paddingLeft="16dp" android:paddingRight="16dp" android:ellipsize="marquee" android:gravity="center_vertical" android:singleLine="true" style="?android:attr/spinnerItemStyle" /> ```
/content/code_sandbox/app/src/main/res/layout/simple_spinner_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
124
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" android:layout_marginBottom="@dimen/toolbar_height" android:fillViewport="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <EditText android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:paddingTop="@dimen/screen_edge_vertical_margin" android:paddingBottom="@dimen/screen_edge_vertical_margin" android:background="@null" android:gravity="top" android:hint="@string/broadcast_rebroadcast_text_hint"> <requestFocus /> </EditText> <me.zhanghai.android.douya.broadcast.ui.SendBroadcastAttachmentLayout android:id="@+id/attachment_layout" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </ScrollView> <!-- TODO: Add a compatible shadow. --> <LinearLayout android:layout_width="match_parent" android:layout_height="@dimen/toolbar_height" android:layout_gravity="bottom" android:background="?colorBackgroundFloating" android:elevation="@dimen/appbar_elevation" android:gravity="center_vertical" android:orientation="horizontal"> <ImageButton android:id="@+id/add_image" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_marginLeft="@dimen/toolbar_button_left_margin" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_add_image" android:padding="@dimen/icon_button_padding" android:src="@drawable/camera_icon_white_24dp" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/add_more_image" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_add_image" android:padding="@dimen/icon_button_padding" android:src="@drawable/add_photo_icon_white_24dp" android:visibility="gone" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/remove_all_images" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_remove_all_images" android:padding="@dimen/icon_button_padding" android:src="@drawable/cancel_icon_white_24dp" android:visibility="gone" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/add_link" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_add_link" android:padding="@dimen/icon_button_padding" android:src="@drawable/link_icon_white_24dp" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/edit_link" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_edit_link" android:padding="@dimen/icon_button_padding" android:src="@drawable/edit_icon_white_24dp" android:visibility="gone" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/remove_link" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_remove_link" android:padding="@dimen/icon_button_padding" android:src="@drawable/cancel_icon_white_24dp" android:visibility="gone" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/add_mention" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_add_mention" android:padding="@dimen/icon_button_padding" android:src="@drawable/mention_icon_white_24dp" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <ImageButton android:id="@+id/add_topic" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_marginRight="@dimen/toolbar_button_right_margin" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/broadcast_send_add_topic" android:padding="@dimen/icon_button_padding" android:src="@drawable/topic_icon_white_24dp" app:tint="?colorControlNormal" tools:ignore="MissingPrefix" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <me.zhanghai.android.douya.ui.CounterTextView android:id="@+id/counter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/screen_edge_horizontal_margin" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </LinearLayout> <!-- Appbar layout must be on top of content so that transition can have correct z-order. --> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/close_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_send_broadcast_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,659
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <TextView xmlns:android="path_to_url" android:id="@+id/error" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/load_error" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> ```
/content/code_sandbox/app/src/main/res/layout/content_state_layout_default_error_view.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
94
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.DispatchInsetsFrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout android:id="@+id/swipe_refresh" android:layout_width="match_parent" android:layout_height="match_parent" app:progressDistanceOffset="@dimen/status_bar_height"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/notification_list" android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" android:fitsSystemWindows="true" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> </androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout> <!-- For fitsSystemWindows. --> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" android:visibility="gone" style="@style/Widget.MaterialProgressBar.ProgressBar" /> </FrameLayout> </me.zhanghai.android.douya.ui.DispatchInsetsFrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/notification_list_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
353
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".main.ui.MainActivity"> <FrameLayout android:id="@+id/followship_list_fragment" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" /> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:theme="?actionBarTheme" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/followship_list_activity_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
331
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="?colorBackgroundFloating"> <me.zhanghai.android.douya.broadcast.ui.BroadcastLayout android:id="@+id/broadcast" android:layout_width="match_parent" android:layout_height="wrap_content" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="-6dp" android:paddingLeft="@dimen/card_content_horizontal_margin_with_12dp_padding" android:paddingRight="@dimen/card_content_horizontal_margin_with_12dp_padding" android:orientation="horizontal" style="?buttonBarStyle"> <Button android:id="@+id/view_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/broadcast_view_activity" android:textColor="?android:textColorLink" style="?borderlessButtonStyle" /> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/single_broadcast_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
263
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <TableRow xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/rating_distribution_stars" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginRight="8dp" android:gravity="right" android:includeFontPadding="false" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textSize="8dp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <me.zhanghai.android.douya.ui.PercentageWidthView android:id="@+id/rating_distribution_bar" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="@dimen/item_rating_distribution_bar_min_width" android:maxWidth="@dimen/item_rating_distribution_bar_max_width" android:minHeight="8dp" /> <TextView android:id="@+id/rating_distribution_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4dp" android:textAppearance="@style/TextAppearance.AppCompat.Caption" /> </LinearLayout> </TableRow> ```
/content/code_sandbox/app/src/main/res/layout/item_rating_distribution_layout_row.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
322
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileDiariesLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_diaries_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
184
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content"> <me.zhanghai.android.douya.profile.ui.ProfileMusicLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/card_horizontal_margin" android:layout_marginRight="@dimen/card_horizontal_margin" android:layout_marginTop="@dimen/card_vertical_margin" android:layout_marginBottom="@dimen/card_vertical_margin" app:cardCornerRadius="@dimen/card_corner_radius" app:cardMaxElevation="@dimen/card_elevation" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_music_item.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
183
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".main.ui.MainActivity"> <androidx.viewpager.widget.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" /> <me.zhanghai.android.douya.ui.AppBarWrapperLayout android:id="@+id/appBarWrapper" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?colorPrimary" android:elevation="@dimen/appbar_elevation" android:orientation="vertical" android:theme="?actionBarTheme"> <me.zhanghai.android.douya.ui.DoubleClickToolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_button_right_margin" app:navigationIcon="@drawable/menu_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> <com.google.android.material.tabs.TabLayout android:id="@+id/tab" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabMode="scrollable" app:tabPaddingStart="@dimen/screen_edge_horizontal_margin" app:tabPaddingEnd="@dimen/screen_edge_horizontal_margin" /> </LinearLayout> </me.zhanghai.android.douya.ui.AppBarWrapperLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/home_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
433
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <me.zhanghai.android.douya.ui.FixIllegalArgumentExceptionViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" /> <!-- Don't set background color on this layout because it will mess up with wrap_content. --> <!-- Appbar layout must be on top of content so that transition can have correct z-order. --> <!-- Use a wrapping layout to clip toolbar in order to avoid overlap with status bar. --> <FrameLayout android:id="@+id/appBar" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:theme="?actionBarTheme"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:elevation="@dimen/appbar_elevation" android:paddingLeft="@dimen/toolbar_navigation_button_left_margin" android:paddingRight="@dimen/toolbar_overflow_button_right_margin" android:background="@color/dark_50_percent" app:navigationIcon="@drawable/back_icon_white_24dp" app:popupTheme="?actionBarPopupTheme" app:titleMarginStart="@dimen/toolbar_title_left_margin" /> </FrameLayout> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/gallery_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
358
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/avatar_container" android:layout_width="@dimen/profile_large_avatar_size" android:layout_height="@dimen/profile_large_avatar_size"> <de.hdodenhof.circleimageview.CircleImageView android:layout_width="@dimen/profile_large_avatar_size" android:layout_height="@dimen/profile_large_avatar_size" android:clickable="true" android:src="@drawable/profile_avatar_icon_white_128dp" app:civ_border_color="@android:color/white" app:civ_border_width="3dp" app:civ_circle_background_color="?colorPrimaryDark" /> <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatar" android:layout_width="@dimen/profile_large_avatar_size" android:layout_height="@dimen/profile_large_avatar_size" android:visibility="gone" app:civ_border_color="@android:color/white" app:civ_border_width="3dp" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/profile_header_avatar_include.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
261
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout android:id="@+id/swipe_refresh" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/list" android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay" /> </androidx.swiperefreshlayout.widget.FriendlySwipeRefreshLayout> <me.zhanghai.android.materialprogressbar.MaterialProgressBar android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" style="@style/Widget.MaterialProgressBar.ProgressBar" /> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/base_list_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
247
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url"> <ImageView android:id="@+id/backdrop" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" /> <View android:id="@+id/scrim" android:layout_width="match_parent" android:layout_height="@dimen/scrim_height" android:layout_gravity="bottom" /> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false"> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/fade_out_recent_one_avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignLeft="@+id/recent_one_avatar" android:layout_alignTop="@id/recent_one_avatar" android:padding="@dimen/avatar_padding" /> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/recent_one_avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_toLeftOf="@+id/recent_two_avatar" android:layout_alignWithParentIfMissing="true" android:layout_marginRight="@dimen/screen_edge_horizontal_margin_with_8dp_padding" android:layout_marginTop="@dimen/screen_edge_horizontal_margin_with_4dp_padding" android:padding="@dimen/avatar_padding" /> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/fade_out_recent_two_avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignLeft="@id/recent_two_avatar" android:layout_alignTop="@id/recent_two_avatar" android:padding="@dimen/avatar_padding" android:visibility="invisible" /> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/recent_two_avatar" android:layout_width="@dimen/touch_target_size" android:layout_height="@dimen/touch_target_size" android:layout_alignParentRight="true" android:layout_marginRight="@dimen/screen_edge_horizontal_margin_with_4dp_padding" android:layout_marginTop="@dimen/screen_edge_horizontal_margin_with_4dp_padding" android:padding="@dimen/avatar_padding" /> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/fade_out_avatar" android:layout_width="@dimen/navigation_header_avatar_size" android:layout_height="@dimen/navigation_header_avatar_size" android:layout_alignLeft="@+id/avatar" android:layout_alignTop="@id/avatar" android:visibility="invisible" /> <me.zhanghai.android.douya.ui.SimpleCircleImageView android:id="@+id/avatar" android:layout_width="@dimen/navigation_header_avatar_size" android:layout_height="@dimen/navigation_header_avatar_size" android:layout_marginLeft="@dimen/screen_edge_horizontal_margin" android:layout_marginTop="@dimen/screen_edge_horizontal_margin" /> </RelativeLayout> <LinearLayout android:id="@+id/info" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:layout_gravity="bottom" android:layout_marginBottom="@dimen/list_padding_vertical" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?selectableItemBackground" android:gravity="center_vertical" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:orientation="vertical"> <!-- ~ Use android:width="match_parent" for the two TextViews so that their bounds can ~ remain stable when transition start. Otherwise glitches will happen. --> <TextView android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textStyle="bold" /> <TextView android:id="@+id/description" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?android:textColorSecondary" /> </LinearLayout> <ImageView android:id="@+id/dropDown" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/drop_down_icon_white_24dp" /> </LinearLayout> </FrameLayout> </merge> ```
/content/code_sandbox/app/src/main/res/layout/navigation_header_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,162
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/item_card_list_vertical_padding" android:paddingLeft="@dimen/item_card_list_horizontal_padding" android:paddingRight="@dimen/item_card_list_horizontal_padding"> <me.zhanghai.android.douya.ui.FriendlyCardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/item_card_horizontal_margin" android:layout_marginRight="@dimen/item_card_horizontal_margin" android:layout_marginTop="@dimen/item_card_vertical_margin" android:layout_marginBottom="@dimen/item_card_vertical_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/content_vertical_space" android:orientation="vertical"> <LinearLayout android:id="@+id/title_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:paddingTop="@dimen/card_content_vertical_space" android:paddingBottom="@dimen/card_content_vertical_space" android:background="?selectableItemBackground" android:gravity="center_vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/item_recommendation_list_title" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/more" android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textColor="?colorControlActivated" /> </LinearLayout> <me.zhanghai.android.douya.ui.NestedRecyclerView android:id="@+id/recommendation_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/card_content_horizontal_margin" android:paddingRight="@dimen/card_content_horizontal_margin" android:clipToPadding="false" android:scrollbarStyle="outsideOverlay" /> </LinearLayout> </me.zhanghai.android.douya.ui.FriendlyCardView> </FrameLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_fragment_recommendation_list.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
581
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <merge xmlns:android="path_to_url"> <LinearLayout android:id="@+id/account_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <View android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="@dimen/horizontal_divider_height" android:layout_marginTop="@dimen/list_padding_vertical" android:layout_marginBottom="@dimen/list_padding_vertical" android:background="?dividerHorizontal" /> <TextView android:id="@+id/add_account" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?selectableItemBackground" android:drawableLeft="@drawable/add_icon_white_24dp" android:drawablePadding="@dimen/content_horizontal_margin_from_screen_edge_with_24dp_padding" android:ellipsize="end" android:gravity="center_vertical" android:text="@string/navigation_add_account" android:textAppearance="@style/TextAppearance.AppCompat.Body2" android:maxLines="1" /> <TextView android:id="@+id/remove_current_account" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?selectableItemBackground" android:drawableLeft="@drawable/remove_icon_white_24dp" android:drawablePadding="@dimen/content_horizontal_margin_from_screen_edge_with_24dp_padding" android:ellipsize="end" android:gravity="center_vertical" android:text="@string/navigation_remove_current_account" android:textAppearance="@style/TextAppearance.AppCompat.Body2" android:maxLines="1" /> <TextView android:id="@+id/manage_accounts" android:layout_width="match_parent" android:layout_height="@dimen/single_line_list_item_height" android:paddingLeft="@dimen/screen_edge_horizontal_margin" android:paddingRight="@dimen/screen_edge_horizontal_margin" android:background="?selectableItemBackground" android:drawableLeft="@drawable/settings_icon_white_24dp" android:drawablePadding="@dimen/content_horizontal_margin_from_screen_edge_with_24dp_padding" android:ellipsize="end" android:gravity="center_vertical" android:text="@string/navigation_manage_accounts" android:textAppearance="@style/TextAppearance.AppCompat.Body2" android:maxLines="1" /> </merge> ```
/content/code_sandbox/app/src/main/res/layout/navigation_account_list_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
612
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <ScrollView xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/toolbar_height" android:layout_marginBottom="@dimen/toolbar_height"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/dialog_padding_horizontal_with_4dp_padding" android:paddingRight="@dimen/dialog_padding_horizontal_with_4dp_padding" android:paddingTop="@dimen/dialog_content_padding_top" android:paddingBottom="@dimen/dialog_content_padding_bottom_with_8dp_padding" android:orientation="vertical"> <me.zhanghai.android.douya.ui.ExpandedHintMaterialTextInputLayout android:id="@+id/url_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:hint="@string/broadcast_send_edit_link_url_caption" android:textColorHint="?android:textColorSecondary" app:errorEnabled="true"> <me.zhanghai.android.materialedittext.MaterialEditText android:id="@+id/url" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/broadcast_send_edit_link_url_hint" android:inputType="textUri" android:maxLines="1" android:text="@string/broadcast_send_edit_link_url_hint"> <requestFocus /> </me.zhanghai.android.materialedittext.MaterialEditText> </me.zhanghai.android.douya.ui.ExpandedHintMaterialTextInputLayout> <me.zhanghai.android.douya.ui.ExpandedHintMaterialTextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/broadcast_send_edit_link_title_caption" android:textColorHint="?android:textColorSecondary"> <me.zhanghai.android.materialedittext.MaterialEditText android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/broadcast_send_edit_link_title_hint" android:maxLines="1" /> </me.zhanghai.android.douya.ui.ExpandedHintMaterialTextInputLayout> </LinearLayout> </ScrollView> ```
/content/code_sandbox/app/src/main/res/layout/broadcast_edit_link_dialog.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
542
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <me.zhanghai.android.douya.ui.FullscreenNavigationView xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/navigation" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:background="?android:colorBackground" app:headerLayout="@layout/navigation_header" app:menu="@menu/navigation" /> ```
/content/code_sandbox/app/src/main/res/layout/navigation_fragment.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
121
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <vector xmlns:android="path_to_url" android:width="36dp" android:height="36dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FFFFFFFF" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" /> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/close_icon_white_36dp.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
163
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <LinearLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="40dp" android:paddingRight="40dp" android:orientation="vertical" android:theme="@style/ThemeOverlay.Douya.Calendar" tools:ignore="SpUsage"> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" android:textSize="16dp" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/chinese_calendar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/calendar_chinese_calendar" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" android:textSize="16dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/day_of_week" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" android:textSize="16dp" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/chinese_calendar_date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" android:textSize="16dp" /> </LinearLayout> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/day_of_month" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="-56dp" android:layout_marginBottom="-60dp" android:includeFontPadding="false" android:textAppearance="@style/TextAppearance.AppCompat.Display1" android:textSize="260dp" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="?android:textColorSecondary" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <TextView android:id="@+id/comment" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.AppCompat.Subhead" android:textColor="?android:textColorSecondary" android:textSize="16dp" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <LinearLayout android:id="@+id/movie" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-9dp" android:ellipsize="middle" android:singleLine="true" android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textSize="18dp" android:textStyle="bold" /> <Space android:layout_width="0dp" android:layout_height="1dp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical"> <me.zhanghai.android.materialratingbar.MaterialRatingBar android:id="@+id/rating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-1.5dp" android:layout_marginRight="-1.5dp" style="@style/Widget.MaterialRatingBar.RatingBar.Indicator.Small" /> <TextView android:id="@+id/rating_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="6dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textColor="?colorControlActivated" android:textSize="14dp" /> </LinearLayout> <Space android:layout_width="0dp" android:layout_height="1dp" /> <TextView android:id="@+id/event" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-9dp" android:ellipsize="middle" android:singleLine="true" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textSize="14dp" /> </LinearLayout> <ImageView android:id="@+id/poster" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginTop="3dp" android:layout_marginBottom="3dp" android:adjustViewBounds="true" /> </LinearLayout> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/calendar_layout.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
1,439
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ All Rights Reserved. --> <shape xmlns:android="path_to_url"> <solid android:color="#1f000000" /> <size android:height="1dp" android:width="1dp" /> </shape> ```
/content/code_sandbox/app/src/main/res/drawable/list_divider_light.xml
xml
2016-02-01T13:44:19
2024-08-15T05:23:34
Douya
zhanghai/Douya
4,549
72