Extracted strings
This commit is contained in:
parent
ffad17a33d
commit
2ed74acd6f
@ -60,8 +60,14 @@
|
||||
<string name="menu_faction">Faction</string>
|
||||
<string name="menu_info">Info</string>
|
||||
<string name="menu_debug">Debug</string>
|
||||
<string name="menu_search">Search</string>
|
||||
<string name="choose_account_to_login">Choose account to login</string>
|
||||
<string name="login_failed">Login failed.</string>
|
||||
<string name="search_hint">Search Locations</string>
|
||||
<string name="menu_search">Search</string>
|
||||
<string name="intent_error">Address could not be opened</string>
|
||||
<string name="msg_copied">Copied to clipboard…</string>
|
||||
|
||||
<string name="tab_map">Map</string>
|
||||
<string name="tab_share">Share</string>
|
||||
<string name="tab_browser">Browser</string>
|
||||
</resources>
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user