04 2012 档案

摘要:public SimpleExpandableListAdapter(Contextcontext,List<? extends Map<String, ?>> groupData, int groupLayout,String[]groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData, int childLayout,String[]childFrom, int[] childTo)参数context 与SimpleExpa 阅读全文
posted @ 2012-04-22 15:36 Jun14 阅读(412) 评论(0) 推荐(0)
摘要:添加ContextMenu步骤:if(Activity类)1.声明一个ListView控件,并findViewById(id),或者GetListView()2.在Activity的onCreate()中,为Activity设置OnCreateContextMenuListener这时候,不需要写布局文件,就方便地拥有了一个呼出式的菜单3.复写Activity的onContextItemSelected()else if(ListActivity类)1.在Activity的onCreate()中为List添加ContextMenu(重要一步)registerForContextMenu(get 阅读全文
posted @ 2012-04-20 20:19 Jun14 阅读(939) 评论(0) 推荐(1)
摘要:public static void setEditTextReadOnly(TextView view){ view.setTextColor(R.color.read_only_color); //设置只读时的文字颜色 if (view instanceof android.widget.EditText){ view.setCursorVisible(false); //设置输入框中的光标不可见 view.setFocusable(false); ... 阅读全文
posted @ 2012-04-17 19:27 Jun14 阅读(1378) 评论(0) 推荐(0)
摘要:第一步:在布局文件中指定layout_width与layout_height在xml文件中设置的ImageButton的宽和高为:android:layout_width="100dp"android:layout_height="100dp"第二步:设置属性android:scaleTypeImageView的属性android:scaleType,即 ImageView.setScaleType(ImageView.ScaleType)。android:scaleType是控制图片如何 resized/moved来匹对ImageView的size。I 阅读全文
posted @ 2012-04-17 08:51 Jun14 阅读(1249) 评论(0) 推荐(0)