自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 menu

1、选项菜单/** * 此方法会在父类的onCreate方法中进行回调,用于创建 一些选项菜单 */ @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. // 1.根

2016-06-07 20:53:20 297 1

原创 一些基础的控件

1、Switch<Switch android:id="@+id/switch1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignLeft="@+id/button1" andro

2016-06-07 20:36:59 206

原创 viewPager

ViewPager(视图分页)1、在布局文件中添加android.support.v4.view.ViewPager/><android.support.v4.view.ViewPager android:id="@+id/pagerId" android:layout_width="wrap_content" android:layout_

2016-06-06 20:50:33 283

原创 listView

1) ListView (列表视图)1、在布局文件中添加<ListView android:id="@+id/listView" android:layout_width="wrap_content" android:layout_height="0dp" android:layout_weight="1" />2、在

2016-06-06 20:33:12 150

原创 布局的优化

1)优化继承体系(减少层次结构)在根标签上用 来代替它会自动的去优化例如:借助merge标签实现相同布局的合并2)重用layout对象例如:借助include标签导入共用布局3)实现对象的延迟加载(借助ViewStub) <ViewStub android:id="@+id/stub_id" android:inflate

2016-06-06 20:30:18 182

原创 android 中的UI

2、Android中的 UI1.Common Layout(普通的常用布局) 1)RelativeLayout (相对布局)相对位置的布局 2)LinearLayout (线性布局)现行布局,从上到下或者从做到右, orientation vertica horizontalandroid:layout_gravity="center_horizontal"

2016-06-06 20:27:57 158

原创 FrameLayout

FrameLayout(帧布局)若是不指定位置控件就会重叠,后面引用的控件会遮盖前面的控件。android:layout_gravity="right|top 可以用这样的方式来指定控件的位置<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_cont

2016-06-06 20:22:01 395

原创 LinearLayout

2)LinearLayout (线性布局)现行布局,从上到下或者从做到右, orientation vertica horizontalandroid:layout_gravity="center_horizontal" (是指控件本身水平居中)android:gravity="center_horizontal" (是指控件里的内容在该控件中水平居中)<LinearLayout

2016-06-06 20:14:32 162

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除