We can cache view lookup for improve performance, here’s the solution: View lookup cache: The custom ArrayAdapter Here’s the full code of file MainActivity.java The…
To learn about ListView, we create some simple examples for ListView. Example 1: Simple ListView Step 1: create new project Step 2: File content_main.xml Add…
We learn about android.telephony.TelephonyManager by creating a simple example: Step 1: Create a new project Step 2: with file main_activity.xml add some TextView and Button:…
We learn about android.os.Handler by creating some simple examples. Example 1: Simple counter Step 1: create new project Step 2: with file contain_main.xml add two…
Step 1: create new project Step 2: In file AndroidManifest.xml After line: Add: Step 3: right click com.example.myapplication -> New -> Java Class with name…
Example with ImageView.setImageResource File conntent_main.xml: File MainActivity.java After: public class MainActivity extends AppCompatActivity { add public ImageView imgview; And in method onCreate add We will…