comment out code related to creating copyright notes directly on dashboard
This commit is contained in:
parent
a7ebe5b067
commit
df46b01dcd
2 changed files with 34 additions and 38 deletions
|
@ -38,7 +38,7 @@
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- TODO: All Copyright notes and links should be removed here, have been put on the 'About' screen -->
|
<!-- All Copyright notes and links have been put on the 'About' screen
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
<!--
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/OpenStreetMaps"
|
android:id="@+id/OpenStreetMaps"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -113,32 +113,28 @@ public class DashboardActivity extends BaseDownloadActivity {
|
||||||
|
|
||||||
protected void setupContributionVersion() {
|
protected void setupContributionVersion() {
|
||||||
findViewById(R.id.credentials).setVisibility(View.VISIBLE);
|
findViewById(R.id.credentials).setVisibility(View.VISIBLE);
|
||||||
final TextView textVersionView = (TextView) findViewById(R.id.Copyright);
|
//Copyright notes and links have been put on the 'About' screen
|
||||||
final Calendar inst = Calendar.getInstance();
|
// final TextView textVersionView = (TextView) findViewById(R.id.Copyright);
|
||||||
inst.setTime(new Date());
|
// final Calendar inst = Calendar.getInstance();
|
||||||
final String textVersion = "\u00A9 OsmAnd " + inst.get(Calendar.YEAR);
|
// inst.setTime(new Date());
|
||||||
textVersionView.setText(textVersion);
|
// final String textVersion = "\u00A9 OsmAnd " + inst.get(Calendar.YEAR);
|
||||||
|
// textVersionView.setText(textVersion);
|
||||||
final SharedPreferences prefs = getApplicationContext().getSharedPreferences("net.osmand.settings", MODE_WORLD_READABLE);
|
final SharedPreferences prefs = getApplicationContext().getSharedPreferences("net.osmand.settings", MODE_WORLD_READABLE);
|
||||||
|
// textVersionView.setOnClickListener(new OnClickListener(){
|
||||||
//TODO: All Copyright notes and links should be removed here, have been put on the 'About' screen
|
// int i = 0;
|
||||||
textVersionView.setVisibility(View.GONE);
|
// @Override
|
||||||
|
// public void onClick(View v) {
|
||||||
textVersionView.setOnClickListener(new OnClickListener(){
|
// if(i++ > 8 && Version.isDeveloperVersion(getMyApplication())) {
|
||||||
|
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
||||||
int i = 0;
|
// enableLink(DashboardActivity.this, textVersion, textVersionView);
|
||||||
@Override
|
// }
|
||||||
public void onClick(View v) {
|
// }
|
||||||
if(i++ > 8 && Version.isDeveloperVersion(getMyApplication())) {
|
// });
|
||||||
prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
|
||||||
enableLink(DashboardActivity.this, 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) && Version.isDeveloperVersion(getMyApplication())) {
|
// if (prefs.contains(CONTRIBUTION_VERSION_FLAG) && Version.isDeveloperVersion(getMyApplication())) {
|
||||||
enableLink(this, textVersion, textVersionView);
|
// enableLink(this, textVersion, textVersionView);
|
||||||
}
|
// }
|
||||||
final TextView about = (TextView) findViewById(R.id.About);
|
final TextView about = (TextView) findViewById(R.id.About);
|
||||||
final String aboutString = getString(R.string.about_settings);
|
final String aboutString = getString(R.string.about_settings);
|
||||||
SpannableString ss = new SpannableString(aboutString);
|
SpannableString ss = new SpannableString(aboutString);
|
||||||
|
@ -405,19 +401,19 @@ public class DashboardActivity extends BaseDownloadActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void enableLink(final Activity activity, String textVersion, TextView textVersionView) {
|
// private static void enableLink(final Activity activity, String textVersion, TextView textVersionView) {
|
||||||
SpannableString content = new SpannableString(textVersion);
|
// SpannableString content = new SpannableString(textVersion);
|
||||||
content.setSpan(new ClickableSpan() {
|
// content.setSpan(new ClickableSpan() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View widget) {
|
// public void onClick(View widget) {
|
||||||
final Intent mapIntent = new Intent(activity, ContributionVersionActivity.class);
|
// final Intent mapIntent = new Intent(activity, ContributionVersionActivity.class);
|
||||||
activity.startActivityForResult(mapIntent, 0);
|
// activity.startActivityForResult(mapIntent, 0);
|
||||||
}
|
// }
|
||||||
}, 0, content.length(), 0);
|
// }, 0, content.length(), 0);
|
||||||
textVersionView.setText(content);
|
// textVersionView.setText(content);
|
||||||
textVersionView.setMovementMethod(LinkMovementMethod.getInstance());
|
// textVersionView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgress(boolean updateOnlyProgress) {
|
public void updateProgress(boolean updateOnlyProgress) {
|
||||||
|
|
Loading…
Reference in a new issue