Loading activity in Fragment Code
-
Can we load an activity (specifically in onCreateView) in fragment ? Instead of creating view by inflater, can we launch activity so it's events gets called ? For e.g. Instead of using "inflater.inflate(R.layout.tabactivity, null)", can we launch activity which uses "tabactivity" as layout ?
-
Answer:
Unfortunately this is not possible. You must create a Fragment Activity that will be used to refer to any fragment you create. This is a good place to start: https://github.com/bmeike/Fragments
Aniruddha at Stack Overflow Visit the source
Related Q & A:
- How to call Fragment from another Fragment?Best solution by Stack Overflow
- How to add fragment activity to activity?Best solution by Stack Overflow
- How to replace a fragment with another fragment in Android?Best solution by Stack Overflow
- How to have scrolling vertically as well as horizontally inside fragment of fragment activity?Best solution by stackoverflow.com
- How to send data from Fragment to an Activity in Android?Best solution by forum.xda-developers.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.