Questions tagged as 'android-fragment'

0
answers

How to display a directory in a fragment?

Hello. I have an activity and I have two fragments in it. In one of these fragments I would like to display a directory. I did this to create the directory that will store temporary files. File minhaPasta = new File(Environment.ge...
asked by 12.07.2018 / 06:26
1
answer

error: incompatible types: MapsFragment can not be converted to Fragment

I'm trying to add the Google Maps API snippet to the main project screen error: Incompatible types: MapsFragment can not be converted to Fragment part of the code: fragmentManager = getSupportFragmentManager(); FragmentTransacti...
asked by 03.07.2018 / 16:25
0
answers

Android - How to create a Standard Fragment to be used / extend multiple Child Fragments?

Some of my application will have 12 tabs (fragments using viewpager and tabs adapter) showing a chart and a simple list. The 12 tabs will do the same thing, only what changes is the list and graphic information. How can I apply this using inh...
asked by 24.06.2018 / 00:55
0
answers

NullPointerException error in GoogleMap of Fragment

A Fragment (of the map) that lies within an activity, when I click on From Activity, can you change properties of the map that is in the Fragment? By clicking on the Navigation Drawer Map item it performs the following method: public...
asked by 14.06.2018 / 15:54
0
answers

Create DialogFragment after closing a second activity

I have a flow of screens this way in the Android project: Activity1 - > Fragment1 - > DialogFragment1 - > DialogFragment2 - > Acivity2 - > Fragment2 When I exit DialogFragment2 for Activity2, I close DialogFragment2. Afte...
asked by 19.06.2018 / 21:17
0
answers

Error in the fragment

I'm trying to make a calendar for birthdays, but in fragment where I put the calendar is giving an error that I do not know how to fix. Error 06-02 01:17:33.346 15106-15106/com.example.educador.myapplication E/AndroidRuntime: FATAL EXCE...
asked by 02.06.2018 / 02:48
1
answer

How to make a View overlap?

I have this XML : <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_hei...
asked by 05.06.2018 / 11:14
0
answers

Update data in a TextView automatically in Android Studio

I am putting together a project where I need my application (made in android studio) to pull data from a local server and update automatically without needing a refresh or swipe to refresh button. At the moment I am, I can pull the data throu...
asked by 22.05.2018 / 00:42
0
answers

DialogFragment does not close after its display followed by device orientation change

Hello. I'm doing a test with a simple one-screen app and a button that should open a Dialog that displays a placard. The openScoreBoardDialog () method opens a Dialog Fragment with 2 buttons ("New Game" and "Back"), clicking the "New Game" bu...
asked by 21.05.2018 / 21:41
0
answers

How to access methods of a Fragment from an Activity?

I have an Activity that contains a Fragment (and this Fragment is Google Map). I want for example, having a button in the Activity change the map type to Satellite. How could I do this through this Button? Activity: public class MainActivit...
asked by 26.04.2018 / 17:01