这些是Android中的GridView吗?
我想制作一个像google+或evernote这样界面的应用程序,如下所示,如何执行这些ui?在Android中使用GridView?它们与此类似。但它们有自己的术语“仪表板” 这是一个教程的链接 这里有一个链接,向你解释了一些事情 还有这个问题,以前讨论过 这似乎是建议的方法这些是Android中的GridView吗?,android,user-interface,Android,User Interface,我想制作一个像google+或evernote这样界面的应用程序,如下所示,如何执行这些ui?在Android中使用GridView?它们与此类似。但它们有自己的术语“仪表板” 这是一个教程的链接 这里有一个链接,向你解释了一些事情 还有这个问题,以前讨论过 这似乎是建议的方法 <com.google.android.apps.iosched.ui.widget.DashboardLayout xmlns:android="http://schemas.android.com/apk/re
<com.google.android.apps.iosched.ui.widget.DashboardLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/home_btn_schedule"
style="@style/DashboardButton"
android:text="@string/btn_schedule"
android:drawableTop="@drawable/home_btn_schedule" />
<Button android:id="@+id/home_btn_map"
style="@style/DashboardButton"
android:text="@string/btn_map"
android:drawableTop="@drawable/home_btn_map" />
<Button android:id="@+id/home_btn_sessions"
style="@style/DashboardButton"
android:text="@string/btn_sessions"
android:drawableTop="@drawable/home_btn_sessions" />
<Button android:id="@+id/home_btn_starred"
style="@style/DashboardButton"
android:text="@string/btn_starred"
android:drawableTop="@drawable/home_btn_starred" />
<Button android:id="@+id/home_btn_vendors"
style="@style/DashboardButton"
android:text="@string/btn_vendors"
android:drawableTop="@drawable/home_btn_vendors" />
<Button android:id="@+id/home_btn_announcements"
style="@style/DashboardButton"
android:text="@string/btn_announcements"
android:drawableTop="@drawable/home_btn_announcements" />
它们与此相似。但它们有自己的术语“仪表板” 这是一个教程的链接 这里有一个链接,向你解释了一些事情 还有这个问题,以前讨论过 这似乎是建议的方法
<com.google.android.apps.iosched.ui.widget.DashboardLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/home_btn_schedule"
style="@style/DashboardButton"
android:text="@string/btn_schedule"
android:drawableTop="@drawable/home_btn_schedule" />
<Button android:id="@+id/home_btn_map"
style="@style/DashboardButton"
android:text="@string/btn_map"
android:drawableTop="@drawable/home_btn_map" />
<Button android:id="@+id/home_btn_sessions"
style="@style/DashboardButton"
android:text="@string/btn_sessions"
android:drawableTop="@drawable/home_btn_sessions" />
<Button android:id="@+id/home_btn_starred"
style="@style/DashboardButton"
android:text="@string/btn_starred"
android:drawableTop="@drawable/home_btn_starred" />
<Button android:id="@+id/home_btn_vendors"
style="@style/DashboardButton"
android:text="@string/btn_vendors"
android:drawableTop="@drawable/home_btn_vendors" />
<Button android:id="@+id/home_btn_announcements"
style="@style/DashboardButton"
android:text="@string/btn_announcements"
android:drawableTop="@drawable/home_btn_announcements" />
和以选择项目
@Override
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
int pos = position;{
}
dashboard_icon.xml
<?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" >
<ImageView
android:id="@+id/dashboard_icon_img"
android:layout_width="fill_parent"
android:layout_height="96.0dip"
android:scaleType="fitCenter" />
<TextView
android:id="@+id/dashboard_icon_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20.0dip"
android:layout_marginTop="2.0dip"
android:gravity="center"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="@android:color/black" />
</LinearLayout>
dashboard.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Button
android:id="@+id/back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_weight="1"
android:text="BACK" />
<GridView
android:id="@+id/dashboard_grid"
style="@style/dashboard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:listSelector="@android:color/transparent"
android:stretchMode="columnWidth"
android:verticalSpacing="20.0dip" />
</RelativeLayout>
和以选择项目
@Override
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
int pos = position;{
}
dashboard_icon.xml
<?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" >
<ImageView
android:id="@+id/dashboard_icon_img"
android:layout_width="fill_parent"
android:layout_height="96.0dip"
android:scaleType="fitCenter" />
<TextView
android:id="@+id/dashboard_icon_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20.0dip"
android:layout_marginTop="2.0dip"
android:gravity="center"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="@android:color/black" />
</LinearLayout>
dashboard.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Button
android:id="@+id/back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_weight="1"
android:text="BACK" />
<GridView
android:id="@+id/dashboard_grid"
style="@style/dashboard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:listSelector="@android:color/transparent"
android:stretchMode="columnWidth"
android:verticalSpacing="20.0dip" />
</RelativeLayout>
下面的链接可以帮助你下面的链接可以帮助你