polished sharing tab
This commit is contained in:
parent
3344449bf4
commit
5ffdf75b66
@ -29,7 +29,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@ -339,6 +339,7 @@ public class MapActivity extends BaseActivity
|
|||||||
modalUserInput.requestFocus();
|
modalUserInput.requestFocus();
|
||||||
} else {
|
} else {
|
||||||
sendLocation(body, latLng);
|
sendLocation(body, latLng);
|
||||||
|
PrefUtils.putCurrentManualLocationName(getApplicationContext(),body);
|
||||||
alertDialog.dismiss();
|
alertDialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -158,9 +158,11 @@ public class SharingFragment extends PreferenceFragment {
|
|||||||
|
|
||||||
PrefUtils.storeLocationMode(getApplicationContext(), locationLevelMapping.get(Integer.parseInt((String) newValue)));
|
PrefUtils.storeLocationMode(getApplicationContext(), locationLevelMapping.get(Integer.parseInt((String) newValue)));
|
||||||
if (PrefUtils.getLocationLevel(getApplicationContext()).equals("manual")) {
|
if (PrefUtils.getLocationLevel(getApplicationContext()).equals("manual")) {
|
||||||
|
if(!predefinedCoordsList.isEmpty()){
|
||||||
|
preferenceCategory.addPreference(manualLocationList);
|
||||||
|
getLocations(disposable);
|
||||||
|
}
|
||||||
|
|
||||||
preferenceCategory.addPreference(manualLocationList);
|
|
||||||
getLocations(disposable);
|
|
||||||
preferenceCategory.addPreference(manualLocationButton);
|
preferenceCategory.addPreference(manualLocationButton);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -250,6 +252,8 @@ public class SharingFragment extends PreferenceFragment {
|
|||||||
|
|
||||||
statusList.setValueIndex(resp.size() - 1);
|
statusList.setValueIndex(resp.size() - 1);
|
||||||
PrefUtils.storeStatus(getApplicationContext(), resp.get(resp.size() - 1));
|
PrefUtils.storeStatus(getApplicationContext(), resp.get(resp.size() - 1));
|
||||||
|
statusList.setSummary(PrefUtils.getUserStatus(getApplicationContext()));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class PrefUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getUserStatus(Context context) {
|
public static String getUserStatus(Context context) {
|
||||||
return getSharedPreferences(context).getString("status_entry", "Available");
|
return getSharedPreferences(context).getString("status_entry", "Dostępny");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void storeStatus(Context context, String status) {
|
public static void storeStatus(Context context, String status) {
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
android:persistent="true"
|
android:persistent="true"
|
||||||
android:title="@string/status_switch_title"/>
|
android:title="@string/status_switch_title"/>
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="1"
|
android:defaultValue="2"
|
||||||
android:key="@string/key_status_value"
|
android:key="@string/key_status_value"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/status_list_title" />
|
android:title="@string/status_list_title" />
|
||||||
|
Loading…
Reference in New Issue
Block a user