0
A
回答
0
斯普利特Android的活动,您应该使用片段劈裂屏幕的任何建议,将不胜感激谢谢面临的问题RTMP网址这个类允许你动态地显示多个任务。你可以使用片段类。
步骤: 1.创建片段级
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.ViewGroup;
public class yourFragmentName extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.article_view, container, false);
}
}
在您的活动创建的FrameLayout要展示的片段。
<FrameLayout android:id="@+id/your_placeholder" android:layout_width="match_parent" android:layout_height="match_parent"> </FrameLayout>
在主要活动,添加此布局片段
FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); // Replace the contents of the container with the new fragment ft.replace(R.id.your_placeholder, new FooFragment()); // or ft.add(R.id.your_placeholder, new FooFragment()); // Complete the changes added above ft.commit();
- 对于第二个片段也重复同样的。
有关详细说明,请参阅,https://guides.codepath.com/android/Creating-and-Using-Fragments
0
随着碎片的帮助,您可以缝在屏幕分成多个部分,每一个都有其自己的UI
相关问题
- 1. 如何将C++控制台屏幕分割成多个部分?
- 2. 分割屏幕一半CSS
- 3. 如何分割三个div的屏幕
- 4. 如何在iphone中分割屏幕?
- 5. Android垂直分割屏幕的一小部分
- 6. 如何在屏幕上水平分割屏幕
- 7. libgdx如何将屏幕分割4份
- 8. Cocos2d上的分割屏幕
- 9. SDL图像分割屏幕
- 10. Javascript分割屏幕视图
- 11. 如何捕获屏幕的一部分
- 12. ScrolledComposite垂直分割屏幕,内容显示在右半部分
- 13. Android,如何使googlemapview只存在于屏幕的一部分
- 14. WebView在屏幕的一部分(不是整个屏幕)
- 15. 分割数目为多于一个部分
- 16. 分成两个部分屏幕
- 17. 一个GNU屏幕会话可以分割和非分割工作区?
- 18. 将主页屏幕分割为两个屏幕
- 19. 在2格中水平分割屏幕
- 20. UIScrollView在屏幕的一部分
- 21. DirectX 11只在屏幕的一部分?
- 22. 将色环分割为多个部分
- 23. 将双分割成多个部分
- 24. 如何防止emacs在打开多个文件时水平分割屏幕?
- 25. 安卓:如何无效屏幕的多个部分
- 26. 有没有办法在GNU屏幕中自动分割屏幕?
- 27. 屏幕部分的屏幕截图
- 28. jquery的顶部和底部分割屏幕,限制页面的下半部分
- 29. UITableView部分当上一部分不在屏幕上iPhone
- 30. 如何用两个按钮分割屏幕?
欢迎计算器!请花些时间阅读[帮助页面](http://stackoverflow.com/help),尤其是名为[“我可以问些什么话题?”]的章节(http://stackoverflow.com/help/)讨论话题)和[“我应该避免问什么类型的问题?”](http://stackoverflow.com/help/dont-ask)。请参阅[tour](http://stackoverflow.com/tour)并阅读[如何提出良好问题](http://stackoverflow.com/help/how-to-ask)。最后,请学习如何创建[最小,完整和可验证示例](http://stackoverflow.com/help/mcve)。 – Markus