Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 仪表板布局模式_Android_Layout - Fatal编程技术网

Android 仪表板布局模式

Android 仪表板布局模式,android,layout,Android,Layout,我想把两个按钮一个放在另一个下面,加上一些填充物。不幸的是,底部的一个填满了整个屏幕,落在顶部的后面- <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent"

我想把两个按钮一个放在另一个下面,加上一些填充物。不幸的是,底部的一个填满了整个屏幕,落在顶部的后面-

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" 
    android:layout_width="match_parent"
    android:layout_height="match_parent" 
    android:padding="6dip">
    <LinearLayout 
        android:id="@+id/linearLayout1" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:orientation="horizontal"
        android:padding="6dip"
        android:layout_weight="1">
        <ImageButton 
            android:layout_width="wrap_content" 
            android:src="@drawable/gallery" 
            android:layout_height="wrap_content" 
            android:scaleType="centerInside" 
            android:id="@+id/gallery_btn"></ImageButton> 
    </LinearLayout>
    <LinearLayout 
        android:id="@+id/linearLayout2"
        android:orientation="horizontal"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:padding="6dip"
        android:layout_weight="1">
        <ImageButton android:id="@+id/camera_btn" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content"
            android:src="@drawable/camera" 
            android:scaleType="centerInside" />
    </LinearLayout>
</LinearLayout>

我写了一篇关于仪表板实现的短文,希望能对您有所帮助。您也可以从这里找到现成的代码:

我写了一篇关于仪表板实现的短文,希望能对您有所帮助。您也可以从这里找到现成的代码:

Roman Nurik@romannurik编写了一个自定义仪表板布局类,简化了仪表板的创建:可以在

找到它,Roman Nurik@romannurik编写了一个自定义仪表板布局类,简化了仪表板的创建:可以在

找到它,ADT eclipse插件有一个混乱的图形预览器。按钮在真实设备上正确显示。ADT eclipse插件有一个混乱的图形预览程序。按钮在实际设备上正确显示如何使用此类?如何使用此类?