实现无标题的两种方法:配置xml文件和编写代码设置1.在AndroidManifest.xml文件中进行配置实现全屏效果:android:theme="@android:style/Theme.NoTitleBar.Fullscreen"实现无标题栏(但有系统自带的任务栏):android:them... Read More
posted @ 2014-08-07 17:57 tinyphp Views(659) Comments(0) Diggs(0)
在AndroidManifest.xml文件的activity中配置1、android:theme="@android:style/Theme"默认状态,即如果theme这里不填任何属性的时候,默认为Theme2、android:theme="@android:style/Theme.NoDispl... Read More
posted @ 2014-08-07 17:54 tinyphp Views(460) Comments(0) Diggs(0)
@代表引用资源@*代表引用系统的非public资源,如:@*android:color/white@[package:]type/name引用自定义资源,如:android:text="@string/hello"?代表引用主题属性android:textColor="?android:textDi... Read More
posted @ 2014-08-07 17:08 tinyphp Views(614) Comments(0) Diggs(0)
感觉这种效果比较友好//两秒内按返回键两次退出程序 private long exitTime = 0; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode =... Read More
posted @ 2014-08-07 16:47 tinyphp Views(2903) Comments(0) Diggs(0)
在Android平台上捕获Back键的事件,super.onBackPressed()是执行系统的默认动作,就是退出当前activity,我们要做的就是重写onBackPressed()函数, public void onBackPressed(){ Toast.makeText(this,... Read More
posted @ 2014-08-07 16:08 tinyphp Views(28564) Comments(0) Diggs(1)
这实例很多人仿做,好实例还是不容错过!最重要是素材容易拿~效果:默认3页面的切换,最后一个页面带按钮,点击进入另外一个页面思路:1、准备5个布局页面,1个为主函数布局页面,3个为切换的页面(其一带按钮),1个为按钮点击进入的页面(这个需要Activity)。2、用适配器绑定相应的view,设置适配器... Read More
posted @ 2014-08-07 15:20 tinyphp Views(5590) Comments(0) Diggs(0)