comment out code related to creating copyright notes directly on dashboard

This commit is contained in:
sonora 2014-12-06 11:04:03 +01:00
parent a7ebe5b067
commit df46b01dcd
2 changed files with 34 additions and 38 deletions

View file

@ -38,7 +38,7 @@
android:textSize="20sp" />
</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
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@ -52,7 +52,7 @@
android:layout_gravity="end"
android:gravity="end"
android:textSize="14sp" />
<!--
<TextView
android:id="@+id/OpenStreetMaps"
android:layout_width="wrap_content"

View file

@ -113,32 +113,28 @@ public class DashboardActivity extends BaseDownloadActivity {
protected void setupContributionVersion() {
findViewById(R.id.credentials).setVisibility(View.VISIBLE);
final TextView textVersionView = (TextView) findViewById(R.id.Copyright);
final Calendar inst = Calendar.getInstance();
inst.setTime(new Date());
final String textVersion = "\u00A9 OsmAnd " + inst.get(Calendar.YEAR);
textVersionView.setText(textVersion);
//Copyright notes and links have been put on the 'About' screen
// final TextView textVersionView = (TextView) findViewById(R.id.Copyright);
// final Calendar inst = Calendar.getInstance();
// inst.setTime(new Date());
// final String textVersion = "\u00A9 OsmAnd " + inst.get(Calendar.YEAR);
// textVersionView.setText(textVersion);
final SharedPreferences prefs = getApplicationContext().getSharedPreferences("net.osmand.settings", MODE_WORLD_READABLE);
//TODO: All Copyright notes and links should be removed here, have been put on the 'About' screen
textVersionView.setVisibility(View.GONE);
textVersionView.setOnClickListener(new OnClickListener(){
int i = 0;
@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);
}
}
});
// textVersionView.setOnClickListener(new OnClickListener(){
// int i = 0;
// @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
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
if (prefs.contains(CONTRIBUTION_VERSION_FLAG) && Version.isDeveloperVersion(getMyApplication())) {
enableLink(this, textVersion, textVersionView);
}
// if (prefs.contains(CONTRIBUTION_VERSION_FLAG) && Version.isDeveloperVersion(getMyApplication())) {
// enableLink(this, textVersion, textVersionView);
// }
final TextView about = (TextView) findViewById(R.id.About);
final String aboutString = getString(R.string.about_settings);
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) {
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());
}
// 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
public void updateProgress(boolean updateOnlyProgress) {