序:今天项目中用到了开关按钮控件,查阅了一些资料特地写了这篇博客记录下。 1.Switch 这里layout_width:这能设置整个布局的宽度,不能设置具体的Switch的大小,需要使用switchMinWidth属性来设置。 thumb:文字所携带的背景,设置为背景色进行隐藏。不设置会出现一个背 ...
分类:
移动开发 时间:
2017-11-17 14:59:56
阅读次数:
200
EditText 1、 <CounterTextLayout android:id="@+id/input_translation" android:layout_width="match_parent" android:layout_height="wrap_content" android:la ...
分类:
其他好文 时间:
2017-09-25 09:46:53
阅读次数:
232
layout_weight : 用于指定剩余空闲空间的分割比例。 来源:http://blog.csdn.net/yanzi1225627/article/details/24667299 还有一句话很好理解 [定义了2个控件的 layout_width="0dp", layout_weight=" ...
分类:
移动开发 时间:
2017-09-17 11:43:37
阅读次数:
214
1、依赖里面加入 compile 'com.github.bumptech.glide:glide:3.6.1'2、布局里面放置一个ImageView控件 <ImageView android:id="@+id/img" android:layout_width="match_parent" and ...
分类:
其他好文 时间:
2017-09-14 16:51:49
阅读次数:
155
Spinner使用一 一、使用方法 1、在layout中创建Spinner控件 <Spinner android:id="@+id/spinner1" android:layout_width="match_parent" android:layout_height="wrap_content" / ...
分类:
其他好文 时间:
2017-08-15 10:04:55
阅读次数:
147
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an ...
分类:
移动开发 时间:
2017-08-13 20:49:45
阅读次数:
236
<EditText Android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="phone" /> //文本类型,多为大写、小写和数字符号。 android:inputType= ...
分类:
其他好文 时间:
2017-08-11 00:57:28
阅读次数:
250
近期看到同事写的一段代码,非常easy吧就是: <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" an ...
分类:
移动开发 时间:
2017-08-06 23:06:13
阅读次数:
287
效果: <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" ...
分类:
其他好文 时间:
2017-08-06 11:02:06
阅读次数:
133
通过indeterminateDrawable属性去自己定义ProgressBar方法: <ProgressBar android:id="@+id/pb" android:layout_width="30dp" android:layout_height="30dp" android:layout ...
分类:
移动开发 时间:
2017-07-31 13:30:25
阅读次数:
214