Questions tagged as 'android-fragment'

2
answers

How to get data from a text displayed in the dialog

I'm using this library to display dialogs in my application: link With this library it is possible to display in the dialog a created layout, but I am not able to capture the user input in the setPositiveButton method. mMaterialDialog = n...
asked by 05.10.2015 / 17:48
1
answer

Fragment: error inflating class fragment [closed]

I'm using Fragment to do the "drawer" navigation, ie in topics with options, but I'm finding this error, but I'm not sure what it is, it follows what it says in logcat: 12-22 20:08:25.774 1730-1730/player.kmk.com.kmk E/AndroidRuntime﹕ FATAL...
asked by 22.12.2015 / 21:32
1
answer

Hide ActionBar in one fragment but show in another

I'm working on a project that's being done pretty much all based on fragments . So far, I have only activity and 4 fragments , within which I need only one of them does not have ActionBar . Common methods of hiding Actio...
asked by 26.11.2014 / 14:38
1
answer

Error performing findviewbyid

Hello, I want to find the id of two Textviews, but they are returning NULL. Here is my code: private TextView nomeUser; private TextView cargoUser; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInst...
asked by 27.06.2017 / 17:11
1
answer

How to get the reference to the ListView from a ListFragment?

I have a ListFragment trying to access the ListView where Adapter has inserted the objects, but findViewById is returning null , does anyone have any ideas? The fragment code in XML: <?xml version="1.0...
asked by 04.05.2017 / 17:15
1
answer

Convert activity to fragments

Hello, I'm in need of a lot of help, I'm developing an application for my TCC, I've already assembled most of the features and now that I've been messing with the visual part I had problems, I wanted to use TabsLayouts, which use fragments from...
asked by 21.04.2017 / 23:47
1
answer

Which event shows whether the android keyboard is active or not?

There is some event or method that shows if the keyboard is active on the android screen, as I need to do this check in a Fragment.     
asked by 04.11.2015 / 18:40
2
answers

How do I access a Fragments ArrayList after a screen rotation?

I was trying to programmatically add to my Activity a list of Fragments that implement some CardViews. These CardViews have some TextViews that I would like to define from my Activity, and in fact it works by setting them in events after the Fra...
asked by 24.01.2015 / 19:28
1
answer

Error returning in getView method

I'm doing the app on Action Bar and I'm having a problem returning the value inside the getItem method. Here is the code: Test.java public class Teste extends Fragment { @Override public View onCreateView(LayoutInflater inflate...
asked by 17.11.2014 / 18:41
1
answer

Initialize element from one fragment in another

I have two snippets attached to my activity. My question is, how do I initialize an element that is in another fragment? In a fragment, to access the activity I use the code Textview tv = getActivity().findViewById(R.id.tv); This work...
asked by 18.12.2017 / 18:20