LinearLayout linlayout = (LinearLayout)findViewById(R.id.line);
// LinearLayout.LayoutParams ll = new LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
// LinearLayout.LayoutParams.FILL_PARENT);
RadioGroup rg = new RadioGroup(otherActivity.this);
RadioButton cate = new RadioButton(otherActivity.this);
cate.setText("收入");
RadioButton much = new RadioButton(otherActivity.this);
much.setText("支出");
rg.addView(cate);
rg.addView(much);
rg.setOrientation(LinearLayout.HORIZONTAL);
TextView mingmu = new TextView(otherActivity.this);
mingmu.setText("名目");
EditText edmingmu = new EditText(otherActivity.this);
TextView shumu = new TextView(otherActivity.this);
mingmu.setText("数目");
EditText edshumu = new EditText(otherActivity.this);
linlayout.addView(rg);
linlayout.addView(mingmu);
linlayout.addView(edmingmu);
linlayout.addView(shumu);
linlayout.addView(edshumu);
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<DatePicker
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/sv"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/line"
>
<RadioGroup
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收入"
android:checked="true"
android:id="@+id/income"
/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="支出"
android:id="@+id/outcome"
/>
</RadioGroup>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="名目:"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/categry"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="数目:"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/howmuch"
/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="确定"
android:id="@+id/thirdenter"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="添加更多"
android:id="@+id/thirdmore"
/>
</LinearLayout>
</LinearLayout>最后两个Button没有啦 请问怎么解决啊
!!!!
解决方案 »
- Android手机连接蓝牙打印机失败
- 一个简单的http post传参问题。小白求指教!在线求解答
- listView中ListItem Pressed的问题
- 请教/cache/recovery/command问题
- 安卓 EditText 取值问题
- HttpPost 请求网站证书问题
- android发布问题
- 用 android SDK and AVD manager 安装SDK出现如下错误。
- linearlayout的height可以在代码里动态改变吗?
- Android开发一个豆瓣app,报net.oauth.OAuthProblemException
- 急啊ksoap2调用webservice出错soapenv:Server' faultstring
- 上传图片到服务器 关于图片大小的问题
<LinearLyaout>
<scrollview>
</....><Linearlayout>
<button....>
</..>
</。。