便签二
界面源代码:
'''
package com.pwp.activity;
import android.app.Activity;
public class ScheduleAll extends Activity {
public ScheduleAll() { }
protected void onCreate(Bundle savedInstanceState) {
public void getScheduleAll() {
while(var2.hasNext()) {
this.scheduleInfo = CalendarConstant.sch_type[vo.getScheduleTypeID()] + "\n" + vo.getScheduleDate() + "\n" + content;
}
public void createInfotext(String scheduleInfo, int scheduleID) {
public boolean onCreateOptionsMenu(Menu menu) {
public boolean onOptionsItemSelected(MenuItem item) {
return
'''
'''
//
// Source code recreated from a .
class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
// package com.pwp.activity;
import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle; import android.util.AttributeSet;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import com.pwp.activity.ScheduleAll;
import com.pwp.borderText.BorderEditText;
import com.pwp.borderText.BorderTextView;
import com.pwp.constant.CalendarConstant;
import com.pwp.dao.ScheduleDAO;
import com.pwp.vo.ScheduleVO;
public class ScheduleInfoView
extends Activity {
private LinearLayout layout = null;
private BorderTextView textTop = null;
private BorderTextView info = null;
private BorderTextView date = null;
private BorderTextView type = null;
private BorderEditText editInfo = null;
private ScheduleDAO dao = null;
private ScheduleVO scheduleVO = null;
private String scheduleInfo = "";
private String scheduleChangeInfo = "";
private final LayoutParams params = new LayoutParams(-1, -2);
public ScheduleInfoView() {
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.dao = new ScheduleDAO(this);
this.params.setMargins(0, 5, 0, 0);
this.layout = new LinearLayout(this);
this.layout.setOrientation(1);
this.layout.setBackgroundResource(2130837516);
this.layout.setLayoutParams(this.params);
this.textTop = new BorderTextView(this, (AttributeSet)null);
this.textTop.setTextColor(-16777216);
this.textTop.setBackgroundResource(2130837519);
this.textTop.setText("日程详情");
this.textTop.setHeight(47);
this.textTop.setGravity(17);
this.editInfo = new BorderEditText(this, (AttributeSet)null);
this.editInfo.setTextColor(-16777216);
this.editInfo.setBackgroundColor(-1);
this.editInfo.setHeight(200);
this.editInfo.setGravity(48);
this.editInfo.setLayoutParams(this.params);
this.editInfo.setPadding(10, 5, 10, 5);
this.layout.addView(this.textTop);
Intent intent = this.getIntent();
String[] scheduleIDs = intent.getStringArrayExtra("scheduleID");
for(int i = 0; i < scheduleIDs.length; ++i) {
this.handlerInfo(Integer.parseInt(scheduleIDs[i])); }
this.setContentView(this.layout);
}
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(1, 1, 1, "所有日程");
menu.add(1, 1 + 1, 1 + 1, "添加日程");
return super.onCreateOptionsMenu(menu);
}
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case 1:
Intent intent = new Intent();
intent.setClass(this, ScheduleAll.class);
this.startActivity(intent);
case 2:
default:
return super.onOptionsItemSelected(item);
}
}
public void handlerInfo(int scheduleID) {
BorderTextView date = new BorderTextView(this, (AttributeSet)null);
date.setTextColor(-16777216);
date.setBackgroundColor(-1);
date.setLayoutParams(this.params);
date.setGravity(16);
date.setHeight(40);
date.setPadding(10, 0, 10, 0);
BorderTextView type = new BorderTextView(this, (AttributeSet)null);
type.setTextColor(-16777216);
type.setBackgroundColor(-1);
type.setLayoutParams(this.params);
type.setGravity(17);
type.setHeight(40);
type.setPadding(10, 0, 10, 0);
type.setTag(Integer.valueOf(scheduleID));
BorderTextView info = new BorderTextView(this, (AttributeSet)null);
info.setTextColor(-16777216);
info.setBackgroundColor(-1);
info.setGravity(16);
info.setLayoutParams(this.params);
info.setPadding(10, 5, 10, 5);
this.layout.addView(type);
this.layout.addView(date);
this.layout.addView(info);
this.scheduleVO = this.dao.getScheduleByID(scheduleID);
date.setText(this.scheduleVO.getScheduleDate());
type.setText(CalendarConstant.sch_type[this.scheduleVO.getScheduleTypeID()]);
info.setText(this.scheduleVO.getScheduleContent());
type.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) {
final String scheduleID = String.valueOf(v.getTag());
(new Builder(ScheduleInfoView.this))
.setTitle("删除日程").
setMessage("确认删除").
setPositiveButton("确认",
new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
ScheduleInfoView.this.dao.delete(Integer.parseInt(scheduleID));
Intent intent1 = new Intent();
intent1.setClass(ScheduleInfoView.this, ScheduleAll.class);
ScheduleInfoView.this.startActivity(intent1);
}
}).
setNegativeButton("取消", (OnClickListener)null).show();
return true;
}
});
} }
'''