全代码布局,使用了TextView、EditText、ScrollView、Spinner、ArrayAdapter、LinearLayout、RelativeLayout、ExpandableListView、BaseExpandableListAdapter等控件,其中ExpandableListView是属于复杂的控件。...
分类:
其他好文 时间:
2015-04-16 23:45:45
阅读次数:
169
AutoCompleteTextView 能够实现当用户输入信息的时候自动提示的功能,但是AutoCompleteTextView只能提示一次,而MultiAutoCompleteTextView也能实现信息提示的功能,而且是以逗号隔开,实现多次提示。
activity_main.xml:
<LinearLayout xmlns:android="http://schemas....
分类:
移动开发 时间:
2015-04-16 19:52:13
阅读次数:
166
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
lp.setMargins(10, 20, 30, 40);
imageView.setLayoutPara...
分类:
其他好文 时间:
2015-04-16 17:41:06
阅读次数:
805
public class TestActivity extends Activity {
/**代码中写布局的View*/
private LinearLayout mParentLinearLayout;
/**标题TextView*/
private TextView mTitleTv;
/**展示数据的ListView*/
private ListView mListView;
...
分类:
其他好文 时间:
2015-04-16 12:34:41
阅读次数:
101
前段时间 遇到 listview 和scrollview 布局的问题 ,现在提供一个解决方案 if (listAdapter == null || listAdapter.getCount() == 0) {
return;
}
int totalHeight = 0;...
分类:
移动开发 时间:
2015-04-16 12:29:04
阅读次数:
131
activity_main.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
andro...
分类:
移动开发 时间:
2015-04-15 21:34:20
阅读次数:
164
activity_main.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:l...
分类:
移动开发 时间:
2015-04-15 21:33:18
阅读次数:
200
一、如何在android中嵌入布局文件:新建一个布局title.xml,该文件为公共文件我们在主页面中添加如下代码:即可引入公共布局文件二、如何创建自定义控件在以上代码的基础上新建如下代码:public class TitleLayout extends LinearLayout { publ...
分类:
移动开发 时间:
2015-04-15 20:56:09
阅读次数:
156
xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"...
分类:
其他好文 时间:
2015-04-15 17:08:01
阅读次数:
168
xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"...
分类:
其他好文 时间:
2015-04-15 13:34:28
阅读次数:
231