界面布局
Terrence_he
studying, working
展开
-
Android中LayoutParams总结
LayoutParams are used by views to tell their parents how they want to be laid out. See ViewGroup Layout Attributes for a list of all child view attributes that this class supports.The base Layou转载 2017-10-27 11:36:04 · 792 阅读 · 0 评论 -
Android视图控件架构之LayoutInflater
LayoutInflater的作用是将layout目录下的xml布局文件加载到代码中并实例化为View类对象,它在android源码中的目录为frameworks\base\core\java\android\view\LayoutInflater.java。在编码过程中有两种方法获取它的实例:1.LayoutInflater inflater = (LayoutInflater)contex原创 2017-10-25 16:48:57 · 319 阅读 · 0 评论 -
android selector详解
--> 改变字体的颜色xmlns:android="http://schemas.android.com/apk/res/android"> android:color="@android:color/black" android:state_window_focused="false" /> android:color="@android:color/bac转载 2017-10-14 13:20:36 · 820 阅读 · 0 评论 -
Android中shape属性详解
一、简单使用刚开始,就先不讲一堆标签的意义及用法,先简单看看shape标签怎么用。1、新建shape文件首先在res/drawable文件夹下,新建一个文件,命名为:shape_radius.xml内容是这样的:(先不需要理解,先看shape怎么用) [html] view plaincopyprint?xml version="1.0" enc转载 2017-10-14 14:49:09 · 362 阅读 · 0 评论 -
android中xmlns:tools属性详解
感谢原文作者的无私分享,原文地址:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0309/2567.html第一部分安卓开发中,在写布局代码的时候,ide可以看到布局的预览效果。但是有些效果则必须在运行之后才能看见,比如这种情况:TextView在xml中没有设置任何字符,而是在acti转载 2017-10-26 17:54:44 · 322 阅读 · 0 评论 -
declare-styleable是给自定义控件添加自定义属性用的
declare-styleable是给自定义控件添加自定义属性用的1.首先,先写attrs.xml<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="TestAttr"> <attr name="name"转载 2018-04-02 15:25:34 · 591 阅读 · 0 评论