- 博客(26)
- 资源 (8)
- 收藏
- 关注
原创 ListView的几种简单用法
1.简单的ListViewpackage com.example.list1;import android.app.Activity;import android.app.ListActivity;import android.os.Bundle;import android.view.Menu;import android.view.View;import android.widget.
2017-09-30 15:50:11 394
原创 ImageButton and EditText
ImageButton与Button类似,区别在于ImageButton可以自定义一张图片作为一个按钮,也正是因为使用了图片作为按钮,所以ImageButton按下与抬起的效果需要自己定义<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.
2017-09-30 11:33:02 149
原创 Fragment的一些其他属性
FragmentManager manager = getSupportFragmentManager();Fragment fragment = manager.findFragmentByTag("fragment3");FragmentTransaction transaction = manager.beginTransaction();transaction.hide(fragmen
2017-09-30 11:22:38 559
原创 有关回滚——FragmentTransaction
第一步:建立4个fragment.xml,分别叫做fragment1.xml,fragment2.xml,fragment3.xml,fragment4.xmlfragment1.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/andro
2017-09-29 16:58:24 273
原创 Fragemnt(静态添加Fragment,简单的动态添加Fragment)
在这里我们全部使用android-support-v4.jar包里Fragment,不用系统自带的Fragment;这两个基本一样,但V4包中的相对功能更强大一些。 第一步:新建一个项目工程添加一个fragment1.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.andro
2017-09-29 12:56:18 2059
原创 Android之补间动画Tween(set简单的一般够用)
5、set标签的使用到这里可能有的同学会说动画太单调,其实学好Tween动画你能做出好多比较酷炫的动画,这就要用到set标签了从它的名字我们也能够猜出来它是干什么用的,它就是一组动画的集合,也就是说我们可以让一个View同时执行多个动画,set标签自已是没有属性的,他的属性都是从Animation继承而来,但当它们用于Set标签时,就会对Set标签下的所有子控件都产生作用。 它所拥有的属性我们上面
2017-09-28 17:26:07 273
原创 Android开发之Tween(补间动画)
Tween动画的分类 首先来了解下补间动画的分类,在android中补间动画可以分为四类:alpha(渐变)、scale(缩放)、translate(位移)、rotate(旋转)。在这四种动画里每种动画拥有它的独有的属性的同时又拥有相同的属性,其中 alpha:渐变透明度动画效果 scale:渐变缩放动画效果 translate:渐变位置移动动画效果 rotate:渐变旋转动画效果,这四种
2017-09-28 16:03:07 144
原创 Animation之TranslateAnimation(平移动画)2
首先在activity_tween布局文件里面写了一个ImageView和一个Button,分别都加上id,为了添加点击事件。这个点击事件在下面会说到,请注意哦!<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" an
2017-09-27 21:17:26 574
原创 Animation之TranslateAnimation(平移动画)
TranslateAnimation(平移动画)的意思无非就是一张图片或其他从一个位置到达另外一个位置。直接代码分析,相关重要属性参数解释都在代码中。 1、首先编写main.xml文件。<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schema
2017-09-27 20:48:24 2349
原创 动画的使用1——Drawable Animation
Drawable Animation可以称为帧动画,因为它是通过每次播放一帧Drawable资源实现的。Drawable Animation算不上真正意义上的动画,因为它的内部实现是通过定时发送消息更新一个Drawable, 例如一个背景。所以使用这个动画的时候更像是使用一个背景资源,只不过更新背景的动作不用我们自己进行。 也许正是因为这个原因,android官方建议我们将这个动画资源放在dra
2017-09-27 17:03:37 472
原创 android中插入图片的三种方式
1.<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_
2017-09-14 13:54:16 33968 3
原创 AnalogClock and DigitalClock
AnalogClock在android中用来模拟时钟,他在显示时只显示时针和分针<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_par
2017-09-14 12:36:23 224
原创 Intent的几个基本事件
在xml添加几个按钮 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=
2017-09-11 21:28:20 348
原创 Intent之打电话
下面是一个简单的打电话的功能<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_heig
2017-09-10 21:25:19 637
原创 Gallery
今天起来简单学习了一下Gallery,Gallery就像是我门在手机里面翻动相片的功能 仿照课本写了一个简单的DEMO<?xml version="1.0" encoding="utf-8"?><Gallery xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gallery" a
2017-09-10 11:47:15 218
原创 ListView
今天来说一下ListView ListView的使用有二种方式 1.直接使用ListView组件创建 修改xml里面的内容<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android
2017-09-09 21:05:59 139
原创 CheckBox
CheckBox很好的一个的实例<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent"
2017-09-09 18:21:38 182
原创 RadioButton
这里面主要就是说明二中不同的获取按钮选中的值 让我们看下代码<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" an
2017-09-09 17:29:09 210
原创 ToggleButton
ToggleButton继承自Button 所以他支持Button所有的属性 而且还有二个特殊的属性 android:textOn 设置控件在显示时选中的文本 android:textOff 设置控件在显示时未选中的文本 使用ToggleButton对象的getTextOff获取ToggleButton组件未选中时的文本 使用ToggleButton对象的getTextOn获取Toggle
2017-09-09 16:37:12 311
原创 AutoCompleteTextView
完成以上任务自动搜索功能 代码如下<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layou
2017-09-09 15:30:32 253
原创 EditText
主要练习 inputType属性 EditText是TextView的子类 所以方法和TextView一样使用 运行结果如下 什么都不说了直接上main.xml的代码吧 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android
2017-09-09 13:48:27 196
原创 简单学习TextView
XML的几个特殊属性 android:autoLink 用于指定是否将文本转换成可点击的超链接形式,它的属性值有none,web,email,phone,map或all android:drawBottom 用于将图片添加到文本的低端 同理还有上,左,右 android:hint 当文本为空时,默认显示的是什么 android:Grivaity 文本的对齐方式 android:inputT
2017-09-09 13:35:42 210
原创 简单对话框1
本来不打算写这个的 很简单 可是我调试了好多遍 下面把代码附上 就是点击一个按键 弹出一个简单对话框package com.example.main;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import android.content.DialogInterfa
2017-09-08 20:42:08 192
原创 混合使用XML布局文件和代码控制视图
本实例包含二个布局文件 activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" an
2017-09-08 19:08:02 497 1
原创 android之在代码中控制视图
将其他视图添加到当前容器的视图需要如下几步骤 1.获得当前容器的对象 2.获得或创建待添加的视图对象 3.将相应的视图添加到容器视图中 假设有二个xml布局文件。text1.xml,text2.xml,布局文件的根节点都是将text2.xml添加到test.xml 代码:package com.binbin.activity;import android.app.Activity;imp
2017-09-08 13:29:47 299
Spring Boot 2企业应用实战.pdf
2018-11-01
传智播客2018年SpringBoot与Shiro整合
2018-09-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人