在进行开发工程中,由于业务的需要我们经常会使用到权重的应用,但是大家有没有知道权重是怎么进行计算的,下面我们看下两个布局的表现形式: 此时的代码是这样的: 然而当我们将android:layout_height="match_parent"换成android:layout_height="wrap_ ...
分类:
其他好文 时间:
2018-03-11 21:08:47
阅读次数:
137
View是android的基本视图,所有控件和布局都是直接或者间接由View派生而来。 1.id:编号 2.layout_width:宽度 3.layout_height:高度 4.各种margin:外边距 5.minWidth:最小宽度 6.minHeight:最小高度 7.background: ...
分类:
其他好文 时间:
2018-01-27 22:16:52
阅读次数:
184
侧滑菜单。。。。。。。。。。。。。。 布局:<android.support.v4.widget.DrawerLayout android:id="@+id/drawer" android:layout_width="match_parent" android:layout_height="matc ...
分类:
其他好文 时间:
2017-12-08 16:32:43
阅读次数:
163
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
对于ScrollView内嵌ListView,我们需要解决两个问题。 1.ListView在layout_height为以下三种任何一种情况的时候,仅一个item可见的问题。 wrap_content match_parent 0dp+ layout_weight = 1 解决方案: 1.给List ...
分类:
其他好文 时间:
2017-09-08 19:35:37
阅读次数:
206
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
<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
通过indeterminateDrawable属性去自己定义ProgressBar方法: <ProgressBar android:id="@+id/pb" android:layout_width="30dp" android:layout_height="30dp" android:layout ...
分类:
移动开发 时间:
2017-07-31 13:30:25
阅读次数:
214
在将UITableView的tableHeaderView设置为我自己创建的View的时候, 当我为这个自定义View添加约束之后启动调试,然后符号断点UIViewAlertForUnsatisfiableConstraints命中了, 终端输出了如下的报错信息: 这其实是CollectionVie ...
分类:
移动开发 时间:
2017-07-28 15:46:37
阅读次数:
1177