`
文章列表
/** * Tween 补间动画 * * @author lilin * @date 2011-9-5 下午04:03:40 * @ClassName: Main * @Description: 通过硬编码的方式 */ public class Main extends Activity implements OnClickListener { private Button b1, b2, b3, b4; private ImageView imageView; @Override public void onCreate(Bundle sav ...
android动画实现的2种方式: 1.Tween动画   alpha 渐变透明度 scale 渐变尺寸伸缩 translate 画面转换位置移动 rotate 画面转移旋转   有2种方式实现: 硬编码:在代码中实现 软编码:  在配置文件中配置   2.Frame动画  
    -------------------------------------------------------------------------------------------------------------------------   

DOM解析

    博客分类:
  • XML
DOM解析方法: public class DOM_Person { public static List<Person> getPersons(InputStream inStream) throws Throwable { List<Person> persons = new ArrayList<Person>(); /* 实例化一个文档构建器工厂 */ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); /* 通过文档构建器 ...

DOM4J

    博客分类:
  • XML
public class DOM_Person { public static List<Person> getPersons(InputStream inStream) throws Throwable { List<Person> persons = new ArrayList<Person>(); /* 实例化一个文档构建器工厂 */ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); /* 通过文档构建器工厂获取一个文档构建 ...

主界面 九宫图

public class Main extends Activity { // 主界面布局:网格布局 private GridView main_gridview = null; // 单项的名字 private String[] item_name = { "项目1", "项目2", "项目3", "项目4", "项目5", "项目6", "项目7", "项目8", "项目9" }; ...
Toast.makeText(getApplicationContext(), "默认Toast样式", 2000).show();   toast = Toast.makeText(getApplicationContext(), "自定义位置Toast", 2000); toast.setGravity(Gravity.CENTER, 0, 0);// 设置居中 toast.show(); toast = Toast.makeText(getApplicationContext(), "带图片的Toast", 20 ...
               public class MainActivity extends Activity implements Runnable, OnItemClickListener, OnClickListener { private static final int SEARCH_APP = 0; private static final int DELETE_APP = 1; GridView gridView; ListView listView; private List<PackageInfo> allpkgInfo; p ...
  android:layout_alignParentBottom="true"  <?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" an ...
package com.lilin.title; import android.app.Activity; import android.os.Bundle; import android.view.Window; public class Main extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_CUSTOM_TITL ...
<TextView android:layout_width="60px" android:layout_height="wrap_content" android:text="跑马灯测试1 2 3 4 5 6 7 8 9 0 " android:textSize="20sp" android:ellipsize="marquee" android:singleLine="true" ...
    public class Main extends Activity { Spinner spinner; EditText etEditText; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("系统默认的Spinner"); setContentView(R.layout.main); spinner = (Spinner) findViewById(R.id.spinner1); ...

自定义的Spinner

    public class Spinner2 extends Activity { final static int WRAP_CONTENT = -2;// 表示WRAP_CONTENT的常量 // 所有资源图片(足球、篮球、排球)id的数组 int[] imageId = { R.drawable.football, R.drawable.basketball, R.drawable.volleyball }; // 所有资源字符串(足球、篮球、排球)id的数组 int[] strID = { R.string.zq, R.string.lq, R.st ...
设置铃音
    public class Main extends Activity implements OnItemClickListener { private ListView listView;// 装载缩小的图片 private ImageAdapter imageAdapter; public static int imagePosition;// 图片的下标 public static Uri[] imageUri;// 图片的URL public static List<String> imagePaths;// 存放图片路径的List ...
Global site tag (gtag.js) - Google Analytics