解决方案 »
- 如何查看Minimum Required SDK, Target SDK, Compile With这些设置?
- 关于android中的contentProvider的问题
- 基于ViewGroup的滑动界面动态添加的数据为什么不显示?
- 在代码中如何实现关闭3G卡上网
- edittext 全选与软件盘
- JNI 里面 char 转 int 不是有符号扩展???
- 手机imsi\imei 这两个码哪个的哪几位代码表示手机所在省份地区
- Android涂鸦毛笔的效果
- 初学者提问 -- 如下代码向构造函数传参数的地方哪里写错了?
- andriod smack XMPP 怎么获取聊天室 的历史消息?
- vlc for android 编译问题No JNI_OnLoad found
- 关于BItmap.createScaledBitmap释放内存引发的bug
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="4"
android:gravity="center"
android:orientation="horizontal" > <Button
android:id="@+id/tv_dis_result"
android:layout_width="1dp"
android:layout_height="wrap_content"
android:layout_weight="3">
</Button>
</LinearLayout>
</LinearLayout>这方法能实现,不过布局有点繁琐...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_weight="3"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:layout_weight="1"
android:background="@color/red"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<Button
android:layout_weight="3"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>