Questions tagged as 'android-fragment'

1
answer

Error while editing through SQLITE

I'm trying to edit an information that is saved on the SQLITE side. I'm working with fragments.  But I have the following error: FATAL EXCEPTION: main P...
asked by 22.06.2017 / 20:40
1
answer

How to put a title in the fragment?

I have the following code, which calls a fragment, in the ScheduleSearch activity: @Override public void openFragment(int home, boolean search, boolean changeClickDirection) { if (home == 0) { PlaceListScheduleFragment fragment = n...
asked by 05.05.2017 / 15:12
1
answer

Opening external site in android studio within a list item

I need to open an external link, for example: https:www.google.com.br But it should be within a menu list litem (side menu). To open the fragments I use the position of the item, there are 7 positions mentioned below. @Override public voi...
asked by 15.05.2017 / 15:50
1
answer

Pass data from Fragments to Activity

I have an application with a main activity and inside it there is a viewpager with fragments generated by a list and a floating button. What I want is that by clicking this button I can return data of all fragments generated for this activity. B...
asked by 15.05.2017 / 03:41
1
answer

Fragment with recyclerview closing application

We'll need to do a fragment where information will come in little by little, I'm using the RecyclerView method to develop this. The whole idea is to get comments on a certain item. Firstly I created a fragment , and it loo...
asked by 19.05.2017 / 15:29
1
answer

EditText with same size Android

I would like to leave my components <EditText/> the same size but I can not. <?xmlversion="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pare...
asked by 30.08.2017 / 03:00
1
answer

Problem with tablayout and sqlite

Hello everyone, I'm re-formulating an app and include in the main activity a tablayout that inflates two fragments. A fragment should display in a cardview all the data stored in the database. Rolling the screen to the left the other fragment sh...
asked by 15.04.2017 / 22:57
1
answer

Fragment Transaction - Error commit already called

I have this method that checks the fragment to inflate in my view: private void startFragment(int code) { switch (code) { case 1: fragmentTransaction.replace(R.id.fragment, MesAnterior.newInstance(0)); break...
asked by 19.02.2017 / 14:14
1
answer

Class context problem

In line 93 of the "menu1_Fragment" the following error appears: " StreamingMediaPlayer (android.Content.Context, ImageButton) in StreamingMediaPlayer can not be applied to (player.kmk.com.kmk.menu1_Fragment, ImageButton) strong> ". Yes, the inte...
asked by 23.12.2015 / 22:17
2
answers

Pass a string from an activity to a fragment of maps

In HomeActivity, I get the string result from the server, it contains all the data I need, separated by commas, so with the method I tried to pass to the fragment of that error FATAL EXCEPTION: main...
asked by 27.09.2016 / 01:32