Remove duplicate streets
This commit is contained in:
parent
885c364446
commit
6b6e1881ba
2 changed files with 29 additions and 23 deletions
|
@ -134,25 +134,25 @@ public class MainMenuActivity extends Activity {
|
||||||
rightview = (View) window.findViewById(R.id.SearchButton);
|
rightview = (View) window.findViewById(R.id.SearchButton);
|
||||||
rightview.startAnimation(getAnimation(1, 0));
|
rightview.startAnimation(getAnimation(1, 0));
|
||||||
|
|
||||||
String textVersion = Version.getAppVersion(((OsmandApplication) activity.getApplication()));
|
final String textVersion = Version.getAppVersion(((OsmandApplication) activity.getApplication()));
|
||||||
final TextView textVersionView = (TextView) window.findViewById(R.id.TextVersion);
|
final TextView textVersionView = (TextView) window.findViewById(R.id.TextVersion);
|
||||||
textVersionView.setText(textVersion);
|
textVersionView.setText(textVersion);
|
||||||
SharedPreferences prefs = activity.getApplicationContext().getSharedPreferences("net.osmand.settings", MODE_WORLD_READABLE);
|
final SharedPreferences prefs = activity.getApplicationContext().getSharedPreferences("net.osmand.settings", MODE_WORLD_READABLE);
|
||||||
|
textVersionView.setOnClickListener(new OnClickListener(){
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if(i++ > 8) {
|
||||||
|
prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
||||||
|
enableLink(activity, textVersion, textVersionView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
// only one commit should be with contribution version flag
|
// only one commit should be with contribution version flag
|
||||||
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
||||||
if (prefs.contains(CONTRIBUTION_VERSION_FLAG)) {
|
if (prefs.contains(CONTRIBUTION_VERSION_FLAG)) {
|
||||||
SpannableString content = new SpannableString(textVersion);
|
enableLink(activity, textVersion, textVersionView);
|
||||||
content.setSpan(new ClickableSpan() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View widget) {
|
|
||||||
final Intent mapIntent = new Intent(activity, ContributionVersionActivity.class);
|
|
||||||
activity.startActivityForResult(mapIntent, 0);
|
|
||||||
}
|
|
||||||
}, 0, content.length(), 0);
|
|
||||||
textVersionView.setText(content);
|
|
||||||
textVersionView.setMovementMethod(LinkMovementMethod.getInstance());
|
|
||||||
}
|
}
|
||||||
View helpButton = window.findViewById(R.id.HelpButton);
|
View helpButton = window.findViewById(R.id.HelpButton);
|
||||||
helpButton.setOnClickListener(new OnClickListener() {
|
helpButton.setOnClickListener(new OnClickListener() {
|
||||||
|
@ -165,6 +165,19 @@ public class MainMenuActivity extends Activity {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void enableLink(final Activity activity, String textVersion, TextView textVersionView) {
|
||||||
|
SpannableString content = new SpannableString(textVersion);
|
||||||
|
content.setSpan(new ClickableSpan() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View widget) {
|
||||||
|
final Intent mapIntent = new Intent(activity, ContributionVersionActivity.class);
|
||||||
|
activity.startActivityForResult(mapIntent, 0);
|
||||||
|
}
|
||||||
|
}, 0, content.length(), 0);
|
||||||
|
textVersionView.setText(content);
|
||||||
|
textVersionView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<resources><string name="default_buttons_no">Non</string>
|
|
||||||
<string name="default_buttons_yes">Sí</string>
|
|
||||||
<string name="osmand_app_not_found">OsmAnd nun ta instaláu</string>
|
|
||||||
<string name="app_name">OsmAnd Parking</string>
|
|
||||||
<string name="parking_plugin_installed">El complementu OsmAnd ta instaláu y habilitáu nos axustes d'OsmAnd.</string>
|
|
||||||
</resources>
|
|
Loading…
Reference in a new issue