常识性知识备忘录

来源:互联网 发布:python mac 编辑:程序博客网 时间:2024/04/28 01:10

1、把Button设置成比较小的形式:style="?android:attr/buttonStyleSmall"
2、开关按钮是ToggleButton,可以使用方法setChecked(),设置其状态。
3、抖动可以使用cycleInterpolator实现:
       建立一个shack.xml: 
<translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="0" android:toXDelta="30" android:duration="500" android:interpolator="@anim/cycle" />
      动画cycle.xml:
      <cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:cycles="3" />
4、树形列表可以使用ExpandableListActivity,或者ExpandableListView
5、需要弹出框子的时候,可以考虑使用Dialog、Spinner、PopupWindow等等。
6、三种可见性:VISIBLE(可见,占空间);INVISIBLE(不可见,占空间);GONE(不可见,不占空间)

先写这点,以后更新。

原创粉丝点击