第一步:添加一个下拉列表项的list,这里添加的项就是下拉列表的菜单项:
private List list = new ArrayList();
list.add("北京");
list.add("上海"); ==========》》数据源
list.add("广州");
list.add("深...
分类:
其他好文 时间:
2015-02-05 16:29:18
阅读次数:
171
实现步骤1. 修改布局文件代码activity_main.xml 1 6 7 12 13 2. 在AndroidManifest.xml中增加需要使用的权限1 2 3 4 5 6 android.permission.CAMERA:Required to be able to access...
分类:
移动开发 时间:
2015-02-02 01:54:30
阅读次数:
294
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.example.myviewdemo"
android:layout_width="match_parent"
android:l...
分类:
其他好文 时间:
2015-01-30 10:47:54
阅读次数:
99
android中RadioGroup、RadioButton、Spinner、EditText用法详解(含示例截图和源代码)
今天在项目中用到了android中常用的RadioGroup、RadioButton、Spinner、EditText等控件,在此介绍一下它们的用法,希望对需要的朋友有帮助。
一、RadioGroup和RadioButton的使用
二、Spinner的使用
三、EditText的使用
四、示例和源代码...
分类:
移动开发 时间:
2015-01-28 22:37:42
阅读次数:
258
一. 实现效果图如下 Android 中的下拉框为Spinner 组件,其效果图如上图片二. 实现代码 布局代码如下 设置数据源public class MainActivity extends Activity { private String[] items=new ...
分类:
移动开发 时间:
2015-01-24 21:12:01
阅读次数:
124
用户修改布局时,需要批量更新mysql的xxxx_layout_xxxx表。批量操作的数据量是2-30条/次。批量操作是这次项目在技术上比较关键的一个点,之前批量操作做过性能上的测试,mysql端问题不大,7000+tps,Java端的效率有些差,有优化空间。对批量的性能进行了测试,优化。过程如下。...
分类:
数据库 时间:
2015-01-22 11:01:43
阅读次数:
210
首先在xml里面加一个Spinner控件<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${packageName}...
分类:
移动开发 时间:
2015-01-21 20:33:45
阅读次数:
170
修改Spinner的样式,主要是在theme中实现
分类:
移动开发 时间:
2015-01-19 14:20:03
阅读次数:
272