How to access Resource String in Android
MainActivity.java
package com.example.r_stringdemo;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
String nm=getApplicationContext().getString(R.string.un);
if(nm.equals("bipin"))
{
Toast.makeText(getApplicationContext(), "True", Toast.LENGTH_LONG).show();
}
}
}
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
String nm=getApplicationContext().getString(R.string.un);
if(nm.equals("bipin"))
{
Toast.makeText(getApplicationContext(), "True", Toast.LENGTH_LONG).show();
}
}
}
Android Versions List with Code Name and API
| Version | Code Name | API Level |
| Android 1.0 | alpha | 1 |
| Android 1.1 | beta | 2 |
| Android 1.5 | Cupcake | 3 |
| Android 1.6 | Donut | 4 |
| Android 2.0 | Eclair | 5 |
| Android 2.0.1 | Eclair | 6 |
| Android 2.1 | Eclair | 7 |
| Android 2.2–2.2.3 | Froyo | 8 |
| Android 2.3–2.3.2 | Gingerbread | 9 |
| Android 2.3.3–2.3.7 | Gingerbread | 10 |
| Android 3.0 | Honeycomb | 11 |
| Android 3.1 | Honeycomb | 12 |
| Android 3.2 | Honeycomb | 13 |
| Android 4.0–4.0.2 | Ice Cream Sandwich | 14 |
| Android 4.0.3–4.0.4 | Ice Cream Sandwich | 15 |
| Android 4.1 | Jelly Bean | 16 |
| Android 4.2 | Jelly Bean | 17 |
| Android 4.3 | Jelly Bean | 18 |
| Android 4.4 | KitKat | 19 |
| Android 5.0 | Lollipop | 21 |
| Android 5.1 | Lollipop | 23 |
| Android 6.0 | Marshmallow | 22 |
| Android 7.0 | Nougat | 24 |
| Android 7.1 | Nougat | 25 |
| Android 8.0 | Oreo | 26 |
| Android 8.1 | Oreo | 27 |
| Android 9.0 | Pie | 28 |
| Android 10.0 | Android 10 | 29 |
Labels:
Android
|
0
comments
GTU WTAD Important Questions Bank
Unit-1 HTML and JavaScript
- Give DOM hierarchy? Explain properties, methods and events for text element of Html form
- What is JavaScript? Explain the advantages of JavaScript.
- What is CSS? Explain the types of CSS.
- Explain function in JavaScript?
- Explain Date and Time functions in JavaScript
- Explain Object creation and modification in Javascript
- Explain Following HTML Tag with example: (1)
- (i) Title, Head
- (ii) OL, UL , DL
- (iii) Table with TH,TR,TD
- Write a java script to check whether a number entered in textbox is prime or not.
- In Javascript, eval("2 + 0.56") returns ______. (1)
- In HTML, <ol> tag is used to create list items with bullets. (True / False) (1)
- Write the advantages of JavaScript. Explain any three methods of Date and String objects of JavaScript. (7)
- Explain the various types of inputs provided by HTML. (7)
- Write a Javascript that changes background color to red if user presses the mouse button. (4)
- Write a JavaScript function to add two numbers when user presses submit button. (3)
- JavaScript is created by______ . (Sun, Microsoft, Netscape) (1)
- What will be assign in variable mca by following JavaScript var mca = parseInt(“0xff”); Ans:255 (1 mark)
- JavaScript is compiled and executed at client. (True / False) (1)
- _________ is only property of string object in JavaScript. (1)
- Java is _______________and JavaScript is ___________________. (2)
- True or False. JavaScript Ignores White Space. (1)
- What is the code in HTML so that someone can mail by just clicking on text? (1)
- Write a code for create a multiple list in HTML. (1)
- Which two methods are used for takes keyboard input and screen output in Java Script? (1)
- What is the correct JavaScript syntax to write “Hello World”? (1)
- HTML elements with no content are called _______ elements (1)
- Explain Array in JavaScript with Example (3)
- Write a JavaScript to input two numbers and find out max. Put validation - both value is not null. (7)
- The <select> tag allows multiple choice selection from list of choices that are offered. (True/False) (1)
- The Date object contains information about a particular date and time. (True/False) (1)
- Explain DOM hierarchy. List two important methods of Window and Document Object. (7)
- What is special about Math object? Explain any two methods of String, Date and Array object.(7)
- Which tag is used to write JavaScript in HTML? (1)
- Explain functionality of Join() & Reverse() function of array in JavaScript. (2)
- Explain basic structure of HTML document. (3)
- Explain various dialog box provided by JavaScript. (3)
- Explain Table tag of HTML with example. (7)
- We can save external JavaScript file with ____ extension. (1)
Subscribe to:
Posts (Atom)
Subjects
- WordPress
- Mobile Computing-4649303 Practical Solution
- Android Programming New Syllabus Theory
- PHP LAMP Question Bank
- PHP LAMP Theory
- Step by Step Android Example
- Android Practical
- Android Theory
- Android Question Bank
- Networking FON Practical
- Networking FON Theory
- OS Practical
- OS Theory
- HTML
- JavaScript
- J2EE WTAD Theory
- J2EE WTAD Question Bank
- J2EE WTAD Quick Guide
- J2EE WTAD GTU Papers
- J2EE WTAD Practical
- Python
- JAVA Theory
- JAVA Practical
- MIS
Categories
- Android (55)
- CSS (3)
- Configure Tomcat7 (2)
- Decryption (16)
- Difference (1)
- Encryption (16)
- Error Detection and Correction Techniques (3)
- FON (27)
- Framing Technic (2)
- J2EE (29)
- JAVA (13)
- JavaScript (19)
- OS (17)
- PHP (11)
- Protocol (3)
- SERVER SOCKET PROGRAMING (7)
- Servlet (13)
- WTAD (34)
- c (11)
- install Tomcat (2)
- linux (8)
- shell script (33)
- unix (22)
Total Pageviews
© BipinRupadiya.com. Powered by Blogger.
