随笔分类 - Android
摘要:1 不带回调的调起和返回 调起 //获取Intent Intent intent = new Intent(this,Main2Activity.class); //获取输入框中的数据 String par = et_par.getText().toString(); //把参数放到inten里面传
阅读全文
摘要:Intent: 意图 Intent(Context packageContext, Class<?> cls) : 用于创建显示意图对象 Intent(String action): 用于创建隐式意图对象 putExtra(String name, Xxx value): 保存额外数据 Xxx ge
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android
阅读全文
摘要:通过VIewSwitcher切换视图。这个用到了baseAdapter,还是不太懂,先记个笔记。 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="matc
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android
阅读全文
摘要:中秋节学习,, 通过拖动滑块,改变图片的透明度 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orient
阅读全文
摘要:顾名思义,就是进度条。 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="verti
阅读全文
摘要:使用stackView,表现出view堆叠的效果,可以拖动,也可以触发事件切换 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android
阅读全文
摘要:使用AdapterViewFiller组件设置图片轮播,该组件可以自动切换view <?xml version="1.0" encoding="utf-8" ?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/an
阅读全文
摘要:这个东西用法基本固定,不知道能不能做三级的展开。 界面代码 主程序代码
阅读全文
摘要:利用GridView和SimpleAdapter实现这个效果 主界面布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
阅读全文
摘要:这个比较简单,只是将AutoCompleteTextView绑定一个ArrayAdapter就可以了。 界面布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.c
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android
阅读全文
摘要:这个adapter用起来稍微复杂一点。 首先我们看main_activity的布局 在界面上只有一个listView 然后,我们在主函数里面利用simpleAdapter向这个listView填充内容 package com.example.adapter import android.suppor
阅读全文
摘要:利用ArrayAdapter向ListView中添加数据 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:o
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android
阅读全文
摘要:界面代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" a
阅读全文
摘要:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android
阅读全文

浙公网安备 33010602011771号