Android设计文档
4 Android校园通软件的设计与实现
研究目标
(1) 了解Android应用程序的设计和开发过程;
(2) 使用多种组件进行Android 平台校园资讯软件的开发。
:
public static String TAB_TAG_HOME = "home";
public static String TAB_TAG_CHANNEL = "channel";
public static String TAB_TAG_ACCOUNT = "account";
public static String TAB_TAG_SEARCH = "search";
public static String TAB_TAB_MORE = "more";
ImageView mBut1, mBut2, mBut3, mBut4, mBut5;
TextView mCateText1,mCateText2, mCateText3, mCateText4, mCateText5;
Intent mHomeItent, mChannelIntent, mSearchIntent, mAccountIntent,
mMoreIntent;
先声明了用到的组件。从代码中可以看出,MainActivity的主要功能就是软件的导航栏。
:
private void findviews(){
fun =(Button)findViewById();
movie=(Button)findViewById();
record=(Button)findViewById();
tourism=(Button)findViewById();
publicity=(Button)findViewById();
clips=(Button)findViewById();
}
private void setListensers() {
(clickfun);
(clickmovie);
(clickrecord);
(clicktourism);
(clickpublicity);
(clickclips);
}
Private clickfun=
new (){
public void onClick(View v){
Intent funint = new Intent();
(, ); startActivity(funint);
}
};
从代码中可以看出,WidgetEntity类中有fun,movie,record,tourism,publicity,clips这6个功能模块。而该页的功能就是作为这六个功能的实现也简单描述一下。
(3)
ExpandableListView expandableList;
TreeViewAdapter adapter;
SuperTreeViewAdapter superAdapter;
Button btnNormal, btnSuper;
设置了二级菜单显示校内娱乐,三级菜单显示校外娱乐
(adapter);
(new OnChildClickListener()
{
***@Override
public
Android设计文档 来自淘豆网m.daumloan.com转载请标明出处.