diff --git a/mobile/res/values/strings.xml b/mobile/res/values/strings.xml index d486e60e..4b7f480f 100644 --- a/mobile/res/values/strings.xml +++ b/mobile/res/values/strings.xml @@ -47,9 +47,9 @@ Press back button twice to exit Avoids accidental exits Developer options - Enable developer mode - If enabled, all IITC sources will be loaded from external storage of the Android device. - Please copy all sources from $IITC_folder/build/mobile/ to /sdcard/IITC_Mobile/dev/. + Enable developer mode + If enabled, all IITC sources will be loaded from external storage of the Android device. + Please copy all sources from $IITC_folder/build/mobile/ to /sdcard/IITC_Mobile/dev/. IITC source Load IITC main script from url or use local script. Currently used source: @@ -60,8 +60,14 @@ Faction Info Debug + Search Choose account to login Login failed. Search Locations - Search + Address could not be opened + Copied to clipboard… + + Map + Share + Browser \ No newline at end of file diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java index 9e4cc979..2fb54652 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java @@ -189,7 +189,7 @@ public class IITC_Mobile extends Activity { } catch (URISyntaxException e) { e.printStackTrace(); new AlertDialog.Builder(this) - .setTitle("Address could not be opened") + .setTitle(R.string.intent_error) .setMessage(e.getReason()) .setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override diff --git a/mobile/src/com/cradle/iitc_mobile/share/IntentFragment.java b/mobile/src/com/cradle/iitc_mobile/share/IntentFragment.java index bbeca174..2fda0f6b 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/IntentFragment.java +++ b/mobile/src/com/cradle/iitc_mobile/share/IntentFragment.java @@ -21,7 +21,7 @@ public class IntentFragment extends Fragment implements OnScrollListener, OnItem } public String getTitle() { - return getArguments().getString("title"); + return getActivity().getString(getArguments().getInt("title")); } @Override diff --git a/mobile/src/com/cradle/iitc_mobile/share/SendToClipboard.java b/mobile/src/com/cradle/iitc_mobile/share/SendToClipboard.java index 142e50ff..a3fc47be 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/SendToClipboard.java +++ b/mobile/src/com/cradle/iitc_mobile/share/SendToClipboard.java @@ -7,6 +7,7 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.widget.Toast; +import com.cradle.iitc_mobile.R; public class SendToClipboard extends Activity { @Override @@ -20,7 +21,7 @@ public class SendToClipboard extends Activity { ClipData clip = ClipData.newPlainText("Copied Text ", text); clipboard.setPrimaryClip(clip); - Toast.makeText(this, "Copied to clipboard…", Toast.LENGTH_SHORT).show(); + Toast.makeText(this, R.string.msg_copied, Toast.LENGTH_SHORT).show(); finish(); setResult(RESULT_OK); diff --git a/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java b/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java index 0506788a..7aeb43d1 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java +++ b/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java @@ -20,12 +20,12 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList IntentFragmentAdapter mFragmentAdapter; ViewPager mViewPager; - private void addTab(Intent intent, String label, int icon) + private void addTab(Intent intent, int label, int icon) { IntentFragment fragment = new IntentFragment(); Bundle args = new Bundle(); args.putParcelable("intent", intent); - args.putString("title", label); + args.putInt("title", label); args.putInt("icon", icon); fragment.setArguments(args); mFragmentAdapter.add(fragment); @@ -44,14 +44,14 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, getUrl()); intent.putExtra(Intent.EXTRA_SUBJECT, mTitle); - addTab(intent, "Share", R.drawable.share); + addTab(intent, R.string.tab_share, R.drawable.share); String geoUri = "geo:" + mLl; intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri)); - addTab(intent, "Map", R.drawable.location_map); + addTab(intent, R.string.tab_map, R.drawable.location_map); intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getUrl())); - addTab(intent, "Browser", R.drawable.browser); + addTab(intent, R.string.tab_browser, R.drawable.browser); } @Override