Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.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_Android Layout_Android Fragments_Dashboard - Fatal编程技术网

Android仪表板模式作为片段

Android仪表板模式作为片段,android,android-layout,android-fragments,dashboard,Android,Android Layout,Android Fragments,Dashboard,是否可以将Google I/O中的android仪表板模式作为一个片段使用,以便在平板电脑的横向模式下,仪表板显示在左侧,而当前类别的内容显示在右侧 我尝试了一些类似于下面代码的东西,但不起作用 main.xml: 查看主/详细流程:这意味着我必须创建一个自定义列表视图,而不是使用Google I/O中的仪表板?我还没有使用过它,但如果我使用Eclipse创建一个新的Android应用程序,我可以选择它。好的,我将尝试一下:@Christoph:你找到任何解决方案了吗..如果是的话。。 <

是否可以将Google I/O中的android仪表板模式作为一个片段使用,以便在平板电脑的横向模式下,仪表板显示在左侧,而当前类别的内容显示在右侧

我尝试了一些类似于下面代码的东西,但不起作用

main.xml:


查看主/详细流程:这意味着我必须创建一个自定义列表视图,而不是使用Google I/O中的仪表板?我还没有使用过它,但如果我使用Eclipse创建一个新的Android应用程序,我可以选择它。好的,我将尝试一下:@Christoph:你找到任何解决方案了吗..如果是的话。。
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- Include dashboard -->
    <include layout="@layout/fragment_dashboard"/>

    <!-- Include details -->
    <fragment
        android:id="@+id/fragment_details"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.example.fragments.Details" />
</LinearLayout>
public class Details extends Fragment
{

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                        Bundle savedInstanceState)
        {
                View view = inflater.inflate(R.layout.details, container, false);

                return view;
        }

}