上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 68 下一页
ViewPager,它是google SDk中自带的一个附加包的一个类,可以使视图滑动。步骤:1、引入android-support-v4.jar包,在主布局里加入 2、加载切换内容3、ViewPager加载适配器PagerAdapterpublic class MainActivity... Read More
posted @ 2014-08-05 16:01 tinyphp Views(73217) Comments(1) Diggs(0)
LayoutInflater作用是将layout的xml布局文件实例化为View类对象。对于一个没有被载入或者想要动态载入的界面,都需要使用LayoutInflater.inflate()来找 res/layout下的 xml 布局文件,并且实例化为View类对象;获取LayoutInflater的... Read More
posted @ 2014-08-05 11:28 tinyphp Views(2929) Comments(0) Diggs(0)
现在很多的Android程序都在标题栏上都显示了一些按钮和标题,这里尝试做个实例在onCreate中添加://自定义标题requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);setContentView(R.layout.main);//设置标题为某个l... Read More
posted @ 2014-07-31 17:34 tinyphp Views(39864) Comments(4) Diggs(5)
放在startActivity(intent);后面overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);更多请看:http://blog.csdn.net/i5suoi/article/details/1... Read More
posted @ 2014-07-31 15:23 tinyphp Views(1230) Comments(0) Diggs(0)
接通过ImageView创建一个全屏的图片: 新建activity:package com.example.testwelcome;import android.app.Activity;import android.content.Intent;import android.os.Bundl... Read More
posted @ 2014-07-31 11:28 tinyphp Views(1283) Comments(0) Diggs(0)
Toast是简单的消息提示框,一定时间后自动消失,没有焦点。1、简单文本提示的方法:Toast.makeText(this, "默认的toast", Toast.LENGTH_LONG).show();或//参数1:当前的上下文环境。this或getApplicationContext()//参数2... Read More
posted @ 2014-07-31 09:57 tinyphp Views(1636) Comments(0) Diggs(0)
微信Tab预览效果:思路:1、用TabHost+RadioGroup搭建基本布局,以RadioGroup代替TabWidget2、设置按钮和文字的的样式和selector3、创建相应的Activity4、实现按钮和内容切换布局: ... Read More
posted @ 2014-07-30 16:04 tinyphp Views(13555) Comments(1) Diggs(0)
ImageView是Android中的基础图片显示控件,该控件有个重要的属性是ScaleType,该属性用以表示显示图片的方式,共有8种取值matrix 用矩阵来绘制(从左上角起始的矩阵区域)fitXY 把图片不按比例扩大/缩小到View的大小显示(确保图片会完整显示,并充满View)fitSta... Read More
posted @ 2014-07-30 10:58 tinyphp Views(874) Comments(0) Diggs(0)
TabHost是整个Tab的容器,包含TabWidget和FrameLayout两个部分,TabWidget是每个Tab的表情,FrameLayout是Tab内容。实现方式有两种:1、继承TabActivity2、继承Activity类>>两个方法实例下载方法一:继承TabActivity从TabA... Read More
posted @ 2014-07-29 11:25 tinyphp Views(55683) Comments(0) Diggs(0)
注意requestWindowFeature必须在 setContentView()之前调用。1.DEFAULT_FEATURES:系统默认状态,一般不需要指定2.FEATURE_CONTEXT_MENU:启用ContextMenu,默认该项已启用,一般无需指定3.FEATURE_CUSTOM_TI... Read More
posted @ 2014-07-23 17:01 tinyphp Views(1360) Comments(0) Diggs(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 68 下一页