mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add string resources
This commit is contained in:
parent
e8f306a023
commit
faa60dc824
2 changed files with 10 additions and 9 deletions
|
|
@ -91,24 +91,23 @@ public class NearbyActivity extends BaseActivity {
|
||||||
|
|
||||||
|
|
||||||
protected void checkGps() {
|
protected void checkGps() {
|
||||||
LocationManager manager = (LocationManager)
|
LocationManager manager = (LocationManager) getSystemService(LOCATION_SERVICE);
|
||||||
getSystemService(LOCATION_SERVICE);
|
if (!manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
|
||||||
if(!manager.isProviderEnabled( LocationManager.GPS_PROVIDER )) {
|
|
||||||
Timber.d("GPS is not enabled");
|
Timber.d("GPS is not enabled");
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||||
alertDialogBuilder.setMessage("GPS is disabled in your device. Would you like to enable it?")
|
alertDialogBuilder.setMessage(R.string.gps_disabled)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton("Enable GPS",
|
.setPositiveButton(R.string.enable_gps,
|
||||||
new DialogInterface.OnClickListener(){
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id){
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
Intent callGPSSettingIntent = new Intent(
|
Intent callGPSSettingIntent = new Intent(
|
||||||
android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
|
android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
|
||||||
startActivity(callGPSSettingIntent);
|
startActivity(callGPSSettingIntent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
alertDialogBuilder.setNegativeButton("Cancel",
|
alertDialogBuilder.setNegativeButton("Cancel",
|
||||||
new DialogInterface.OnClickListener(){
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id){
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@
|
||||||
<string name="categories_search_text_hint">Search categories</string>
|
<string name="categories_search_text_hint">Search categories</string>
|
||||||
<string name="menu_save_categories">Save</string>
|
<string name="menu_save_categories">Save</string>
|
||||||
<string name="refresh_button">Refresh</string>
|
<string name="refresh_button">Refresh</string>
|
||||||
|
<string name="gps_disabled">GPS is disabled in your device. Would you like to enable it?</string>
|
||||||
|
<string name="enable_gps">Enable GPS</string>
|
||||||
<string name="contributions_subtitle_zero">No uploads yet</string>
|
<string name="contributions_subtitle_zero">No uploads yet</string>
|
||||||
<plurals name="contributions_subtitle">
|
<plurals name="contributions_subtitle">
|
||||||
<!--zero is not used in english. Category mentioned here for easy reference in future-->
|
<!--zero is not used in english. Category mentioned here for easy reference in future-->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue