解决方案 »
- 为什么运行android2.1虚拟机一直是黑框
- Android平板电脑能否安装自己写的驱动?
- ListView中如何设置。可以让滚动时候不变为黄色?
- 奉劝大家,别急着去更新2.3
- ListView问题请教
- 关于Android的Ethernet状态广播(android.net.ethernet.ETHERNET_STATE_CHANGED)
- Android线程优先级问题
- Android将联系人信息放到ListView时报空指针异常
- 进入fastboot模式后,电脑连不上手机怎么办
- android静默安装
- 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>