Click here to Skip to main content
16,020,186 members
Home / Discussions / Android
   

Android

 
QuestionAndroid studio not showing all activity templates so need help Pin
Preeti Sarkar18-Aug-24 1:20
Preeti Sarkar18-Aug-24 1:20 
AnswerRe: Android studio not showing all activity templates so need help Pin
Andy Frank7-Sep-24 0:33
Andy Frank7-Sep-24 0:33 
Hi Preeti,

Can you try these solutions

Update Android Studio: Ensure you have the latest version installed.

Check Plugins: Go to File > Settings > Plugins and ensure relevant plugins are enabled.

Reset IDE Settings: Go to File > Manage IDE Settings > Restore Default Settings to reset Android Studio.

Manually Create a Settings Screen:

Create a new empty activity: File > New > Activity > Empty Activity and name it SettingsActivity.
Add a PreferenceFragmentCompat to manage your settings:

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <EditTextPreference
        android:key="example_key"
        android:title="Example"
        android:summary="An example preference"/>
</PreferenceScreen>


public class SettingsActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getSupportFragmentManager().beginTransaction()
            .replace(android.R.id.content, new SettingsFragment())
            .commit();
    }

    public static class SettingsFragment extends PreferenceFragmentCompat {
        @Override
        public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
            setPreferencesFromResource(R.xml.preferences, rootKey);
        }
    }
}


I hope this will work for you and resolve your issue....... .Smile | :)
AnswerRe: Android studio not showing all activity templates so need help Pin
yolanda smith10-Oct-24 21:22
yolanda smith10-Oct-24 21:22 
QuestionWhat is the right technique to automate Android builds from command line with gradlew command? Pin
Prahlad Yeri14-Jun-24 5:42
Prahlad Yeri14-Jun-24 5:42 
QuestionWhat is the correct syntax to call onCreateOptionsMenu() and onPrepareOptionsMenu() in Android Studio? Pin
priyamtheone2-Mar-24 4:39
priyamtheone2-Mar-24 4:39 
AnswerRe: What is the correct syntax to call onCreateOptionsMenu() and onPrepareOptionsMenu() in Android Studio? Pin
Richard Deeming3-Mar-24 22:03
mveRichard Deeming3-Mar-24 22:03 
GeneralRe: What is the correct syntax to call onCreateOptionsMenu() and onPrepareOptionsMenu() in Android Studio? Pin
priyamtheone30-Mar-24 7:39
priyamtheone30-Mar-24 7:39 
QuestionWeb browser design home page Pin
Bibek Poudel Nov202319-Nov-23 20:32
Bibek Poudel Nov202319-Nov-23 20:32 
AnswerRe: Web browser design home page Pin
Dave Kreskowiak20-Nov-23 3:19
mveDave Kreskowiak20-Nov-23 3:19 
GeneralRe: Web browser design home page Pin
David Crow7-Feb-24 2:18
David Crow7-Feb-24 2:18 
QuestionThe user data that I enter are not insert into the Firebase Realtime Database. Pin
alia zulaika4-Oct-23 22:45
alia zulaika4-Oct-23 22:45 
QuestionBuilding an ecommerce app/website Pin
Ben A Johnson24-Apr-23 4:07
Ben A Johnson24-Apr-23 4:07 
AnswerRe: Building an ecommerce app/website Pin
Richard MacCutchan24-Apr-23 4:14
mveRichard MacCutchan24-Apr-23 4:14 
GeneralRe: Building an ecommerce app/website Pin
Ben A Johnson24-Apr-23 4:42
Ben A Johnson24-Apr-23 4:42 
GeneralRe: Building an ecommerce app/website Pin
Richard MacCutchan24-Apr-23 4:49
mveRichard MacCutchan24-Apr-23 4:49 
GeneralRe: Building an ecommerce app/website Pin
Ben A Johnson24-Apr-23 6:26
Ben A Johnson24-Apr-23 6:26 
GeneralRe: Building an ecommerce app/website Pin
Richard MacCutchan24-Apr-23 6:29
mveRichard MacCutchan24-Apr-23 6:29 
AnswerRe: Building an ecommerce app/website Pin
jschell25-Apr-23 11:07
jschell25-Apr-23 11:07 
GeneralRe: Building an ecommerce app/website Pin
Ben A Johnson25-Apr-23 20:47
Ben A Johnson25-Apr-23 20:47 
GeneralRe: Building an ecommerce app/website Pin
jschell26-Apr-23 6:10
jschell26-Apr-23 6:10 
GeneralRe: Building an ecommerce app/website Pin
Ben A Johnson27-Apr-23 23:32
Ben A Johnson27-Apr-23 23:32 
GeneralRe: Building an ecommerce app/website Pin
Richard MacCutchan27-Apr-23 23:35
mveRichard MacCutchan27-Apr-23 23:35 
GeneralRe: Building an ecommerce app/website Pin
Ben A Johnson28-Apr-23 1:55
Ben A Johnson28-Apr-23 1:55 
GeneralRe: Building an ecommerce app/website Pin
Richard MacCutchan28-Apr-23 2:02
mveRichard MacCutchan28-Apr-23 2:02 
GeneralRe: Building an ecommerce app/website Pin
jschell28-Apr-23 11:17
jschell28-Apr-23 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.