摘要:
实例化线性布局后,从中获取各个未定义Id的子控件:ImageView[] dots = new ImageView[ids.length];LinearLayout ll = (LinearLayout) findViewById(R.id.ll);for (int i = 0; i Done! 阅读全文
posted @ 2013-09-23 21:12
行云有影
阅读(3068)
评论(0)
推荐(1)
摘要:
1、主要代码:API:http://developer.android.com/reference/android/app/ActionBar.html(1)不需要activity_main.xml文件(2)MainActivity和fragment_1类都继承android.app.Fragment,而不是V4的public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedI... 阅读全文
posted @ 2013-09-23 20:50
行云有影
阅读(1200)
评论(0)
推荐(0)
摘要:
1、Actionbar的形式:final ActionBar actionBar = getActionBar();actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);NavigationMode有以下几种:ConstantsintDISPLAY_HOME_AS_UPDisplay the 'home' element such that it appears as an 'up' affordance.intDISPLAY_SHOW_CUSTOMShow the custom view if 阅读全文
posted @ 2013-09-23 20:03
行云有影
阅读(396)
评论(0)
推荐(0)
摘要:
概述:ArrayList就是传说中的动态数组,用MSDN中的说法,就是Array的复杂版本,它提供了如下一些好处:动态的增加和减少元素实现了ICollection和IList接口灵活的设置数组的大小1、List初始化:private List views = new ArrayList();//Views列表,add(布局Add对象:(1添加)图片文件做viewimaV = new ImageView(this); imaV.setImageResource(R.id.dr1); imaV.setLayoutParams(params); ... 阅读全文
posted @ 2013-09-23 16:41
行云有影
阅读(624)
评论(0)
推荐(1)

浙公网安备 33010602011771号