修复了之前闪退的漏洞。

This commit is contained in:
qinjiaming_branch 2016-08-22 09:29:34 +08:00
parent 56753dcdbd
commit 4c019c61c0
20 changed files with 70 additions and 31 deletions

View File

@ -74,6 +74,10 @@
android:name="com.stone.shop.view.ClassroomActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.LibraryActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.RegisterActivity"
android:label="@string/app_name" >
@ -118,6 +122,10 @@
android:name="com.stone.shop.view.ReservationActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.LibraryReservationActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.MineInfoActivity"
android:label="@string/app_name" >

View File

@ -74,6 +74,10 @@
android:name="com.stone.shop.view.ClassroomActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.LibraryActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.RegisterActivity"
android:label="@string/app_name" >
@ -118,6 +122,10 @@
android:name="com.stone.shop.view.ReservationActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.LibraryReservationActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.stone.shop.view.MineInfoActivity"
android:label="@string/app_name" >

View File

@ -1,16 +1,16 @@
# view res/layout/activity_shop_item.xml #generated:12
-keep class android.support.v4.view.PagerTabStrip { <init>(...); }
# view AndroidManifest.xml #generated:145
# view AndroidManifest.xml #generated:153
-keep class com.stone.shop.view.AboutActivity { <init>(...); }
# view AndroidManifest.xml #generated:109
# view AndroidManifest.xml #generated:113
-keep class com.stone.shop.view.AwardActivity { <init>(...); }
# view AndroidManifest.xml #generated:151
# view AndroidManifest.xml #generated:159
-keep class com.stone.shop.view.BXTActivity { <init>(...); }
# view AndroidManifest.xml #generated:155
# view AndroidManifest.xml #generated:163
-keep class com.stone.shop.view.BXTNewsActivity { <init>(...); }
# view AndroidManifest.xml #generated:65
@ -19,58 +19,64 @@
# view AndroidManifest.xml #generated:73
-keep class com.stone.shop.view.ClassroomActivity { <init>(...); }
# view AndroidManifest.xml #generated:133
# view AndroidManifest.xml #generated:141
-keep class com.stone.shop.view.FeedBackActivity { <init>(...); }
# view AndroidManifest.xml #generated:101
# view AndroidManifest.xml #generated:105
-keep class com.stone.shop.view.HomeActivity { <init>(...); }
# view AndroidManifest.xml #generated:77
-keep class com.stone.shop.view.LibraryActivity { <init>(...); }
# view AndroidManifest.xml #generated:125
-keep class com.stone.shop.view.LibraryReservationActivity { <init>(...); }
# view AndroidManifest.xml #generated:69
-keep class com.stone.shop.view.LoginActivity { <init>(...); }
# view AndroidManifest.xml #generated:113
# view AndroidManifest.xml #generated:117
-keep class com.stone.shop.view.MineActivity { <init>(...); }
# view AndroidManifest.xml #generated:121
# view AndroidManifest.xml #generated:129
-keep class com.stone.shop.view.MineInfoActivity { <init>(...); }
# view AndroidManifest.xml #generated:125
# view AndroidManifest.xml #generated:133
-keep class com.stone.shop.view.MineInfoEditActivity { <init>(...); }
# view AndroidManifest.xml #generated:129
# view AndroidManifest.xml #generated:137
-keep class com.stone.shop.view.MineSoftActivity { <init>(...); }
# view AndroidManifest.xml #generated:141
# view AndroidManifest.xml #generated:149
-keep class com.stone.shop.view.NewsActivity { <init>(...); }
# view AndroidManifest.xml #generated:93
# view AndroidManifest.xml #generated:97
-keep class com.stone.shop.view.OrderActivity { <init>(...); }
# view AndroidManifest.xml #generated:97
# view AndroidManifest.xml #generated:101
-keep class com.stone.shop.view.OrderInfoActivity { <init>(...); }
# view AndroidManifest.xml #generated:77
# view AndroidManifest.xml #generated:81
-keep class com.stone.shop.view.RegisterActivity { <init>(...); }
# view AndroidManifest.xml #generated:117
# view AndroidManifest.xml #generated:121
-keep class com.stone.shop.view.ReservationActivity { <init>(...); }
# view AndroidManifest.xml #generated:81
# view AndroidManifest.xml #generated:85
-keep class com.stone.shop.view.ShopActivity { <init>(...); }
# view AndroidManifest.xml #generated:85
# view AndroidManifest.xml #generated:89
-keep class com.stone.shop.view.ShopAllActivity { <init>(...); }
# view AndroidManifest.xml #generated:89
# view AndroidManifest.xml #generated:93
-keep class com.stone.shop.view.ShopItemActivity { <init>(...); }
# view AndroidManifest.xml #generated:56
-keep class com.stone.shop.view.SplashActivity { <init>(...); }
# view AndroidManifest.xml #generated:105
# view AndroidManifest.xml #generated:109
-keep class com.stone.shop.view.WsqActivity { <init>(...); }
# view AndroidManifest.xml #generated:137
# view AndroidManifest.xml #generated:145
-keep class com.stone.shop.view.old.OldMineActivity { <init>(...); }
# view res/layout/activity_home.xml #generated:85
@ -88,10 +94,10 @@
# view res/layout/activity_shop_item.xml #generated:6
-keep class com.stone.ui.ViewPagerCompat { <init>(...); }
# view AndroidManifest.xml #generated:173
# view AndroidManifest.xml #generated:181
-keep class com.tencent.connect.common.AssistActivity { <init>(...); }
# view AndroidManifest.xml #generated:159
# view AndroidManifest.xml #generated:167
-keep class com.tencent.tauth.AuthActivity { <init>(...); }
# onClick res/layout/header_mine_info.xml #generated:8

View File

@ -5,6 +5,7 @@ import cn.bmob.v3.BmobObject;
public class Classroom extends BmobObject {
private String name;
private String type;
public String getName() {
return name;
@ -13,10 +14,18 @@ public class Classroom extends BmobObject {
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
return "ClassRoom [name=" + name + "]";
return "ClassRoom [name= " + name + "tpye= " + type + "]";
}
}

View File

@ -53,6 +53,7 @@ public class ClassroomActivity extends Activity implements OnItemClickListener {
private void initData() {
BmobQuery<Classroom> query = new BmobQuery<Classroom>();
query.addWhereEqualTo("type", "教室");
query.findObjects(this, new FindListener<Classroom>() {
@Override

View File

@ -52,6 +52,7 @@ public class LibraryActivity extends Activity implements OnItemClickListener {
private void initData() {
BmobQuery<Classroom> query = new BmobQuery<Classroom>();
query.addWhereEqualTo("type", "研修室");
query.findObjects(this, new FindListener<Classroom>() {
@Override
@ -81,7 +82,8 @@ public class LibraryActivity extends Activity implements OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(LibraryActivity.this, LibraryReservationActivity.class);
//Intent intent = new Intent(LibraryActivity.this, ReservationActivity.class);
Intent intent = new Intent(LibraryActivity.this, ReservationActivity.class);
Classroom classroom = mBXTNewsList.get(position);
intent.putExtra("roomId", classroom.getObjectId());
intent.putExtra("roomName", classroom.getName());

View File

@ -28,8 +28,10 @@ import cn.bmob.v3.listener.FindListener;
import cn.bmob.v3.listener.SaveListener;
public class LibraryReservationActivity extends Activity {
private Button btnLogin;
private SimpleDateFormat dateFormat;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -40,11 +42,14 @@ public class LibraryReservationActivity extends Activity {
final String roomId = getIntent().getStringExtra("roomId");
final String roomName = getIntent().getStringExtra("roomName");
TextView tvRoom = (TextView) findViewById(R.id.tv_room);
tvRoom.setText("研修室:" + roomName);
btnLogin = (Button) findViewById(R.id.btn_login);
dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
// 查找Person表里面id为6b6c11c537的数据
BmobQuery<Reservation> bmobQuery = new BmobQuery<Reservation>();
bmobQuery.addWhereEqualTo("userId", User.userId);
@ -52,7 +57,7 @@ public class LibraryReservationActivity extends Activity {
bmobQuery.findObjects(LibraryReservationActivity.this, new FindListener<Reservation>() {
@Override
public void onSuccess(List<Reservation> newsList) {
if (!newsList.isEmpty() /*newsList.size() != 0*/) {
if (!newsList.isEmpty()) {
String dateTime = newsList.get(0).getDateTime();
Logger logger = Logger.getLogger("lavasoft");
@ -87,12 +92,12 @@ public class LibraryReservationActivity extends Activity {
dateTimePicKDialog.dateTimePicKDialog(new DateTimeListener() {
@Override
public void onDateTimeChane(final String dateTime) {
Reservation reservation = new Reservation();
reservation.setRoomId(roomId);
reservation.setRoomName(roomName);
reservation.setUserId(User.userId);
reservation.setDateTime(dateTime);
reservation.save(LibraryReservationActivity.this, new SaveListener() {
Reservation libreservation = new Reservation();
libreservation.setRoomId(roomId);
libreservation.setRoomName(roomName);
libreservation.setUserId(User.userId);
libreservation.setDateTime(dateTime);
libreservation.save(LibraryReservationActivity.this, new SaveListener() {
@Override
public void onSuccess() {
// TODO Auto-generated method stub