- 博客(16)
- 收藏
- 关注
原创 显、隐式Intent的两种方式
public void jumpB(View view){ //显示Intent(两种方式) //1、 /*Intent intent=new Intent(this,BActivity.class); startActivity(intent);*/ //2、设置要跳转的组件的名字 /* Intent
2017-06-20 08:22:59 351
原创 栈退出应用程序
1、Activity的启动模式Standard(默认-标准启动模式)自己可以启动自己(在同一个栈里面,会创建一个新的Activity,可以创建n个Activity)SingleTop(顶单例模式)自己不能启动自己,别人可以跳自己(在栈顶只不允许有相同的Activity,在栈里可以有多个不同的Activity)SingleTask(内单列模式)自己不能启动自己,自己可以跳别人
2017-06-18 09:51:21 217
原创 android根据系统返回键,来退出应用程序的两种方式
点击返回键:弹出退出的对话框 @Override public boolean onKeyDown(int keyCode, KeyEvent event) { //点击返回键 if(keyCode==KeyEvent.KEYCODE_BACK){ //声明弹出对象并初始化 AlertDialog.Bu
2017-06-17 19:13:03 1563 1
原创 Android组件Activity之间传递数据
传递基本数据类型 基本数据类型: 整:byte short int long 浮点:float double 布尔:boolean 字符:char 引用: String 传递数据包Bundle (集装箱) 传递对象(对象集合) 返回数据
2017-06-16 23:47:58 239
原创 android 点击页面每行,跳转到另一个页面
实现思路:1、获取id2、获取数据3、给id设置适配器(Adapter)4、给id设置点击事件,循环1-10005、自定义适配器(内存溢出)(1)把布局文件转成view (2)设值(3)给按钮设置点击事件<LinearLayout xmlns:android="http://schemas.android.
2017-06-11 23:25:23 1773
原创 android 页面下拉刷新,添加新数据
实现思路:1、获取id2、获取数据new list3、实例化适配器ArrayAdapter4、给id设置下拉刷新的监听5、写一个类部类,添加新的数据 <com.handmark.pulltorefresh.library.PullToRefreshListView android:layout_width="match_parent" a
2017-06-11 23:22:09 1334
原创 android 实现A、B、C分组可点击
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"><ExpandableLis
2017-06-11 23:16:46 281
原创 android 模仿设置界面 A B C 分组
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"><ListView
2017-06-11 23:13:20 530
原创 android 二级联动,省份和城市
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"><Spinner
2017-06-11 22:47:47 1638 3
原创 Android studio自动完成文本框补全
xml version="1.0" encoding="utf-8"?>LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas
2017-06-08 16:56:43 1287
原创 ImageView、RadioGroup、RadioButton、button
实现多个按钮的单独选择,例布局xml version="1.0" encoding="utf-8"?>LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_p
2017-06-08 09:29:09 462
原创 Android 实现一个简单加载进度条的功能
实现一个简单加载进度条的功能,主要用的是这三个控件ProgressBarTextViewButton1、布局页面xml version="1.0" encoding="utf-8"?>LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
2017-06-07 23:35:57 4602
原创 Button、选择框、日期、时间控件
常用控件(二)按钮1、Button(按钮)Android:text 设置按钮上的文字(ImageButton不能有文字)Android:background 设置按钮的背景颜色2、imageButton(图片按钮)Android:src 设置背景图片Android:adjustViewBounts 调整边框以适应图片大小android:padding 设置图片的
2017-06-05 17:02:29 3739
原创 控件 TextView、EditText
常用控件一、文本控件:TextView(显示文本的控件)1、Android:text 设置文本框文本内容2、Android:autoLink 是否将符合指定格式的文本转换可单击的超链接形式,取值范围:none|web|email|phone|map|all3、android:singleLine 为true文本框不会换行4、Android:lines 默认占几行
2017-06-03 22:05:53 271
原创 android所有布局
Android布局、什么是布局?布局就是把界面的控件按照某种规律摆放在指定的位置,主要是为了解决应用程序在不同手机中的显示问题。 、Android实现布局有两种方式(1)代码:布局文件对应的Java类都是ViewGroup类的子 类(2)Xml配置文件:所有的布局文件都是放在res/layout文件夹中(布局支持嵌套) 、布局的一些基本属性andro
2017-06-03 13:40:21 411
原创 Android配置环境
第一种:手动集成1、首先要配置好jdk2、再安装好相对应版本的eclipse3、打开eclipse需要添加两个插件一个是SDK,一个是ATD.第一步:先下载好插件ATD,首先点击Help,找到Install New Softwere再点击Install New Softwere,进入之后把name改成adt,location改成设置为ATD-22.3.0.zip路径
2017-06-01 01:09:54 278
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人