[英]Android fullscreen table layout
I'm trying to obtain this layout in an Android application. 我正在尝试在Android应用程序中获取此布局。 http://img339.imageshack.us/img339/3374/screenshot1362677685476.png
http://img339.imageshack.us/img339/3374/screenshot1362677685476.png
I'm using table layout right now, but my table isn't stretched to fill all the container. 我现在正在使用表布局,但是我的表没有被拉伸以填充所有容器。
Here is an example of my layout: 这是我的布局示例:
<TableLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:stretchColumns="*" >
<TableRow>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageButton
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/##image##" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageButton
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/##image##" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageButton
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/##image##" />
</LinearLayout>
</TableRow>
<TableRow>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageButton
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/##image##" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageButton
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/##image##" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageButton
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:src="@drawable/##image##" />
</LinearLayout>
</TableRow>
Any suggestions? 有什么建议么?
yo just add this code to the activity where this layout is using 您只需将此代码添加到使用此布局的活动中
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
requestWindowFeature(Window.FEATURE_NO_TITLE);
//Full screen is set for the Window
setContentView(R.layout.activity_main);
requestWindowFeature(Window.FEATURE_NO_TITLE);
requestWindowFeature(Window.FEATURE_NO_TITLE);
will give you the full screen mode 将为您提供全屏模式
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.