Found 1631 Articles for Android

How to hide action bar in android?

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

706 Views

This example demonstrate about How to hide action bar in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken the digital clock view to show a clock.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.annotation.TargetApi; import android.content.pm.ActivityInfo; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.Window; import android.view.WindowManager; public class MainActivity extends AppCompatActivity {    @TargetApi(Build.VERSION_CODES.LOLLIPOP)    @RequiresApi(api ... Read More

How to get full screen activity in android?

George John
Updated on 30-Jul-2019 22:30:25

4K+ Views

This example demonstrate about How to get full screen activity in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken the digital clock view to show a clock.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.annotation.TargetApi; import android.content.pm.ActivityInfo; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.Window; import android.view.WindowManager; public class MainActivity extends AppCompatActivity {    @TargetApi(Build.VERSION_CODES.LOLLIPOP)   ... Read More

How to find edit text values start from Number is Even or Odd?

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

1K+ Views

This example demonstrate about How to find edit text values start from Number is Even or Odd.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         In the above code, we have taken edit text and button view to verify edit text data is starting with Even.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends ... Read More

How to find edit text values start from consonant or not?

Chandu yadav
Updated on 30-Jul-2019 22:30:25

61 Views

This example demonstrate about How to find edit text values start from consonant or not.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         In the above code, we have taken edit text and button view to verify edit text data is starting with a consonant.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends AppCompatActivity ... Read More

How to find edit text values start from Alphabet or Not?

Ankith Reddy
Updated on 26-Jun-2020 14:45:20

322 Views

This example demonstrate about How to find edit text values start from Alphabet or Not.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         In the above code, we have taken edit text and button view to verify edit text data is starting with Alphabet.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends AppCompatActivity { ... Read More

How to check activity in portrait mode?

George John
Updated on 26-Jun-2020 14:44:22

150 Views

This example demonstrate about How to check activity In portrait mode.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to show mode name.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.content.res.Configuration; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    TextView conf;    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState); ... Read More

How to check activity In landscape mode?

Arjun Thakur
Updated on 26-Jun-2020 14:43:16

368 Views

This example demonstrate about How to check activity In landscape mode.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to show mode name.Step 3− Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.content.res.Configuration; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    TextView conf;    @Override    protected void onCreate(Bundle savedInstanceState) {       ... Read More

How to get Sim service information in android?

Arjun Thakur
Updated on 26-Jun-2020 14:42:03

291 Views

This example demonstrate about How to get Sim service information in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to show sim service information.Step 3 − Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.Manifest; import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.telephony.TelephonyManager; import android.widget.TextView; import static android.Manifest.permission.ACCESS_COARSE_LOCATION; import ... Read More

How to get signal strength in android?

Ankith Reddy
Updated on 26-Jun-2020 14:40:41

3K+ Views

This example demonstrate about How to get signal strength in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to show signal strength information.Step 3 − Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.Manifest; import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.telephony.TelephonyManager; import android.widget.TextView; import static android.Manifest.permission.ACCESS_COARSE_LOCATION; import static ... Read More

How to get number of Sims available in android device?

George John
Updated on 26-Jun-2020 14:39:51

237 Views

This example demonstrate about How to get number of Sims available in android device.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken a text view to show number of sims available.Step 3 − Add the following code to java/MainActivity.xmlpackage com.example.myapplication; import android.Manifest; import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.telephony.TelephonyManager; import android.widget.TextView; import ... Read More

Advertisements