码迷,mamicode.com
首页 >  
搜索关键字:match_parent    ( 614个结果
SharedPreferences作业
安卓作业: 使用SharedPreference将姓名和年龄信息保存到文件,然后再读取 1.主要xml文件代码: <EditText android:id="@+id/name" android:layout_width="match_parent" android:layout_height="w ...
分类:其他好文   时间:2017-05-09 23:11:23    阅读次数:251
android 带文字阴影的button
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an ...
分类:移动开发   时间:2017-04-21 18:54:02    阅读次数:255
Android控件常见属性
1.宽/高android:layout_width android:layout_height// 取值match_parent //匹配父控件wrap_content //自适应,根据内容 如果指定宽度,请用单位dp 2.控件在父控件中的对齐位置android:layout_gravity 3.控 ...
分类:移动开发   时间:2017-04-16 09:34:23    阅读次数:195
安卓开发中的4中基本布局
1.LinearLayout(线性布局) (1)如果LinearLayout的排列方向是horizontal,内部的控件就绝对不能将宽度指定为match_parent,因为这样的话,单独一个控件会将整个水平方向占满,其他控件就没有可以放置的位置了。 同理如果LinearLayout的排列方向是ver ...
分类:移动开发   时间:2017-03-25 14:09:54    阅读次数:214
为什么你的自定义View wrap_content不起作用?
前言 自定义View是Android开发中非常常用的知识 可是,在使用过程中,有些开发者会发现:为什么自定义View 中设置的wrap_content属性不起作用(与match_parent相同作用)...
分类:其他好文   时间:2017-03-14 12:24:29    阅读次数:343
WebView简单实用讲解
AdroidManifest.XML文件: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_heig ...
分类:Web程序   时间:2017-03-09 13:12:05    阅读次数:207
RecyclerView+FloatingActionButton应用
一.效果图 二.实现步骤 1.XML布局-添加依赖 1 <LinearLayout 2 android:id="@+id/layout" 3 android:layout_width="match_parent" 4 android:layout_height="wrap_content" 5 an ...
分类:其他好文   时间:2017-02-09 23:43:53    阅读次数:1507
带删除按钮的EditText
在使用输入框的时候,常常需要在输入框后带有一键清除输入内容的按钮。采用自定义View的方式是复用性较高的方法。另一方面也可以采用控件“控件+监听”的较为简单的方法来实现。 布局文件: <LinearLayout android:layout_width="match_parent" android:layout_height="..
分类:其他好文   时间:2017-02-09 16:28:30    阅读次数:123
Android学习笔记(七) 布局基础
一、概念 控件布局方法,就是指控制控件在Activity当中的位置、大小、颜色以及其他控件样式属性的方法。有两种方法可以控制布局: 二、分类 (其中RelativeLayout和ListView最为常用) 设置宽、高的两个重要参数:wrap_content(内容包裹)、match_parent(填充 ...
分类:移动开发   时间:2017-01-26 20:38:47    阅读次数:339
android studio 怎么做屏幕适配?
一、关于布局适配建议1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽量使用权重(android:layout_weight)4、如果是纯色背景,尽量使用android的shape 自定义。5、如果需要在特定分辨率下适配,可以在res目 ...
分类:移动开发   时间:2017-01-24 16:06:24    阅读次数:229
614条   上一页 1 ... 7 8 9 10 11 ... 62 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!