Most voted "android-fragment" questions
It is one of the great novelties of the Android API, which emerged after the version Android 3.0 Honeycomb, thanks to the arrival of tablets in the market.
Learn more…321 questions
Sort by count of
-
0
votes1
answer1916
viewsAndroid: How to update Actionbar and Drawerlayout title and items at runtime?
I need to update the Actionbar title and each of the Drawer menu items with the runtime language change. I use the following code to change the language of my application but I cannot change the…
-
0
votes1
answer421
viewsERROR findViewById Listview Fragment
Hello, I have a problem that I can not solve, I created a list view but when "calling" in Java (has an arrow below) results in error when testing the application, this is the error: 08-04…
-
0
votes2
answers3914
viewsWhat are the life cycle stages of an Activity and Fragment?
What are the life cycle stages of an Activity and Fragment? What are the differences of these stages? And how can I identify at which stage an application’s Activity or Fragment is currently?
-
0
votes2
answers947
viewsHide keyboard with Fragment
I’m making a mobile app that has screens on Fragment with Drawer, and in them EditText, but I’m having a problem that by clicking on EditText and then click away, or click the menu the keyboard does…
-
0
votes1
answer324
viewsFragment with TABS inside another fragment with Appcompat
It is possible to add a fragment with TABS (HORIZONTAL VIEW SWIPING WITH TABS) inside another fragmneto?…
-
0
votes1
answer333
viewsSeekbar behaving unexpectedly when switching from one tab to another
I have an app with ViewPager and three tabs (tabs), each displaying one Fragment that I seek to preserve in memory so that new ones are not instantiated Fragments every change of tab/screen. public…
-
0
votes1
answer1057
viewsProblem updating Listactivity using a custom adapter
I’m working on an app where I populate a ListActivity using data from a SQLite created by the program itself. When adding items in the database, the list is automatically updated, but when removing,…
-
0
votes1
answer114
viewsError reopening Map in Fragment inside Drawerlist
I’m developing an Android app and I’m having a navigation problem between Fragments. I created a drawerList and in it I have some Ragments, in one of these Ragments I have a map, when I initially…
-
0
votes1
answer628
viewsAndroid Transition between Fragments
I have an application that contains 2 Ragments. An Fragment (A) is an item listing and Toolbar has a search, and the second (B) is the date of the selected item. I can make the transition well from…
-
0
votes1
answer50
viewsHow can I tell which viewpager this is when I try to take a print with a floating boot?
I have a view with several Ragments, I added a floating button to print the screen, but I would like to know how to differentiate each Ragment to put different names in the photos. I have the code…
-
0
votes1
answer1324
viewsHow to create Listview with Sqlite data in Fragment
How do I insert the Sqlite data into this listview of my code: @Override public void onActivityCreated(Bundle savedInstanceState) { String[] sCheeseStrings = {"Emerson","Simone","Samara"};…
-
0
votes1
answer565
viewsGet click id on the previous Fragment listview
I have a Fragment that loads a listview. This listview is populated with a hashmap getting the values from the bd. When I click on item 1,2,3... of the list, it opens a Fragmentb(details). How do I…
-
0
votes2
answers652
viewsCalling a function when a Fragment is closed
I have a activity who calls a fragment which is displayed in the form of a DialogAlert. But when that fragment is closed, need a method of Activity be called. What is the best way to do this? The…
-
0
votes1
answer42
viewsClass context problem
In line 93 of "menu1_Fragment" the following error appears: "Streamingmediaplayer (android.Content.Context, Imagebutton) in Streamingmediaplayer cannot be Applied to…
-
0
votes0
answers247
viewsError with Fragments
I am beginner in Android programming and I’m having an error that I can’t fix it. I’m doing a project that uses Fragments. I have a small layout that works perfectly when I don’t put the Fragment…
-
0
votes0
answers64
viewsInflate Toolbar in Stepper
I need to create a Stepper in my application that I got the library on Github https://github.com/shivasurya/materialsteppers I managed to implement the application, however I want to put a Toolbar…
java android android-layout android-fragmentasked 8 years, 9 months ago Joel Messias Do Nascimento 103 -
0
votes1
answer239
viewsHow to open an actitivity from a java Fragment
How to open an Activity after clicking on a Listview that is in Fragment, I am using: public void onActivityCreated(Bundle savedInstanceState) { // TODO Auto-generated method stub…
-
0
votes2
answers1390
viewsHow do I place a Circular image inside an Android Fragment?
I found on the net several tutorials in English with examples of methods to round up a bitmap image. However, I could not implement them within a Fragment. How to proceed in this case?
-
0
votes1
answer668
viewsHow to call a alertDialog within a Fragment?
I cannot call a alertDialog inside a Fragment. At the moment of setting the Builder(this) it returns error. Follows code: public void mostrarMsg(String titulo, String mensagem) { AlertDialog.Builder…
-
0
votes1
answer527
viewsSlideshow images with android
Does anyone know how to make an image slide show on a Horizontalscroolview on android? Or do you know of any library that does this? I need to make a slideshow inside a Fragment
-
0
votes0
answers86
viewsError generating signed APK
When will I sign the apk to send the Play Store occurs the following error message: Error: Fragments should be Static such that they can be re-instantiated by the system, and Anonymous classes are…
-
0
votes1
answer819
viewsAdd bookmark on map ANDROID
Good night, I have an application with a map in a Swipe tab, but I want the map to mark a point on the map and start at that point. thanks in advance. Together send the JAVA: public class Mapa…
android eclipse api android-fragment google-maps-android-api-2asked 10 years, 3 months ago SaPires 175 -
0
votes1
answer416
viewsSave the instance of a Fragment
To MainActivity calls Fragment upon being started. I have tabs that alternate through Fragments. I trace a route in one of the Fragments and when leaving, clicking on the tab and when returning, the…
-
0
votes2
answers220
viewsChoose which Fragment will be shown in Activity
I have a Activity that the email is requested and if the email exists I show a Activity with a Fragment for entering the password. If this email n exists, I want to display a Fragment, in this same…
-
0
votes1
answer2120
viewsRecover data from Fragment
I have an Activity with 4 tabs, in each tab I carry a different Fragment, in each Ragment I have a flumulario, and in the last I have the Register button, when I click Register I want to get the…
-
0
votes1
answer421
viewsContext error in Fragment
have a problem, I found a tutorial to create a Listview but is implemented with extends Activity and I’m with extend Fragment and so I have an error in the place marked with an arrow: package…
-
0
votes1
answer54
viewsProblems with Fragments: Activity has been destroyed
Man navigation drawer is correct, but when you click on a Drawer item, and it will replace the Fragments, the application stops, and the logcat error message says that Activity has been destroyed…
android-fragmentasked 10 years, 1 month ago Daniel Reis 388 -
0
votes0
answers43
viewsDúvidas Tablayout
I have 3 views that inflame Contents from Recycler view. I put all of them extending from one BaseActivity.java to have some common functions like Navigationview(Sidebar) and also the Toolbar. Now,…
-
0
votes1
answer1745
viewsPass data from an Activity to a Fragment
I need to pass the String result that is in Homeactivity for Mapsfragment, but I do not know how to do, I am beginner and do not understand much about the subject. Homeactivy package…
-
0
votes2
answers724
viewsPass a string from an Activity to a fragment maps
In Homeactivity, I get the string result from the server, it contains all the data I need, separated by comma, so with the method I tried to pass to the Fragment of this error FATAL EXCEPTION: main…
-
0
votes1
answer174
viewsFragment using Appcompatactivity
I’m getting this mistake: onPrepareOptionsMenu Menu in android.support.v4.app.Fragment clashes with onPrepareOptions Menu Menu in android.app.Activity attemping to use incompatible Return type.…
-
0
votes1
answer65
viewsFragment Android
I’m trying to make an app with the layout Navigation Drawer, but use Fragments, I’m not able to call another screen using Fragments. Login fragment = new Login();…
android-fragmentasked 7 years, 10 months ago Juliano Morche 116 -
0
votes1
answer46
viewsFirst item of a duplicated Arraylist
Hello, I have the code below that seems to be working correctly, the problem is that the first item in the list either goes blank or copies the data of the last item in the list. public class…
-
0
votes2
answers138
viewsGoogleapiclient in Fragments
The app in question, has a main activity and two fragments. There are two information panels, one contains the address list and the other displays a map showing the addresses of the list. The list…
-
0
votes1
answer105
viewsError while extracting fragmented Edittext data using a Helper class
I am trying to get the data of an Edittext that is in a fragment with the help of a Helper class, to later save in the database, but the following error is shown in the Androidstudio Bugger:…
-
0
votes1
answer315
viewsLoad a Listview into a Fragment from a Fragment
I’m in the following situation: I have a Tabbar with 2 Fragments (Productofragment and Carrinhofragment). Inside the Productofragment I have a Listview with an add button that triggered, adds an…
-
0
votes0
answers161
viewsHow to use another class for the same layout
It is as follows: I made adaptations in the codes in order to work the Slider Menu style so I had to use the Fragment interface, as shown in the code below, but in this same layout in this case is…
-
0
votes1
answer129
viewsProblem with tablayout and sqlite
Hello guys I’m reformulating an app and includes in the main Activity a tablayout that inflates two Fragments. An Fragment should present on a cardview all data stored in the database. Scrolling the…
-
0
votes2
answers1198
viewsSummon Fragment within Fragment
I am developing a chat. I have a Mainactivity in which I invoke a Fragment (which extend baseAdapter), where I list all contacts in a listview. By clicking on a contact, I want to open a new…
-
0
votes0
answers34
viewsParameters between Fragment and Activity
I have an Activity with a Fragment inside, but I want to pass the parameters present in the Fragment when changing from Activity, what I do?
string google-maps android-fragment android-activity intasked 7 years, 6 months ago william silva 21 -
0
votes1
answer458
viewsFragment with recyclerview closing application
Let’s go I need to make one fragment where information will come from little to little, I am using the method of RecyclerView to develop this. The whole idea is to get comments from a certain item.…
-
0
votes1
answer43
viewsBugando Activity + Memory Error
Good afternoon programmers, I am developing an application and in a certain part of it I populate textviews with some data coming from a webservice. When ordering data from the webservice in a…
-
0
votes1
answer586
viewsWhen to use a Fragment instead of an Activity
I’m working on a project where I’m making use of several fragments and only one activity. Giving a researched, I saw that many places suggest the use of fragments when the code of the same will be…
-
0
votes1
answer180
viewsNavdrawer using activities instead of Fragments
I’m trying to implant a Navdrawer in my app but the example that I saw uses Fragments instead of Activity that I was already using, I found a block that deals with the Fragments. Part of the code…
android android-layout android-fragment android-activityasked 9 years, 10 months ago Allan Chrystian 483 -
0
votes1
answer134
viewsHow to open a new Activity without closing the Drawer menu?
I have an Activity and in this Activity I have the Drawer menu. How do you call another Activity without the Drawer menu disappearing? I just want to change Activity’s content. I tried to use…
java android android-layout android-fragment android-activityasked 7 years, 6 months ago Lucas Charles 127 -
0
votes0
answers20
viewsHow to put a Listview Expandable in a Tab?
Opa, I cannot configure this type of listview in a TAB. For example, I have screen 1 when I click the button on screen 1 it goes to the screen I want to put the tab (with name of college campuses).…
-
0
votes0
answers130
viewsHow does one Fragment call another Ragment method?
Hello, how can I call a method that is in another Fragment through the android:onclick =""
-
0
votes1
answer2933
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null Object Reference
I have a Fragment that through a button it will call the other Fragment. But the following error is appearing. 06-20 19:12:12.075 17971-17971/com.example.gerdaumanagement.gerdaumanagement…
-
0
votes1
answer198
viewsHow can I switch tabs using a spinner?
I would like to implement the tabs change by a spinner I added inside Toolbar. public class MainActivity extends FragmentActivity { /** * The {@link android.support.v4.view.PagerAdapter} that will…
-
0
votes1
answer1578
viewsHow to use Findviewbyid E Onclique in a Fragment?
I added two tabs to the main Activity layout, and created two java classes, one for each tab. So I took the buttons of Activity xml from main Activity and put it in the layout of Fragment, but I…