Questions tagged as 'android-fragment'

2
answers

Error in Snack bar: Attempt to invoke virtual method

I'm trying to show a Snack bar in a fragment but it gives me the following error:    Attempt to invoke virtual method 'android.view.View   android.app.Activity.findViewById (int) 'on a null object reference This error happens when I want...
asked by 29.11.2018 / 00:28
0
answers

How to fill Recycler of a Fragment with data sent from another Fragment

In the Fragment1 I send a name and a phone to the Fragment2 I use the following example to try to fill the Recycler of the Second Fragment the communication works because I tried it adapting it to my needs, what I want to do now is to fill a Rec...
asked by 22.10.2018 / 16:27
2
answers

Problems referencing an Object

I am calling a class that I have already used, I have instantiated it and in my Login fragment if it runs normally but in my Client_Visit fragment I get an error: E/AndroidRuntime: FATAL EXCEPTION: main Process: sie.progrsist...
asked by 04.08.2018 / 00:41
1
answer

detect click out of fragment

I have a fragment that I need to close when I click away from it, this is the code I have: @Override public boolean dispatchTouchEvent(MotionEvent ev) { Rect dialogBounds = new Rect(); Fragment currentFragment = getSupportF...
asked by 12.04.2018 / 09:08
1
answer

Retrieve data from a Fragment from another Fragment

Let's say I have a Activity called MainActivity that has three Fragments    F1, F2 and F3 These three'Fragments' are loaded from the MainActivity in the following way: public void initFragments(){ FragmentManag...
asked by 15.03.2018 / 16:22
0
answers

check if an accessibility service is activated

I'm creating a direct access to the accessibility settings in android, my goal is after activating the service is that my application comes back and no longer shows the activity to call that screen. 'activarccesibidad = (ImageButton) findViewB...
asked by 12.03.2018 / 23:47
1
answer

Improve performance between changing tabs using fragments and recyclerview an android studio

I am making a small application to take control of a sticker album when I change to missing ones they appear in the fragment missing and they are updated when I select or deselect a number. The issue is that I have to reload the info between tag...
asked by 04.02.2018 / 19:41
1
answer

Problem with fragments

I'm doing a ViewPager that contains 3 fragments. Each fragment, when starting, has to make an asynchronous call to retrieve certain data through a query to a database. These calls are good, the problem is that, once in this activity, if I...
asked by 21.12.2017 / 10:07
1
answer

How to save data permanently on a screen (Fragment or Activity) on android even if you leave it?

I hope you can support me with this doubt that does not let me move forward with the app I'm doing. How can I store two data on the screen2 from the screen1 permanently, so that when I go to another screen and return I still have the same data....
asked by 18.10.2017 / 23:49
0
answers

I can not import the compile library 'me.dm7.barcodescanner: zbar: 1.9.8' for the Bar code

I want to import the library compile 'me.dm7.barcodescanner:zbar:1.9.8' to my app to use the barcode scanner, but I get the following error that does not let the project synchronize, I would like to thank everyone for some help!   ...
asked by 11.09.2017 / 19:13