GridLayout设计风格的图标和文字使用材料设计?
问题描述:
什么是实现设计的图标,与设计material.It支持库文本看起来像链接的图像上方 enter link description hereGridLayout设计风格的图标和文字使用材料设计?
答
由于Karakuri在评论中说,嵌套LinearLayouts会的最佳途径使您的这样
这里所需要的视图是布局的代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="3"
android:padding="16dp"
android:orientation="horizontal">
<LinearLayout
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_repeat_48d"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Repeat"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_heart_48d"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Favourite"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_shuffle_48dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shuffle"/>
</LinearLayout>
</LinearLayout>
该代码只是一个布局结构,您必须根据需要添加填充和宽度高度ImageView
。你必须为你想要的布局做一些工作。如果你想要两行同样你的上传图片,只需复制布局两次。
希望它帮助或删除评论,如果有任何麻烦实施。
干杯!
嵌套'LinearLayout's – Karakuri