官方地址:http://developer.android.com/guide/practices/screens_support.html一、关于布局适配建议1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽量使用权重(android...
分类:
移动开发 时间:
2015-09-02 18:56:21
阅读次数:
326
res/layout 中设置布局文件
hint属性:提示输入信息
text属性:与hint的区别---hint仅仅是提示;
text是实际的内容
讲布局xml文件引入到activity当中
setContentView(R.layout.main_activity);将布局文件与当前文件关联
wrap_content:包裹实际文本内容
fill_parent:当前控件铺满父类容器(2...
分类:
移动开发 时间:
2015-08-30 14:25:05
阅读次数:
155
import QtQuick 2.4import QtQuick.Window 2.2Window { visible: true MainForm { anchors.fill: parent } Rectangle{ width: 300 ...
分类:
其他好文 时间:
2015-08-27 22:30:37
阅读次数:
220
项目结构activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fi...
分类:
微信 时间:
2015-08-26 15:52:22
阅读次数:
491
3.自动拨号,打开网页等功能:
注意不要忘了导入权限
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:autoLink="all"//设置链接的支持功能,all代表支持全部功能,还可以选择,也可以单独选
...
分类:
移动开发 时间:
2015-08-19 20:32:36
阅读次数:
154
在游戏时,不管是退出游戏还是选择战机,都要弹出一个对话框,需要以下代码按一个按钮弹出对话框Layout文件:(添加一个按钮)<Buttonandroid:id="@+id/button1"android:layout_width="fill_parent"android:layout_height="wrap_content"android:text="准备起飞"/>在Main..
分类:
移动开发 时间:
2015-08-16 23:27:49
阅读次数:
232
ScrollView中的组件设置android:layout_height="fill_parent"不起作用的解决办法在ScrollView中添加一个android:fillViewport="true"属性就可以了。顾名思义,这个属性允许 ScrollView中的组件去充满它。 1 例子,在Sc...
分类:
其他好文 时间:
2015-08-13 17:56:41
阅读次数:
112
源码里看下就知道了。。 -1不代表宽度,代表MATCH_PARENT常量的值public static final int FILL_PARENT = -1;public static final int MATCH_PARENT = -1;public static final int WRAP_...
分类:
其他好文 时间:
2015-08-11 13:36:16
阅读次数:
136
常用组件
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:layout_width="wrap_content"
android:id="@+id/textV...
分类:
移动开发 时间:
2015-08-08 00:04:40
阅读次数:
126
1、xml中引用ViewPager
android:id="@+id/viewPager"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="...
分类:
其他好文 时间:
2015-08-07 20:18:23
阅读次数:
166