- 浏览: 281749 次
- 性别:
- 来自: 广州
最新评论
-
xianwubiao:
坑爹。。。。。
IOS之简单选择器UIPickerView(省份+城市) -
yanransysu:
为啥结果没有显示图片嘞,我都已经把你共享的文件给放进去了?
IOS之集合视图UICollectionView -
ajxjwha:
获取的总是空,为什么?!
IOS之简单选择器UIPickerView(省份+城市) -
如果宅:
附件下载下来是图片!
IOS之集合视图UICollectionView -
ikrboy:
小红星凯 写道找不到pickview 那个协议怎么搞?步骤写得 ...
IOS之简单选择器UIPickerView(省份+城市)
文章列表
ProgressBar进度条
- 博客分类:
- Android控件应用
一、三种类型的进度条
progress_bar.xml
<?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"
android:layout_height= ...
一、DatePicker与TimePicker动态输入时间和日期
private int mYear;
private int mMonth;
private int mDay;
private int mHour;
private int mMinute;
TextView tv;
TimePicker tp;
DatePicker dp;
public void onCreate(Bundle savedInstanceState) {
Calendar c = Calendar.get ...
AnalogClock时钟
- 博客分类:
- Android控件应用
一、AnalogClock时钟显示时间
protected static final int GUINOTIFIER = 0x1234;
private TextView mTextView;
public AnalogClock mAnalogClock;
public Calendar mCalendar;
public int mMinutes;
public int mHour;
public Handler mHandler;
private Thread mClockThread;
public void onCreate ...
一、AutoCompleteTextView的应用
private static final String[] autoStr = new String[] { "abb", "abc",
"abcd", "abcde" };
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/* 载入main.xml Layout */
setContentView(R ...
Toast控件的应用
- 博客分类:
- Android控件应用
一、Toast自定义显示位置效果
Toast toast = Toast.makeText(getApplicationContext(),
"自定义位置Toast", Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
二、Toast带图片
Toast toast = Toast.makeText(getApplicationContext(),"带图片的Toast", Toast.LENGTH_L ...
CheckBox多选项的应用
- 博客分类:
- Android控件应用
一、CheckBox多选项的创建
mCheckBox1 = (CheckBox) findViewById(R.id.myCheckBox1);
/* 设定OnCheckedChangeListener给三个CheckBox对象 */
mCheckBox1.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener(){
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
i ...
RadioBox单选框应用
- 博客分类:
- Android控件应用
一、RadioBox单选框的使用
public RadioGroup mRadioGroup1;
public RadioButton mRadio1, mRadio2;
public Button button1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout. ...
主程序代码:
private SimpleAdapter listItemAdapter; // ListView的适配器
private ArrayList<HashMap<String, Object>> listItem; // ListView的数据源,这里是一个HashMap的列表
private IphoneListView myList; // ListView控件
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance ...
PopupWindow悬浮窗口
- 博客分类:
- Android控件应用
PopupWindow其实类似于一个不能动的Widget(仅从显示效果来说!),它是浮在别的窗口之上的.。
import android.view.ViewGroup.LayoutParams;
handler = new Handler(){
public void handleMessage(Message msg){
switch(msg.what){
case 1:
Context mContext = Main.this;
LayoutInflater mLayoutInflater = (LayoutInflater) ...
Spinner下拉菜单
- 博客分类:
- Android控件应用
一、Spinner自定义下拉菜单
private Spinner mySpinner;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.spinner);
final String[] countriesStr = { "台北市", "台北县", "台中市", "高雄市" };
ArrayAdapter& ...
Button控件应用
- 博客分类:
- Android控件应用
一、自定义背景的Button
android:background="@drawable/btn"
res/drawable/btn.xml
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="false" ...
Gallery控件的运用
- 博客分类:
- Android控件应用
一、Gallery的拖动图片特效
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.koo);
Gallery gallery = (Gallery)findViewById(R.id.gallery1);gallery.setAdapter(new ImageAdapter(this));
}
public class ImageAdapter extends BaseAdapt ...
Menu功能菜单
- 博客分类:
- Android控件应用
一、OptionsMenu的创建
private final int MENU_ABOUT = Menu.FIRST;
private final int MENU_EXIT = Menu.FIRST + 1;
public boolean onCreateOptionsMenu(Menu menu){
String menuLabels[] = {"关于" , "退出"};
for( int order = 0 ; order < menuLabels.length ; order++ ){
menu.add( ...
一、与线程的结合
final CharSequence strDialogTitle = getString(R.string.str_dialog_title);
final CharSequence strDialogBody = getString(R.string.str_dialog_body);
// 显示Progress对话框
myDialog = ProgressDialog.show(EX03_18.this, strDialogTitle,
strDialogBody, true);
new Thread() {
...
EditText控间的运用
- 博客分类:
- Android控件应用
一、打勾显示输入的密码
private EditText et;
private CheckBox cb;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.password);
et = (EditText)findViewById(R.id.editText1);
cb = (CheckBox)findViewById(R.id.checkBox1);
cb ...