Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start activity Language and input

I want to open (start) activity named: "Language and input", where the user can change the device language.

startActivity(new Intent(Locale....));

It's in the Locale or... settings? Where is it?

like image 832
Zbarcea Christian Avatar asked Aug 10 '13 14:08

Zbarcea Christian


People also ask

How do I launch an Android app from another app?

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 button view to open YouTube application.

What is the use of intent createChooser () method?

createChooser(intent, title); // Try to invoke the intent. // Define what your app should do if no activity can handle the intent. This displays a dialog with a list of apps that respond to the intent passed to the createChooser() method and uses the supplied text as the dialog title.

What is startActivity in Android?

Starting activities or services. To start an activity, use the method startActivity(intent) . This method is defined on the Context object which Activity extends. The following code demonstrates how you can start another activity via an intent.

How do I make another activity as main activity?

If you want to make Login activity your main activity then put the the intent-filter tag inside Login activity. Any activity your want to make your main activity must contain intent-filter tag with action as main and category as launcher.


1 Answers

try this:

Intent intent = new Intent();
intent.setComponent( new ComponentName("com.android.settings","com.android.settings.Settings$InputMethodAndLanguageSettingsActivity" ));
startActivity(intent);
like image 190
Satur6ay Avatar answered Sep 23 '22 01:09

Satur6ay