摘要: 设计效果: 在xml中布局设置: 在dreawable中shapecount文件代码如下: 阅读全文
posted @ 2017-02-09 17:29 雏鹰的梦想 阅读(315) 评论(0) 推荐(0)
摘要: import java.util.HashMap;import java.util.Iterator;import java.util.Calendar;public class HashMapTest {public static void main(String[] args) {HashMap hashmap = new HashMap();hashmap.put(“min”,"hello");hashmap.put(“max”,"hello");Iterator iterator = hashmap.keySet().iterator();whi 阅读全文
posted @ 2013-07-09 11:25 雏鹰的梦想 阅读(575) 评论(0) 推荐(0)
摘要: public class Sort_Suan { /** * @param args * 对数组进行排序冒泡排序、选择排序、插入排序、希尔排序、数组排序 * 五种排序的方法 */ public static void main(String[] args) { // TODO Auto-generated method stub int a[] = new int[7]; a[0]=12; a[1]=8; a[2]=5; a[3]=6; a[4]=9; a[5]=4; a[6]=11; int temp; System.out.print("这是原数组:"); for(in 阅读全文
posted @ 2013-07-09 11:10 雏鹰的梦想 阅读(177) 评论(0) 推荐(0)
摘要: Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 ... 阅读全文
posted @ 2013-07-09 11:08 雏鹰的梦想 阅读(293) 评论(0) 推荐(0)
摘要: 相对布局RelativeLayoutandroid.widget.RelativeLayout.LayoutParams 有一个构造函数:RelativeLayout.LayoutParams(int w, int h),参数指定了子 View 的宽度和高度,这一点和其父类是一样的。而实现相对布局的关键在它的 两个 addRule 方法上。anchor 参数指定可以是 View 的 id(“相对于谁”)、RelativeLayout.TRUE(启用某种对齐方式) 或者 是-1(应用于某些不需要 anchor 的 verb);AddRule 方法的 verb 参数指定相对的“动作:ALIGN_B 阅读全文
posted @ 2013-07-09 10:58 雏鹰的梦想 阅读(278) 评论(0) 推荐(0)
摘要: 设置edittext不可编辑 xml文件:android:editable java代码:setEditable()设置edittext密码模式EditText id = (EditText)findViewById(R.id.edit); id.setTransformationMethod(PasswordTransformationMethod.getInstance()); 阅读全文
posted @ 2013-07-09 10:43 雏鹰的梦想 阅读(156) 评论(0) 推荐(0)
摘要: package com.example.mysqldata;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message;public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { ... 阅读全文
posted @ 2013-07-09 10:36 雏鹰的梦想 阅读(384) 评论(0) 推荐(0)
摘要: int -> Stringint i=123456789;String s="";第一种方法:s=i+"";第二种方法:s=String.valueOf(i); 1 public class Text { 2 3 public static void main(String[] args){ 4 5 int i = 123456789; 6 String s = String.valueOf(i); 7 System.out.println("s=====>"+s); 8 } 9 10 }显示结果: s=====>1 阅读全文
posted @ 2013-06-17 18:07 雏鹰的梦想 阅读(111) 评论(0) 推荐(0)