修改了一些代码的问题。

This commit is contained in:
qinjiaming_branch 2016-08-24 08:05:16 +08:00
parent 6000e93f28
commit daa82f6230
14 changed files with 12 additions and 13 deletions

View File

@ -165,7 +165,8 @@ public class LoginActivity extends Activity implements OnClickListener {
if (!Util.isNetworkConnected(this)) {
toast("木有网络 ( ⊙ o ⊙ ) ");
} else if (username.equals("") || password.equals("")) {
// } else if (username.equals("") || password.equals("")) {
} else if ("".equals(username) || "".equals(password)) {
toast("请输入账号和密码");
break;
} else {
@ -257,7 +258,7 @@ public class LoginActivity extends Activity implements OnClickListener {
}
protected void doComplete(JSONObject values) {
//do nothing
}
@Override
@ -279,7 +280,7 @@ public class LoginActivity extends Activity implements OnClickListener {
@Override
public void onError(UiError e) {
//do nothing
}
@Override
@ -314,7 +315,7 @@ public class LoginActivity extends Activity implements OnClickListener {
@Override
public void onCancel() {
//do nothing
}
};
mInfo = new UserInfo(this, mTencent.getQQToken());

View File

@ -6,7 +6,7 @@ import android.app.Activity;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
//import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
@ -46,7 +46,6 @@ public class OrderActivity extends Activity implements OnClickListener{
// private Button btnDlgOk; // 设置时间完成
private Button btnOrderSubmit; // 提交订单
// private View dlgOrderView;
private int mHour;
private int mMinute;
private String time = "12 : 30";
@ -106,7 +105,7 @@ public class OrderActivity extends Activity implements OnClickListener{
@Override
public void onClick(View v) {
int count = 1;
int count;
switch (v.getId()) {
case R.id.btn_order_count_more:
count = Integer.parseInt(tvOrderCount.getText().toString());
@ -121,12 +120,11 @@ public class OrderActivity extends Activity implements OnClickListener{
if (count == 1) {
toast("每份订单数量至少为 1 ");
} else {
tvOrderCount.setText( (count-1)+"");
//tvOrderCount.setText( (count-1)+"");
tvOrderCount.setText(Integer.toString(count-1));
}
break;
case R.id.btn_set_time:
// dlgSetOrderTime = new DialogOrder(this, R.style.MyDialog);
// dlgSetOrderTime.show();
final Calendar c = Calendar.getInstance();
mHour = c.get(Calendar.HOUR_OF_DAY);
mMinute = c.get(Calendar.MINUTE);
@ -166,7 +164,7 @@ public class OrderActivity extends Activity implements OnClickListener{
order.setShopName(shop.getName());
order.setCount(count);
order.setTime(time);
order.setPrice(price+"");
order.setPrice(Float.toString(price));
order.setPhone(phone);
order.setTips(words);
order.insertObject(this, new InsertListener() {

View File

@ -44,7 +44,7 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte
private View view1, view2; // 需要滑动的页卡
private ViewPagerCompat viewPager; // viewpager
private ViewPagerAdapter shopViewPagerAdapter;
private PagerTitleStrip pagerTitleStrip; // viewpager的标题
// private PagerTitleStrip pagerTitleStrip; // viewpager的标题
private PagerTabStrip pagerTabStrip; // 一个viewpager的指示器效果就是一个横的粗的下划线
private List<View> viewList; // 把需要滑动的页卡添加到这个list中
private List<String> titleList; // viewpager的标题
@ -52,7 +52,7 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte
// 店铺商品列表
private ListView lvGoodsList;
private GoodsListAdapter goodsListAdapter;
private Button btnBuyGood;
// private Button btnBuyGood;
// 店铺简介页中的控件
private TextView tvShopName; // 店铺名

Binary file not shown.