上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 96 下一页
摘要: “当在xml文件中配置了 android:configChanges="keyboardHidden|orientation"属性,在横紧屏切换的时候不会重新执行 Activity的onCreate方法,只是执行onConfigurationChanged方法,否则切换的时候会重新执行onCreate方法 阅读全文
posted @ 2012-06-11 16:17 幻星宇 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 在android开发的过程中,不同分辨率的兼容问题是经常遇到的.如下,在PAD应用开发的过程中,在PC上模拟器上运行的只是小分辨率的程序,而对于大小如同1027*768的,可能支持上不是很完美.除了把图片,布局文件放入不同的文夹中,如(drawable-mdpi, drawable-ldpi, layout-land.....)对大屏幕的支持还需要以下配置:<supports-screensandroid:smallScreens=["true" | "false"] android:normalScreens=["true" 阅读全文
posted @ 2012-06-11 16:02 幻星宇 阅读(903) 评论(1) 推荐(0) 编辑
摘要: TestPanels.javapackage com.panel;import java.util.ArrayList;import java.util.HashMap;import com.panel.EasingType;import com.panel.Panel.OnPanelListener;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.KeyEvent;import android.widget.GridView;import andr 阅读全文
posted @ 2012-06-11 10:42 幻星宇 阅读(1032) 评论(0) 推荐(0) 编辑
摘要: main.xml<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/white&quo 阅读全文
posted @ 2012-06-11 10:39 幻星宇 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 线性表,链表,哈希表是常用的数据结构,在进行Java开发时,JDK已经为我们提供了一系列相应的类来实现基本的数据结构。这些类均在java.util包中。本文试图通过简单的描述,向读者阐述各个类的作用以及如何正确使用这些类。Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组Object,即Collection的元素(Elements)。一些 Collection允许相. 阅读全文
posted @ 2012-06-08 14:34 幻星宇 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 1、要弄清楚这个问题,首先需要弄明白什么是implicit(隐藏) intent什么是explicit(明确) intent。Explicit Intent明确的指定了要启动的Acitivity ,比如以下Java代码: Intent intent= new Intent(this, B.class) Implicit Intent没有明确的指定要启动哪个Activity ,而是通过设置一些Intent Filter来让系统去筛选合适的Acitivity去启动。2、intent到底发给哪个activity,需要进行三个匹配,一个是action,一个是category,一个是data。理论上来说 阅读全文
posted @ 2012-06-08 12:07 幻星宇 阅读(3480) 评论(0) 推荐(0) 编辑
摘要: private Timer timer = new Timer();timer.schedule(task, 800);TimerTask task = new TimerTask() { @Override public void run() { intent = new Intent(LoadUI.this, LoadDataService.class); Bundle bundle = new Bundle(); bundle.putString("city", WeatherUtil.getDefaultCity(LoadUI.this)); bundle.pu.. 阅读全文
posted @ 2012-06-08 11:49 幻星宇 阅读(330) 评论(0) 推荐(0) 编辑
摘要: GIFView gif = new GIFView(LoadUI.this, R.drawable.progress); ((RelativeLayout) findViewById(R.id.progress)).addView(gif);GIFView.javapackage src.com.android.weather.util;import java.io.InputStream;import android.content.Context;import android.graphics.Bitmap;import android.graphics.Canvas;imp... 阅读全文
posted @ 2012-06-08 11:46 幻星宇 阅读(936) 评论(0) 推荐(0) 编辑
摘要: Android屏幕元素层次结构android.app.Activity对于一个Android应用来说,android.app.Activity类实例是一个最基本的功能单元。一个Activity实例可以做很多的事情,但是它本身无法显示在屏幕上,而是借助于Viewgroup和View,这两个才是Android平台上最基本的两个用户界面表达单元。android.view.ViewGroupViewGroup是一个特殊的View类,它继承于android.view.View。它的功能就是装载和管理下一层的View对象和ViewGroup对象。ViewGroup是布局管理器(layout)及view容器 阅读全文
posted @ 2012-06-04 17:32 幻星宇 阅读(1734) 评论(0) 推荐(0) 编辑
摘要: 在编写Android自定义按钮示例基础上,如果要指定字体大小产生这样的效果:其实是不需要自定义变量的,可以直接使用TextView的配置属性:<com.easymorse.textbutton.TextButton android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:text="电影" android:gravity="center_verti 阅读全文
posted @ 2012-06-04 17:09 幻星宇 阅读(867) 评论(0) 推荐(0) 编辑
上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 96 下一页