M3 redesign: search/discover
This commit is contained in:
9
mastodon/src/main/res/drawable/bg_rect_12dp_ripple.xml
Normal file
9
mastodon/src/main/res/drawable/bg_rect_12dp_ripple.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/m3_on_surface_overlay">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape>
|
||||
<solid android:color="#000"/>
|
||||
<corners android:radius="12dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
9
mastodon/src/main/res/drawable/ic_feed_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_feed_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5,21Q4.175,21 3.587,20.413Q3,19.825 3,19V5Q3,4.175 3.587,3.587Q4.175,3 5,3H16L21,8V19Q21,19.825 20.413,20.413Q19.825,21 19,21ZM5,19H19Q19,19 19,19Q19,19 19,19V9H15V5H5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19ZM7,17H17V15H7ZM7,9H12V7H7ZM7,13H17V11H7ZM5,5V9V5V9V19Q5,19 5,19Q5,19 5,19Q5,19 5,19Q5,19 5,19V5Q5,5 5,5Q5,5 5,5Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_group_add_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_group_add_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12.5,11.95Q13.225,11.15 13.613,10.125Q14,9.1 14,8Q14,6.9 13.613,5.875Q13.225,4.85 12.5,4.05Q14,4.25 15,5.375Q16,6.5 16,8Q16,9.5 15,10.625Q14,11.75 12.5,11.95ZM18,20V17Q18,16.1 17.6,15.288Q17.2,14.475 16.55,13.85Q17.825,14.3 18.913,15.012Q20,15.725 20,17V20ZM20,13V11H18V9H20V7H22V9H24V11H22V13ZM8,12Q6.35,12 5.175,10.825Q4,9.65 4,8Q4,6.35 5.175,5.175Q6.35,4 8,4Q9.65,4 10.825,5.175Q12,6.35 12,8Q12,9.65 10.825,10.825Q9.65,12 8,12ZM0,20V17.2Q0,16.35 0.438,15.637Q0.875,14.925 1.6,14.55Q3.15,13.775 4.75,13.387Q6.35,13 8,13Q9.65,13 11.25,13.387Q12.85,13.775 14.4,14.55Q15.125,14.925 15.562,15.637Q16,16.35 16,17.2V20ZM8,10Q8.825,10 9.413,9.412Q10,8.825 10,8Q10,7.175 9.413,6.588Q8.825,6 8,6Q7.175,6 6.588,6.588Q6,7.175 6,8Q6,8.825 6.588,9.412Q7.175,10 8,10ZM2,18H14V17.2Q14,16.925 13.863,16.7Q13.725,16.475 13.5,16.35Q12.15,15.675 10.775,15.337Q9.4,15 8,15Q6.6,15 5.225,15.337Q3.85,15.675 2.5,16.35Q2.275,16.475 2.138,16.7Q2,16.925 2,17.2ZM8,8Q8,8 8,8Q8,8 8,8Q8,8 8,8Q8,8 8,8Q8,8 8,8Q8,8 8,8Q8,8 8,8Q8,8 8,8ZM8,18Q8,18 8,18Q8,18 8,18Q8,18 8,18Q8,18 8,18Q8,18 8,18Q8,18 8,18Q8,18 8,18Q8,18 8,18Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_history_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_history_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M14.8,16.2 L11,12.4V7H13V11.6L16.2,14.8ZM12,21Q8.55,21 5.988,18.712Q3.425,16.425 3.05,13H5.1Q5.45,15.6 7.412,17.3Q9.375,19 12,19Q14.925,19 16.962,16.962Q19,14.925 19,12Q19,9.075 16.962,7.037Q14.925,5 12,5Q10.275,5 8.775,5.8Q7.275,6.6 6.25,8H9V10H3V4H5V6.35Q6.275,4.75 8.113,3.875Q9.95,3 12,3Q13.875,3 15.513,3.712Q17.15,4.425 18.363,5.637Q19.575,6.85 20.288,8.487Q21,10.125 21,12Q21,13.875 20.288,15.512Q19.575,17.15 18.363,18.362Q17.15,19.575 15.513,20.288Q13.875,21 12,21Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_link_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_link_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11,17H7Q4.925,17 3.463,15.537Q2,14.075 2,12Q2,9.925 3.463,8.462Q4.925,7 7,7H11V9H7Q5.75,9 4.875,9.875Q4,10.75 4,12Q4,13.25 4.875,14.125Q5.75,15 7,15H11ZM8,13V11H16V13ZM13,17V15H17Q18.25,15 19.125,14.125Q20,13.25 20,12Q20,10.75 19.125,9.875Q18.25,9 17,9H13V7H17Q19.075,7 20.538,8.462Q22,9.925 22,12Q22,14.075 20.538,15.537Q19.075,17 17,17Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_person_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_person_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,12Q10.35,12 9.175,10.825Q8,9.65 8,8Q8,6.35 9.175,5.175Q10.35,4 12,4Q13.65,4 14.825,5.175Q16,6.35 16,8Q16,9.65 14.825,10.825Q13.65,12 12,12ZM4,20V17.2Q4,16.35 4.438,15.637Q4.875,14.925 5.6,14.55Q7.15,13.775 8.75,13.387Q10.35,13 12,13Q13.65,13 15.25,13.387Q16.85,13.775 18.4,14.55Q19.125,14.925 19.562,15.637Q20,16.35 20,17.2V20ZM6,18H18V17.2Q18,16.925 17.863,16.7Q17.725,16.475 17.5,16.35Q16.15,15.675 14.775,15.337Q13.4,15 12,15Q10.6,15 9.225,15.337Q7.85,15.675 6.5,16.35Q6.275,16.475 6.138,16.7Q6,16.925 6,17.2ZM12,10Q12.825,10 13.413,9.412Q14,8.825 14,8Q14,7.175 13.413,6.588Q12.825,6 12,6Q11.175,6 10.588,6.588Q10,7.175 10,8Q10,8.825 10.588,9.412Q11.175,10 12,10ZM12,8Q12,8 12,8Q12,8 12,8Q12,8 12,8Q12,8 12,8Q12,8 12,8Q12,8 12,8Q12,8 12,8Q12,8 12,8ZM12,18Q12,18 12,18Q12,18 12,18Q12,18 12,18Q12,18 12,18Q12,18 12,18Q12,18 12,18Q12,18 12,18Q12,18 12,18Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_stream_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_stream_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M4,14Q3.175,14 2.588,13.412Q2,12.825 2,12Q2,11.175 2.588,10.587Q3.175,10 4,10Q4.825,10 5.412,10.587Q6,11.175 6,12Q6,12.825 5.412,13.412Q4.825,14 4,14ZM5.65,19.7 L4.25,18.3 8.6,13.95 10,15.35ZM8.65,10 L4.3,5.65 5.7,4.25 10.05,8.6ZM12,22Q11.175,22 10.588,21.413Q10,20.825 10,20Q10,19.175 10.588,18.587Q11.175,18 12,18Q12.825,18 13.413,18.587Q14,19.175 14,20Q14,20.825 13.413,21.413Q12.825,22 12,22ZM12,6Q11.175,6 10.588,5.412Q10,4.825 10,4Q10,3.175 10.588,2.587Q11.175,2 12,2Q12.825,2 13.413,2.587Q14,3.175 14,4Q14,4.825 13.413,5.412Q12.825,6 12,6ZM15.35,10.05 L13.95,8.6 18.35,4.25 19.75,5.65ZM18.35,19.7 L14,15.35 15.4,13.95 19.75,18.3ZM20,14Q19.175,14 18.587,13.412Q18,12.825 18,12Q18,11.175 18.587,10.587Q19.175,10 20,10Q20.825,10 21.413,10.587Q22,11.175 22,12Q22,12.825 21.413,13.412Q20.825,14 20,14Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_tag_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_tag_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,20 L7,16H3.5L4,14H7.5L8.5,10H4.5L5,8H9L10,4H12L11,8H15L16,4H18L17,8H20.5L20,10H16.5L15.5,14H19.5L19,16H15L14,20H12L13,16H9L8,20ZM9.5,14H13.5L14.5,10H10.5Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_whatshot_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_whatshot_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,22Q10.35,22 8.812,21.488Q7.275,20.975 6,20L7.45,18.55Q8.5,19.275 9.65,19.637Q10.8,20 12,20Q15.325,20 17.663,17.663Q20,15.325 20,12Q20,8.675 17.663,6.337Q15.325,4 12,4Q8.675,4 6.338,6.337Q4,8.675 4,12H2Q2,9.925 2.788,8.1Q3.575,6.275 4.925,4.925Q6.275,3.575 8.1,2.787Q9.925,2 12,2Q14.075,2 15.887,2.787Q17.7,3.575 19.062,4.938Q20.425,6.3 21.212,8.113Q22,9.925 22,12Q22,14.05 21.212,15.875Q20.425,17.7 19.062,19.062Q17.7,20.425 15.887,21.212Q14.075,22 12,22ZM3.975,17.925 L8.05,13.85 11.05,16.35 16,11.4V14H18V8H12V10H14.6L10.95,13.65L7.95,11.15L2.925,16.175Q3.2,16.75 3.413,17.113Q3.625,17.475 3.975,17.925ZM12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Z"/>
|
||||
</vector>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="?colorSearchField"/>
|
||||
<corners android:radius="6dp"/>
|
||||
<corners android:radius="12dp"/>
|
||||
<solid android:color="#000"/>
|
||||
</shape>
|
||||
@@ -5,30 +5,27 @@
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:elevation="1dp"
|
||||
android:outlineProvider="background"
|
||||
android:background="?colorWindowBackground">
|
||||
android:layout_margin="16dp"
|
||||
android:padding="16dp"
|
||||
android:background="@drawable/rect_12dp"
|
||||
android:backgroundTint="?colorM3SurfaceVariant">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:tint="?colorM3OnPrimaryContainer"
|
||||
android:scaleType="center"
|
||||
android:importantForAccessibility="no"
|
||||
tools:src="@drawable/ic_whatshot_24px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/banner_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
tools:text="@string/trending_posts_info_banner"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/banner_dismiss"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="8dp"
|
||||
android:src="@drawable/ic_fluent_dismiss_circle_24_filled"
|
||||
android:tint="?android:textColorSecondary"
|
||||
android:contentDescription="@string/dismiss"
|
||||
android:background="?android:selectableItemBackgroundBorderless"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -9,106 +9,74 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:background="?android:statusBarColor">
|
||||
|
||||
<!-- https://github.com/mastodon/mastodon-android/issues/95 -->
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="1px"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"/>
|
||||
|
||||
<FrameLayout
|
||||
android:background="?colorM3Surface">
|
||||
<LinearLayout
|
||||
android:id="@+id/search_wrap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_search_field"
|
||||
android:outlineProvider="background"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="@string/search_hint"
|
||||
android:textColorHint="?colorSearchHint"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="16dp"
|
||||
android:singleLine="true"
|
||||
android:inputType="textFilter"
|
||||
android:imeOptions="actionSearch"
|
||||
android:paddingLeft="48dp"
|
||||
android:paddingRight="48dp"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:background="@null"
|
||||
android:elevation="0dp"/>
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_m3_surface3">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/search_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:tint="?colorSearchHint"
|
||||
android:elevation="1dp"
|
||||
android:layout_margin="8dp"
|
||||
android:contentDescription="@string/back"
|
||||
android:src="@drawable/ic_fluent_search_24_regular"/>
|
||||
android:background="@drawable/bg_round_ripple"
|
||||
android:tint="?colorM3OnSurfaceVariant"
|
||||
android:src="@drawable/ic_search_24px"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/search_clear"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:tint="?colorSearchHint"
|
||||
android:elevation="1dp"
|
||||
android:visibility="invisible"
|
||||
android:contentDescription="@string/clear"
|
||||
android:src="@drawable/ic_fluent_dismiss_24_regular"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/search_progress"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:indeterminateTint="?colorSearchHint"
|
||||
style="?android:progressBarStyleSmall"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</FrameLayout>
|
||||
<TextView
|
||||
android:id="@+id/search_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:text="@string/search_mastodon"/>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<org.joinmastodon.android.ui.tabs.TabLayout
|
||||
android:id="@+id/tabbar"
|
||||
<LinearLayout
|
||||
android:id="@+id/discover_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:tabGravity="start"
|
||||
app:tabMinWidth="120dp"
|
||||
app:tabIndicator="@drawable/mtrl_tabs_default_indicator"
|
||||
app:tabIndicatorAnimationMode="elastic"
|
||||
app:tabIndicatorColor="?android:textColorPrimary"
|
||||
app:tabMode="scrollable"
|
||||
android:background="@drawable/bg_discover_tabs"/>
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<org.joinmastodon.android.ui.tabs.TabLayout
|
||||
android:id="@+id/tabbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:tabGravity="start"
|
||||
app:tabIndicator="@drawable/tab_indicator_m3"
|
||||
app:tabIndicatorAnimationMode="elastic"
|
||||
app:tabIndicatorColor="?colorM3Primary"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabMinWidth="90dp"
|
||||
app:tabMode="scrollable"
|
||||
android:background="?colorM3Surface"/>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<View
|
||||
android:id="@+id/tabs_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?colorM3SurfaceVariant"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/search_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"/>
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/search_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
|
||||
</me.grishka.appkit.views.FragmentRootLinearLayout>
|
||||
@@ -8,18 +8,6 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="?android:windowBackground">
|
||||
|
||||
<org.joinmastodon.android.ui.tabs.TabLayout
|
||||
android:id="@+id/tabbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:tabGravity="start"
|
||||
app:tabMinWidth="120dp"
|
||||
app:tabIndicator="@drawable/mtrl_tabs_default_indicator"
|
||||
app:tabIndicatorAnimationMode="elastic"
|
||||
app:tabIndicatorColor="?android:textColorPrimary"
|
||||
app:tabMode="scrollable"
|
||||
android:background="@drawable/bg_discover_tabs"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/appkit_loader_content"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -3,28 +3,31 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="24dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/photo"
|
||||
android:layout_width="132dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@id/subtitle"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:importantForAccessibility="no"
|
||||
tools:src="#0f0"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/photo"
|
||||
android:textAppearance="@style/m3_title_small"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:layout_height="16dp"
|
||||
android:layout_toEndOf="@id/photo"
|
||||
android:textAppearance="@style/m3_label_medium"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="Site Name"/>
|
||||
|
||||
<TextView
|
||||
@@ -32,24 +35,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/name"
|
||||
android:layout_toStartOf="@id/photo"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:textAppearance="@style/m3_title_medium"
|
||||
android:maxLines="5"
|
||||
android:layout_toEndOf="@id/photo"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
tools:text="Title title title"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_toStartOf="@id/photo"
|
||||
android:textAppearance="@style/m3_label_medium"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="Discussed 123 times"/>
|
||||
|
||||
</RelativeLayout>
|
||||
44
mastodon/src/main/res/layout/item_trending_link_card.xml
Normal file
44
mastodon/src/main/res/layout/item_trending_link_card.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="240dp"
|
||||
android:foreground="@drawable/bg_settings_banner">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/photo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="140dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:importantForAccessibility="no"
|
||||
tools:src="#0f0"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/photo"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
tools:text="Title title title"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="Site Name"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -22,6 +22,7 @@
|
||||
<item name="list_item_switch" type="id"/>
|
||||
<item name="list_item_checkbox" type="id"/>
|
||||
<item name="list_item_radio" type="id"/>
|
||||
<item name="list_item_account" type="id"/>
|
||||
|
||||
<item name="server_about" type="id"/>
|
||||
<item name="server_rules" type="id"/>
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
<string name="visibility_private">Only people mentioned</string>
|
||||
<string name="search_all">All</string>
|
||||
<string name="search_people">People</string>
|
||||
<string name="recent_searches">Recent searches</string>
|
||||
<string name="recent_searches">Recents</string>
|
||||
<string name="step_x_of_n">Step %1$d of %2$d</string>
|
||||
<string name="skip">Skip</string>
|
||||
<string name="notification_type_follow">New followers</string>
|
||||
@@ -307,11 +307,12 @@
|
||||
<string name="file_saved">File saved</string>
|
||||
<string name="downloading">Downloading…</string>
|
||||
<string name="no_app_to_handle_action">There’s no app to handle this action</string>
|
||||
<string name="local_timeline">Community</string>
|
||||
<string name="trending_posts_info_banner">These are the posts gaining traction in your corner of Mastodon.</string>
|
||||
<string name="trending_hashtags_info_banner">These are the hashtags gaining traction in your corner of Mastodon.</string>
|
||||
<string name="trending_links_info_banner">These are the news stories being shared the most in your corner of Mastodon.</string>
|
||||
<string name="local_timeline_info_banner">These are the most recent posts by the people who use the same Mastodon server as you.</string>
|
||||
<string name="local_timeline">Local</string>
|
||||
<string name="trending_posts_info_banner">These are the posts gaining traction across Mastodon.</string>
|
||||
<string name="trending_links_info_banner">These are the news stories getting talked about on Mastodon.</string>
|
||||
<!-- %s is the server domain -->
|
||||
<string name="local_timeline_info_banner">These are all the posts from all users in your server (%s).</string>
|
||||
<string name="recommended_accounts_info_banner">You might like these accounts based on others you follow.</string>
|
||||
<string name="dismiss">Dismiss</string>
|
||||
<string name="see_new_posts">See new posts</string>
|
||||
<string name="load_missing_posts">Load missing posts</string>
|
||||
@@ -633,4 +634,11 @@
|
||||
<string name="downloading_update">Downloading (%d%%)</string>
|
||||
<!-- Shown like a content warning, %s is the name of the filter -->
|
||||
<string name="post_matches_filter_x">Matches filter “%s”</string>
|
||||
<string name="search_mastodon">Search Mastodon</string>
|
||||
<string name="clear_all">Clear all</string>
|
||||
<string name="search_open_url">Open URL in Mastodon</string>
|
||||
<string name="posts_matching_hashtag">Posts with “%s”</string>
|
||||
<string name="search_go_to_account">Go to %s</string>
|
||||
<string name="posts_matching_string">Posts with “%s”</string>
|
||||
<string name="accounts_matching_string">People with “%s”</string>
|
||||
</resources>
|
||||
@@ -440,6 +440,7 @@
|
||||
<item name="android:textSize">16dp</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:lineSpacingExtra">5dp</item>
|
||||
<item name="android:lineHeight">24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="m3_body_medium">
|
||||
@@ -479,6 +480,7 @@
|
||||
<item name="android:textSize">12dp</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:lineSpacingMultiplier">1.14</item>
|
||||
<item name="android:lineHeight">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="m3_label_large">
|
||||
|
||||
Reference in New Issue
Block a user