该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
(这里两行不知道干啥用的,删掉了)
android:layout_width="match_parent"
android:layout_height="match_parent"
(tools这行貌似也用不到,删掉了)
android:orientation="vertical" (这里用垂直)>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"(这里用水平)>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="电话号码:"//helloworld改成 电话号码:
后面一长串的几行都删了
/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入电话号码"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"(水平)>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="短信内容:"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入短信内容"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"(水平)>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="拨打电话"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发送短信"/>
线性不用指定坐标,指定坐标貌似是绝对布局用的,现在已经弃用了。我也是初学者,跟着一个老教程学的,所以我把多余的东西都删掉了,现在就这样就能实现你想的那个布局了,直接手写,不要拖,
分析一下布局,整体是垂直线性布局,垂直的3行,然后每行都是水平的2个控件,所以最外面需要一个垂直线性布局,里面是3个水平线性,
第一个水平线性里面写一个TextView和一个EditText,第二个跟第一个一样,第三个是两个Button
但是感觉这教程学不下去了,好多代码不能用了,直接报错,还有AppCompatActivity和Activity的各种不支持;直接跑真机,渣电脑模拟器无力
每天都要上度娘查几个小时,真心蛋疼,有基于Android studio的教程的话求分享
话说你这个程序能直接拨出去么,我真机试验的时候是拨不出去的,只能到拨号界面,需要自己点击拨号键,模拟器可以直接拨通另外一个模拟器。我问了下,貌似是系统限制了