mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Merge pull request #544 from srv-twry/master
Added 'Up navigation' for settings activity
This commit is contained in:
commit
75bc9f1a3d
2 changed files with 20 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ import android.os.Bundle;
|
|||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
|
||||
|
|
@ -34,5 +35,20 @@ public class SettingsActivity extends PreferenceActivity {
|
|||
settingsDelegate = AppCompatDelegate.create(this, null);
|
||||
}
|
||||
settingsDelegate.onPostCreate(savedInstanceState);
|
||||
|
||||
//Get an up button
|
||||
settingsDelegate.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
//Handle action-bar clicks
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<string name="upload_failed_notification_title">Uploading %1$s failed</string>
|
||||
<string name="upload_failed_notification_subtitle">Tap to view</string>
|
||||
<plurals name="uploads_pending_notification_indicator">
|
||||
<item quantity="one">1 file uploading</item>
|
||||
<item quantity="one">%d file uploading</item>
|
||||
<item quantity="other">%d files uploading</item>
|
||||
</plurals>
|
||||
<string name="title_activity_contributions">My uploads</string>
|
||||
|
|
@ -52,15 +52,15 @@
|
|||
<string name="refresh_button">Refresh</string>
|
||||
<plurals name="contributions_subtitle">
|
||||
<item quantity="zero">No uploads yet</item>
|
||||
<item quantity="one">1 upload</item>
|
||||
<item quantity="one">%d upload</item>
|
||||
<item quantity="other">%d uploads</item>
|
||||
</plurals>
|
||||
<plurals name="starting_multiple_uploads">
|
||||
<item quantity="one">Starting 1 upload</item>
|
||||
<item quantity="one">Starting %d upload</item>
|
||||
<item quantity="other">Starting %d uploads</item>
|
||||
</plurals>
|
||||
<plurals name="multiple_uploads_title">
|
||||
<item quantity="one">1 upload</item>
|
||||
<item quantity="one">%d upload</item>
|
||||
<item quantity="other">%d uploads</item>
|
||||
</plurals>
|
||||
<string name="categories_not_found">No categories matching %1$s found</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue