forked from hussien89aa/AndroidTutorialForBeginners
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring.txt
More file actions
Latest commit
22 lines (15 loc) · 503 Bytes
/
Copy pathstring.txt
File metadata and controls
22 lines (15 loc) · 503 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
1- lyaout
<resources>
<string name="app_name">localization</string>
<string name="buhome">Home</string>
<string name="mgs">Welcome</string>
<string-array name="myarray">
<item>name</item>
<item>name</item>
<item>name</item>
</string-array>
</resources>
2- code
String msg=getResources().getString(R.string.mgs);
Toast.makeText(this,msg,Toast.LENGTH_LONG).show();
String[] myarray=getResources().getStringArray(R.array.myarray);