终极完善
This commit is contained in:
kaka727 2016-09-03 17:16:24 +08:00
parent 15df154c60
commit 008cd86fb4
39 changed files with 1 additions and 30 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View File

@ -23,13 +23,11 @@ public class AIContentAdapter extends BaseContentAdapter<Discuss> {
public static final int SAVE_FAVOURITE = 2; public static final int SAVE_FAVOURITE = 2;
public AIContentAdapter(Context context, List<Discuss> list) { public AIContentAdapter(Context context, List<Discuss> list) {
// TODO Auto-generated constructor stub
super(context, list); super(context, list);
} }
@Override @Override
public View getConvertView(int position, View convertView, ViewGroup parent) { public View getConvertView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
final ViewHolder viewHolder; final ViewHolder viewHolder;
if (convertView == null) { if (convertView == null) {
viewHolder = new ViewHolder(); viewHolder = new ViewHolder();
@ -70,7 +68,6 @@ public class AIContentAdapter extends BaseContentAdapter<Discuss> {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// TODO Auto-generated method stub
if (entity.getMyLove()) { if (entity.getMyLove()) {
ActivityUtil.show(mContext, "您已赞过啦"); ActivityUtil.show(mContext, "您已赞过啦");
@ -90,14 +87,12 @@ public class AIContentAdapter extends BaseContentAdapter<Discuss> {
@Override @Override
public void onSuccess() { public void onSuccess() {
// TODO Auto-generated method stub
entity.setMyLove(true); entity.setMyLove(true);
entity.setMyFav(oldFav); entity.setMyFav(oldFav);
} }
@Override @Override
public void onFailure(int arg0, String arg1) { public void onFailure(int arg0, String arg1) {
// TODO Auto-generated method stub
entity.setMyLove(false); entity.setMyLove(false);
entity.setMyFav(oldFav); entity.setMyFav(oldFav);
} }
@ -108,7 +103,6 @@ public class AIContentAdapter extends BaseContentAdapter<Discuss> {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// TODO Auto-generated method stub
entity.setHate(entity.getHate() + 1); entity.setHate(entity.getHate() + 1);
viewHolder.hate.setText(entity.getHate() + ""); viewHolder.hate.setText(entity.getHate() + "");
entity.increment("hate", 1); entity.increment("hate", 1);
@ -116,14 +110,11 @@ public class AIContentAdapter extends BaseContentAdapter<Discuss> {
@Override @Override
public void onSuccess() { public void onSuccess() {
// TODO Auto-generated method stub
ActivityUtil.show(mContext, "点踩成功~"); ActivityUtil.show(mContext, "点踩成功~");
} }
@Override @Override
public void onFailure(int arg0, String arg1) { public void onFailure(int arg0, String arg1) {
// TODO Auto-generated method stub
} }
}); });
} }
@ -132,7 +123,6 @@ public class AIContentAdapter extends BaseContentAdapter<Discuss> {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// TODO Auto-generated method stub
// 评论 // 评论
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(mContext, CommentActivity.class); intent.setClass(mContext, CommentActivity.class);

View File

@ -31,25 +31,21 @@ public abstract class BaseContentAdapter<T> extends BaseAdapter{
@Override @Override
public int getCount() { public int getCount() {
// TODO Auto-generated method stub
return dataList.size(); return dataList.size();
} }
@Override @Override
public T getItem(int position) { public T getItem(int position) {
// TODO Auto-generated method stub
return dataList.get(position); return dataList.get(position);
} }
@Override @Override
public long getItemId(int position) { public long getItemId(int position) {
// TODO Auto-generated method stub
return position; return position;
} }
@Override @Override
public View getView(int position, View convertView, ViewGroup parent) { public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
return getConvertView(position,convertView,parent); return getConvertView(position,convertView,parent);
} }

View File

@ -15,12 +15,10 @@ public class CommentAdapter extends BaseContentAdapter<Comment>{
public CommentAdapter(Context context, List<Comment> list) { public CommentAdapter(Context context, List<Comment> list) {
super(context, list); super(context, list);
// TODO Auto-generated constructor stub
} }
@Override @Override
public View getConvertView(int position, View convertView, ViewGroup parent) { public View getConvertView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
ViewHolder viewHolder; ViewHolder viewHolder;
if(convertView == null){ if(convertView == null){
viewHolder = new ViewHolder(); viewHolder = new ViewHolder();

View File

@ -22,7 +22,6 @@ public class EditActivity extends Activity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_edit); setContentView(R.layout.activity_edit);
@ -33,7 +32,6 @@ public class EditActivity extends Activity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// TODO Auto-generated method stub
String title = edit_title.getText().toString().trim(); String title = edit_title.getText().toString().trim();
String content = edit_content.getText().toString().trim(); String content = edit_content.getText().toString().trim();
@ -82,7 +80,6 @@ public class EditActivity extends Activity {
@Override @Override
public void onSuccess() { public void onSuccess() {
// TODO Auto-generated method stub
toast("发表成功!"); toast("发表成功!");
setResult(RESULT_OK); setResult(RESULT_OK);
finish(); finish();
@ -90,7 +87,6 @@ public class EditActivity extends Activity {
@Override @Override
public void onFailure(int arg0, String arg1) { public void onFailure(int arg0, String arg1) {
// TODO Auto-generated method stub
toast("发表失败!"); toast("发表失败!");
} }
}); });

View File

@ -70,8 +70,7 @@ public class LibraryReservationActivity extends Activity {
btnLogin.setEnabled(false); btnLogin.setEnabled(false);
btnLogin.setText("已经预定" + (TextUtils.isEmpty(dateTime) ? "" : (" " + dateTime))); btnLogin.setText("已经预定" + (TextUtils.isEmpty(dateTime) ? "" : (" " + dateTime)));
} }
} catch (ParseException e) { } catch (ParseException e) {
// TODO
Logger logger = Logger.getLogger("lavasoft"); Logger logger = Logger.getLogger("lavasoft");
logger.log(Level.SEVERE, "something may be wrong", e); logger.log(Level.SEVERE, "something may be wrong", e);
} }
@ -85,13 +84,11 @@ public class LibraryReservationActivity extends Activity {
btnLogin.setOnClickListener(new OnClickListener() { btnLogin.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// TODO
DateTimePickDialogUtil dateTimePicKDialog = new DateTimePickDialogUtil(LibraryReservationActivity.this, DateTimePickDialogUtil dateTimePicKDialog = new DateTimePickDialogUtil(LibraryReservationActivity.this,
dateFormat.format(new Date())); dateFormat.format(new Date()));
dateTimePicKDialog.dateTimePicKDialog(new DateTimeListener() { dateTimePicKDialog.dateTimePicKDialog(new DateTimeListener() {
@Override @Override
public void onDateTimeChane(final String dateTime) { public void onDateTimeChane(final String dateTime) {
//TODO
Reservation libreservation = new Reservation(); Reservation libreservation = new Reservation();
libreservation.setRoomId(roomId); libreservation.setRoomId(roomId);
libreservation.setRoomName(roomName); libreservation.setRoomName(roomName);
@ -100,14 +97,12 @@ public class LibraryReservationActivity extends Activity {
libreservation.save(LibraryReservationActivity.this, new SaveListener() { libreservation.save(LibraryReservationActivity.this, new SaveListener() {
@Override @Override
public void onSuccess() { public void onSuccess() {
// TODO
toast("预定成功"); toast("预定成功");
btnLogin.setEnabled(false); btnLogin.setEnabled(false);
btnLogin.setText("已经预定 " + dateTime); btnLogin.setText("已经预定 " + dateTime);
} }
@Override @Override
public void onFailure(int arg0, String arg1) { public void onFailure(int arg0, String arg1) {
// TODO
toast("预定失败"); toast("预定失败");
} }
}); });

View File

@ -224,7 +224,6 @@ public class LoginActivity extends Activity implements OnClickListener {
try { try {
User.userId = jsonResponse.getString("openid"); User.userId = jsonResponse.getString("openid");
} catch (JSONException e) { } catch (JSONException e) {
// TODO
Logger logger = Logger.getLogger(lavasoft); Logger logger = Logger.getLogger(lavasoft);
logger.log(Level.SEVERE, sthwrong, e); logger.log(Level.SEVERE, sthwrong, e);
} }

View File

@ -32,7 +32,6 @@ public class MainActivity extends Activity implements OnClickListener {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) { switch (v.getId()) {
case R.id.bt_scrollLeft: case R.id.bt_scrollLeft:

View File

@ -162,13 +162,11 @@ public class OrderActivity extends Activity implements OnClickListener {
@Override @Override
public void onSuccess() { public void onSuccess() {
// TODO
toast("订单提交成功"); toast("订单提交成功");
} }
@Override @Override
public void onFailure(int arg0, String arg1) { public void onFailure(int arg0, String arg1) {
// TODO
toast("订单提交失败"); toast("订单提交失败");
} }
}); });

Binary file not shown.

Binary file not shown.

Binary file not shown.