i am using fragments in my app and i want to change MainActivity extends AppCompatActivity to extends FragmentActivity.what are the major differences between them?
what is the difference between AppCompatActivity and FragmentActivity
706 views Asked by rubbyer At
1
There are 1 answers
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in ANDROID-FRAGMENTS
- Gray view with a white horizontal bar appearing after Google signin from my Android app
- why doesn't it switch to another fragment?
- React Native Android, why is fragment not visible after a certain offset?
- Is it possible to navigate from one navgraph to a different one on a different starting fragment? (Nested Navgraph)
- Open full screen fragment from smaller fragment
- Attempt to invoke virtual method 'android.content.Context androidx.fragment.app.FragmentHostCallback.getContext()' on a null object reference
- Retain last opened Fragment after opening push notification
- How do I solve the in fragment problem in android studio
- Option menu does not appear in the toolbar after being collapsed inside a fragment
- How can I force or ensure that a Fragment gets recreated by FragmentStateAdapter?
- OnSwipe in MotionLayout scene transition
- Is it a good idea to use SharedViewModel (with Flow inside it) between a ForegroundService and a UI Component (Fragment/ Composables)
- Kotlin Stateflow new value emitted but not collected
- Android Studio (java) - Item of recyclerView of fragment can't be removed permanently
- I have an error about switching between fragments
Related Questions in ANDROID-FRAGMENTACTIVITY
- Can I launch Play Store Review Flow from a Fragment?
- how to I find the correct findFragmentById to accesss the TextView?
- Not able to inflate a fragment inside the Frame layout which is a children of collapse bar layout
- How to send data from activity page to fragment page
- Hiding menu from toolbar on a specific fragment within the same activity
- How to set icon for TabLayout Tab in Android Fragment (Javascript)
- BottomNavigationView height issue when changing status bar transparency in Android app material 3
- Cursor Value Error While Working With Cursor
- Back to last fragment error since no addToBackStack Kotlin
- Change Activity to Fragment
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.AtMainActivity.displayCreateCategoryDialog
- Changing AppBar state (header and back icon) after adding new fragment
- How do I safely re-create my activity when I switch between dark and light mode when using Fragment dialog?
- How do I keep getting empty response
- 'Non-static method 'findViewById(int)' cannot be referenced from a static context
Related Questions in ANDROID-LISTFRAGMENT
- Android Viewpager items gone invisible while the Fragment is started. But reappearing after locking and unlocking device
- what is the difference between AppCompatActivity and FragmentActivity
- How to set a FragmentList in a NavigationDrawer?
- Android List view not working with fragment
- How to access Shared Preferences for each item in Recycler View in Fragment
- Is it possible to use ActionBar in popup window
- Android popup window - back button
- How to go from Main Activity to fragment, and from the same fragment back to Main Activity?
- How do I save instance of List<Fragments>
- Updating the ListView in a ListFragment
- how remove margin from right and left of list fragment in android
- How to avoid fragment superposition
- How to inflate a Fragment (List) that was created by the Android studio wizard in an Activity?
- How to trigger the ClassCastException - cannot be cast to android.widget.AbsListView$LayoutParams in android with List Fragment?
- Android list preference view refresh
Related Questions in APPCOMPATACTIVITY
- Android SplashScreen API is not compatible with AppCompatActivity and Material
- Correct way to handle menus
- AppCompatActivity not recognising registerForActivityResult
- Transparent background FAB not allowing interaction/blocking interaction
- Activity constructor is not assigning value
- How do I manually compile an Android App that requires AppCompatActivity?
- ProcessCameraProvider.BindToLifecycle Using Xamarin.Android Activity Instead of AppCompatActivity
- Android Kotlin - Unresolved reference: AppCompatActivity after updating to 1.5
- what is the difference between AppCompatActivity and FragmentActivity
- Android - crash app when using support:appcompat-v7 libraries
- Issue with calling setContentView(R.layout.activity_main) on some devices
- Android inflate layout crashes after adding fragment container view
- Hide Shadow on androidX Toolbar
- Parsing MainActivity to appcompat in jetpack compose
- How To Access and Modify activity outside OnCreate class
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
AppCompatActivityextendsFragmentActivity, so anyone who needs to use features ofFragmentActivitycan useAppCompatActivity.FragmentActivityis for use with the backport of fragments found in the support-v4 and support-v13 libraries. The native implementation of fragments was added in API Level 11, which is lower than your proposed minSdkVersion values. The only reason why you would need to considerFragmentActivityspecifically is if you want to use nested fragments (a fragment holding another fragment), as that was not supported in native fragments until API Level 17.AppCompatActivityis from the appcompat-v7 library. Principally, this offers a backport of the action bar. Since the native action bar was added in API Level 11, you do not needAppCompatActivityfor that. However, current versions of appcompat-v7 also add a limited backport of the Material Design aesthetic, in terms of the action bar and various widgets. There are pros and cons of using appcompat-v7, well beyond the scope of this specific Stack Overflow answer.