创建布局的最佳方法是什么;谷歌驱动应用程序;在Android中?
我是Android应用程序的新手,现在我被困在triyng中,无法获得类似于这种布局的东西 我已经开始使用RelativeLayout,但我不知道如何使用这些可爱的按钮。我用过背景图片的按钮,但没有成功。我看到了她的布局。。。你会用什么来实现这些目标?或者我在哪里可以找到一个好的例子,用不同的例子谈论布局和按钮,因为我找不到任何有趣的东西:(创建布局的最佳方法是什么;谷歌驱动应用程序;在Android中?,android,android-layout,google-drive-api,Android,Android Layout,Google Drive Api,我是Android应用程序的新手,现在我被困在triyng中,无法获得类似于这种布局的东西 我已经开始使用RelativeLayout,但我不知道如何使用这些可爱的按钮。我用过背景图片的按钮,但没有成功。我看到了她的布局。。。你会用什么来实现这些目标?或者我在哪里可以找到一个好的例子,用不同的例子谈论布局和按钮,因为我找不到任何有趣的东西:( 提前谢谢,对我的英语感到抱歉听起来你基本上有两个问题: 如何创建此布局 如何创建或从何处获取这些按钮 为了回答第一个问题,有很多方法可以创建一个布局,比
提前谢谢,对我的英语感到抱歉听起来你基本上有两个问题:
> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/4_collections_collection"
android:gravity="center"
android:text="My Drive" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_above="@id/your_image_view_id"
android:layout_centerVertical="true"
android:background="#808080" />
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/6_social_group"
android:gravity="center"
android:text="Shared with me" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#808080" />
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/3_rating_important"
android:gravity="center"
android:text="Starred" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#808080" />
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/10_device_access_alarms"
android:gravity="center"
android:text="Recent" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#808080" />
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/9_av_make_available_offline"
android:gravity="center"
android:text="Offline" />
</LinearLayout>
>
这里的关键部分是:
- android:drawableLeft-textview有一个名为android:drawableLeft的属性,允许您分配图标并将其轻松放置在左侧
- 视图-此处的视图用于绘制水平线
希望这能帮助你朝着正确的方向前进。actionbar+列表视图会很好。这里有很多关于布局设计的信息,还有一个问题……现在我正试图实现这一点,当我按下文本视图时,所有区域都会被绘制或显示所按下的内容。有什么建议吗?我试着按照这个例子乐没有成功:(我已经做到了!别忘了安卓:clickable=“true”:P