欢迎来到天天文库
浏览记录
ID:44435952
大小:261.65 KB
页数:8页
时间:2019-10-22
《日程管理程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、个人Fl程管理packagecom.pwp.activity;importjava.util.ArrayList;importcom.pwp.borderText.BorderTextView;importcom.pwp.constant.CalendarConstant;importcom.pwp.dao.ScheduleDAO;importcom.pwp.vo.ScheduleVO;importandroid.app.Activity;importandroid.content」ntent;importandroid.graphics.Color;
2、importandroid.os.Bundle;importandroid.util.Log;importandroid.view.Gravity;importandroid.view.Menu;importandroid.view.Menultem;importandroid.view.View;importandroid.view.View.OnClickListener;importandroid.widget.LinearLayout;importandroid.widget.ScrollView;importandroid.widget.Ab
3、sListView丄ayoutParams;/***显示/修改所有日程的activity*@authorjack_peng**/publicclassScheduleAIIextendsActivity{privateScrollviewsv=null;privateLinearLayoutlayout=null;privateBorderTextViewtextTop=null;privateScheduleDAOdao=null;privateScheduleVOscheduleVO=null;privateArrayList4、>schList=newArrayList();privateStringschedulelnfo=,HI;newprivatefinalLinearLayout.LayoutParamsparams=LinearLayout.LayoutParams(LayoutParams.FILL_PARENXLayoutParams.WRAP_CONTENT);privateintschedulelD=-1;@OverrideprotectedvoidonCreate(BundlesavedlnstanceState){//TODOAu5、to-generatedmethodstubsuper,onCreate(savedlnstanceState);dao=newScheduleDAO(this);sv=newScrollView(this);params.setMargins(O,5,0,0);layout=newLinearLayout(this);//实例化布局对象layout.setOrientation(LinearLayout.VERTICAL);layout.setBackgroundResource(R.drawable.schedule_bk);layout.setL6、ayoutParams(params);textTop=newBorderTextView(this,null);textTop.setTextColor(Color.BLACK);textTop.setBackgroundResource(R.drawable.top_day);textTop.setText(”所有日程");textTop.setHeight(47);textTop.setGravity(Gravity.CENTER);layout.addView(textTop);sv.addView(layout);setContentView7、(sv);getScheduleAII();}/***得到所有的日程信息*/publicvoidgetScheduleAII(){schList=dao.getAIISchedulef);if(schList!=null){for(ScheduleVOvo:schList){Stringcontent=vo.getScheduleContent();intstartLine=content.indexOf(””);iffstartLine>0){content=content.substring(0,startLine)+"・..”;}elseif8、(content.length()>30){content=content.substring
4、>schList=newArrayList();privateStringschedulelnfo=,HI;newprivatefinalLinearLayout.LayoutParamsparams=LinearLayout.LayoutParams(LayoutParams.FILL_PARENXLayoutParams.WRAP_CONTENT);privateintschedulelD=-1;@OverrideprotectedvoidonCreate(BundlesavedlnstanceState){//TODOAu
5、to-generatedmethodstubsuper,onCreate(savedlnstanceState);dao=newScheduleDAO(this);sv=newScrollView(this);params.setMargins(O,5,0,0);layout=newLinearLayout(this);//实例化布局对象layout.setOrientation(LinearLayout.VERTICAL);layout.setBackgroundResource(R.drawable.schedule_bk);layout.setL
6、ayoutParams(params);textTop=newBorderTextView(this,null);textTop.setTextColor(Color.BLACK);textTop.setBackgroundResource(R.drawable.top_day);textTop.setText(”所有日程");textTop.setHeight(47);textTop.setGravity(Gravity.CENTER);layout.addView(textTop);sv.addView(layout);setContentView
7、(sv);getScheduleAII();}/***得到所有的日程信息*/publicvoidgetScheduleAII(){schList=dao.getAIISchedulef);if(schList!=null){for(ScheduleVOvo:schList){Stringcontent=vo.getScheduleContent();intstartLine=content.indexOf(””);iffstartLine>0){content=content.substring(0,startLine)+"・..”;}elseif
8、(content.length()>30){content=content.substring
此文档下载收益归作者所有