fix no gps_tracking data available
This commit is contained in:
parent
090e9aa8cb
commit
2ae7645c5a
3 changed files with 10 additions and 10 deletions
|
|
@ -154,8 +154,7 @@ public class MainActivity extends AppCompatActivity implements AsyncTaskCallback
|
|||
String bID = bike.getString("bike");
|
||||
String stID = bike.getString("start_place");
|
||||
String lockE = bike.getString("electric_lock");
|
||||
String gps = bike.getString("gps_tracking");
|
||||
String[] bikeArray = {bID, stID, lockE, gps};
|
||||
String[] bikeArray = {bID, stID, lockE};
|
||||
intent.putExtra("bike", bikeArray);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class ReturnActivity extends AppCompatActivity implements AsyncTaskCallba
|
|||
//if GPS and electric lock, show the instruction
|
||||
TextView tv = findViewById(R.id.gps_info);
|
||||
LinearLayout la = findViewById(R.id.return_form_container);
|
||||
if(bikeArray[2].equals("true") && bikeArray[3].equals("true")) {
|
||||
if(bikeArray[2].equals("true")) {
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
la.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,13 +20,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/gps_info"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/indicator_electronic_gps_lock" />
|
||||
<LinearLayout
|
||||
android:id="@+id/return_form_container"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -56,6 +49,14 @@
|
|||
android:text="@string/action_return_submit"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gps_info"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/indicator_electronic_lock" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue