Questions tagged as 'android-fragment'

1
answer

Error: The method getFragmentManager () is undefined for the type ActivitiesListAdapter

How do I call a Fragment from a BaseAdapter? I'll call him at the click of the button, and I should also pass on some information. I'm trying to call it this way: Fragment fr = new Fragment(); FragmentManager fm = getFragmentManager(); Frag...
asked by 15.11.2015 / 11:44
1
answer

android.widget.LinearLayout can not be cast to android.widget.ListView

While running my application, this error appears:    05-28 05: 33: 33.773: E / AndroidRuntime (28824): java.lang.RuntimeException: Unable to start activity ComponentInfo {br.exampleactionbar / br.exampleactionbar.MainActivity}: java.lang.Clas...
asked by 28.05.2015 / 11:03
1
answer

ListView Fragment

The list is loaded into the Fragment by selecting the ActionBar menu item. However, when I click on a tab other than Fragment with the list, and return to the tab with the list, the list that was previously is not destroyed. That is, a new reque...
asked by 29.05.2015 / 11:58
1
answer

How to maintain screen orientation?

I would like to know the equivalent Java code for this command: android:configChanges="orientation" Justification: I'm creating an app with the NavigationDrawer Layout, and I need to make certain settings (or all screens) when the us...
asked by 02.12.2014 / 12:56
1
answer

Use NotificationManager in a class that is not Activity

I'm having a problem and I'm not getting any better. The problem is this: I have a Fragment in my app, and I want to trigger a notification from it. The line I'm having problems with is this: NotificationManager mNotificationManager = (Notifi...
asked by 22.07.2014 / 20:38
2
answers

Using Dialog in a Fragment

I implemented the DIalog method plus this is giving error and I am not able to solve, I would like a help follow my class public class Iniciar_Host extends Fragment implements AdapterView.OnItemClickListener{ @Override public View onCreateView...
asked by 16.07.2014 / 20:11
1
answer

Update fragment UI after returning from BackStack

Maybe the problem is simple, but anyway, I'm messing around to get it done. I know I would have to do this through interfaces, but I do not want it that way. My app has only a Activity that houses many Fragments . Activity i...
asked by 11.06.2014 / 16:13
1
answer

Use interface implementation in a Fragment

I'm trying to implement an interface that I created within fragment , but I'm not having success. My fragment is being defined with the following code: package fragments; import pickers.DateTimePickerFragment; import pickers.Date...
asked by 23.06.2014 / 16:09
0
answers

DragEvent x MotionEvent android studio

Hello, I would like a help: I need to insert in the apk the effect of dragging and dropping an item (image, text, icon) into the bin, same as the function that is already configured in smarthphones or even apk as instagram. To make the drag movem...
asked by 27.11.2018 / 20:24
0
answers

Error: android.view.InflateException: Binary XML file line # 0: Error inflating class unknown

Whenever I run my app on some devices (In those I got this error, API was 21. In others with higher API it works without errors), this error message appears that I can not decipher. It happens for all Fragments in the same way, but the app close...
asked by 25.07.2018 / 14:46