Questions tagged as 'android-fragment'

1
answer

Problems with Fragments: Activity has been destroyed

My navigation drawer is correct, but when you click on a drawer item, and it will give a replace in the fragments, the application stops, and in logcat an error message appears saying    Activity has been destroyed Code: class Dr...
asked by 01.10.2014 / 16:19
1
answer

Fragment with TABS inside another fragment with AppCompat

It is possible to add a fragment with TABS ( HORIZONTAL VIEW SWIPING WITH TABS ) within another fragmnet?     
asked by 27.11.2014 / 21:01
1
answer

SeekBar behaving unexpectedly when changing from one tab to another

I have an application with ViewPager and three tabs, each displaying a fragment that I try to preserve in memory so that new fragments are not instantiated fragments at every tab / screen change. public class TabsPagerAdapter extend...
asked by 22.05.2014 / 14:29
3
answers

Fragment error "Unable to start activity"

My application error when opening on a tablet and I can not identify the error it informs that I have to enable:    Unable to start activity   ComponentInfo {com.example.everton.horoscope / com.example.everton.horoscopo.MainActivity}:   andro...
asked by 09.10.2016 / 22:57
1
answer

Home screen for android app

I created an APP with a drawer menu, the drawable menu that appears as a template when creating a project in Android Studio. I was able to create the fragments and relate to the menu, it is working beauty, my problem is that I can not d...
asked by 08.09.2017 / 21:11
1
answer

Save an ArrayList to an SQLITE table

If yes, how? This is my table: db.execSQL("create table amc (_id integer primary key autoincrement,tipo text not null, resultado float not null,data date not null, id_usuario integer not null, FOREIGN KEY (id_usuario) REFERENCES usua...
asked by 06.07.2017 / 20:13
2
answers

Return to Fragment without having to re-create it

I have a fragment that shows a Map, and in the app has a registration screen, the first fragment to be created is the Map, if the user wants to register will start another Fragment, after he signs up I want to return to the Fragment of Map witho...
asked by 11.03.2015 / 17:27
1
answer

How to implement the onBackPressed () method in a class that inherits from Fragment, causing it to go back to the previous Fragment?

Segue um trecho de código para exemplificar meu problema: public class DashboardFragment extends Fragment{ ... } @Override public void onBackPressed(){ //Aqui volta para o Fragment anterior... } It gives the following error: Erro...
asked by 07.02.2017 / 21:14
2
answers

Error - Binary XML file line # 30: Binary XML file line # 30: Error inflating class fragment

I have a class fragment ... in which I am inflating an xml file. This fragment is being called in MainActivity ... but when I run this error appears    java.lang.RuntimeException: Unable to start activity   ComponentInfo {com.br.comunicacao /...
asked by 04.10.2016 / 20:45