Issue 259 add web link for poi creation

This commit is contained in:
Victor Shcherb 2011-05-08 23:21:18 +02:00
parent 1fb99684ea
commit 08860cdc26
4 changed files with 16 additions and 0 deletions

View file

@ -5,6 +5,7 @@
android:layout_height="fill_parent">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<TextView android:text="@string/create_poi_link_to_osm_doc" android:id="@+id/LinkToOsmDoc" android:layout_marginLeft="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content"/>
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow>
<TextView android:text="@string/poi_dialog_name" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="create_poi_link_to_osm_doc"><u>Интернет OSM</u> классификация с картинками</string>
<string name="system_locale">Системная</string>
<string name="preferred_locale_descr">Изменить язык программы</string>
<string name="preferred_locale">Локализация</string>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="create_poi_link_to_osm_doc"><u>Online OSM</u> map classification with images</string>
<string name="system_locale">System</string>
<string name="preferred_locale_descr">Change display language</string>
<string name="preferred_locale">Preferred locale</string>

View file

@ -65,15 +65,19 @@ import android.app.ProgressDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.net.Uri;
import android.text.Editable;
import android.text.TextWatcher;
import android.text.method.LinkMovementMethod;
import android.util.Xml;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class EditingPOIActivity {
@ -174,6 +178,15 @@ public class EditingPOIActivity {
commentText = ((EditText)dlg.findViewById(R.id.Comment));
updateType(a);
TextView linkToOsmDoc = (TextView) dlg.findViewById(R.id.LinkToOsmDoc);
linkToOsmDoc.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://wiki.openstreetmap.org/wiki/Map_Features")));
}
});
linkToOsmDoc.setMovementMethod(LinkMovementMethod.getInstance());
openHoursButton.setOnClickListener(new View.OnClickListener(){