mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fix back button issue
This commit is contained in:
parent
dbeeaa0aa8
commit
ee5df7d35c
3 changed files with 6 additions and 15 deletions
|
|
@ -84,7 +84,8 @@
|
|||
android:label="@string/title_activity_signup"/>
|
||||
<activity
|
||||
android:name=".nearby.NearbyActivity"
|
||||
android:label="@string/title_activity_nearby" />
|
||||
android:label="@string/title_activity_nearby"
|
||||
android:parentActivityName=".contributions.ContributionsActivity"/>
|
||||
|
||||
<service android:name=".upload.UploadService" >
|
||||
</service>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ public class NearbyActivity extends AppCompatActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_nearby);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
registerLocationManager();
|
||||
|
||||
// Begin the transaction
|
||||
|
|
@ -38,23 +40,11 @@ public class NearbyActivity extends AppCompatActivity {
|
|||
NearbyListFragment fragment = new NearbyListFragment();
|
||||
ft.add(R.id.container, fragment);
|
||||
ft.commit();
|
||||
|
||||
/*
|
||||
if (savedInstanceState == null) {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.container, new NearbyListFragment())
|
||||
.commit();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume(){
|
||||
super.onResume();
|
||||
|
||||
|
||||
//TODO: Check if we need String or double coords, and in what format
|
||||
//gpsCoords = String.valueOf(currentLatitude) + "|" + String.valueOf(currentLongitude);
|
||||
}
|
||||
|
||||
protected LatLng getmLatestLocation() {
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ public class NearbyListFragment extends ListFragment {
|
|||
tvName.setText(quotelessName);
|
||||
tvDesc.setText(place.description);
|
||||
distance.setText(place.distance);
|
||||
|
||||
|
||||
//Types of desc: landmark, city, edu, event, mountain, isle
|
||||
switch(place.description) {
|
||||
case "landmark":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue