Android仪表板模式作为片段
是否可以将Google I/O中的android仪表板模式作为一个片段使用,以便在平板电脑的横向模式下,仪表板显示在左侧,而当前类别的内容显示在右侧 我尝试了一些类似于下面代码的东西,但不起作用 main.xml: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中的仪表板?我还没有使用过它,但如果我使用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;
}
}