android-fragmentactivity

I'm having problems with running the code on my device [duplicate]

徘徊边缘 提交于 2019-12-02 14:15:13
This question already has an answer here: Explanation of “ClassCastException” in Java 11 answers Here is my problem. Below is my class (Events.java) below it is the error. I continue to run my code on my phone but continue to get that error. I don't know what exactly the problem is and I don't know how to fix it. I tried everything I looked up but kept getting errors. Please help I'm a noob obviously. package com.androidapp.restart; import android.app.Fragment; import android.app.LoaderManager; import android.app.ProgressDialog; import android.content.ContentUris; import android.content

ActivityNotFoundException on FragmentActivity

不问归期 提交于 2019-12-02 13:50:25
问题 I do have lots of plain old activity-based apps in the Play Store. Since two days I try to do my first steps with Fragments. I still don't get it. I've read mostly all docs and blogs and guides about Fragments but my stupid simple test app refuses to start with an ClassNotFoundException on MyActivity. So here's what I did so far: The starting FragmentActivity called MyActivity: public class MyActivity extends FragmentActivity { @Override public void onCreate(Bundle bundle) { super.onCreate

IllegalStateException: Can not perform this action after onSaveInstanceState with onActivityResult

若如初见. 提交于 2019-12-02 11:52:39
I am new to Android development. I got an issue. I tried the last couple of hour but I can't figure out this. if so I got a popular question. IllegalStateException: Can not perform this action after onSaveInstanceState with ViewPager but failed because of the lack of Android development experience. Here is code: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1) { if(resultCode == RESULT_OK) { MyCustomDialogFragment newPopup = new MyCustomDialogFragment(); newPopup.setMyClickListener(MainActivity.this); FragmentManager

How do I put data from Roman Nuriks Wizard Pager review into database?

风格不统一 提交于 2019-12-02 10:15:58
问题 Alright so I know this has been asked before but the question and answer both didn't help me in my situation. What I need to do is simply get all of the data from the review page at the end of the wizard and put it into my SQLite database so that I may use it in the future within my application. I'm not even sure which class I should be working on in this case. I really hope someone who's had trouble with this before can help me because I've been searching for days and I'm stumped! Thanks in

Listview item's background with gradient in Fragment

℡╲_俬逩灬. 提交于 2019-12-02 09:58:48
I've got a problem, using gradient in background for listview's items inside fragment activity (using ABS). So, first of all I've got a background, that is succesfully using in other application. It has a gradient from (r = g = b = 91) to (r = g = b = 81). And thats how it looks in simple activity: And thats how it looks inside fragment activity: At first I think that it is very big gradient and I did a gradient only for 2 points, from (r = g = b = 80) to (r = g = b = 78). And thats what I gоt: I'm still want to use gradients in listview's items backgrounds in order items not seemed to be

Error inflating Class fragment in DialogFragment

99封情书 提交于 2019-12-02 09:43:58
I am trying to create a dialogfragment with a listview inside of it and I used the accepted answer from this question to do it How to display an existing ListFragment in a DialogFragment But I am getting an Error inflating class fragment when I try to open the fragment dialog and the app crashes Below is the dialog_fragment_with_list_fragment layout <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <fragment android:id="@+id

Fragments starting twice

a 夏天 提交于 2019-12-02 09:24:58
问题 I have this app in which im using fragments, but somehow everytime I start the app, every activity(fragment) is started two times. I'm banging my head about this but I cannot find an answer. Can someone help me? Here is my main FragmentActivity: public class TestSearch extends Activity { //this activity starts a fragment private DrawerLayout mDrawerLayout; private ListView mDrawerList; // private ActionBarDrawerToggle mDrawerToggle; private ArrayList<Device> devices; private ArrayList<Recepie

ActivityNotFoundException on FragmentActivity

最后都变了- 提交于 2019-12-02 06:27:10
I do have lots of plain old activity-based apps in the Play Store. Since two days I try to do my first steps with Fragments. I still don't get it. I've read mostly all docs and blogs and guides about Fragments but my stupid simple test app refuses to start with an ClassNotFoundException on MyActivity. So here's what I did so far: The starting FragmentActivity called MyActivity: public class MyActivity extends FragmentActivity { @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.myactivity); } } Here's the layout/myactivity.xml: <LinearLayout xmlns

Error inflating class android.support.v7.app.AlertController.RecycleListView

我的未来我决定 提交于 2019-12-02 05:55:13
问题 my app couldn't start it crashes immediately after i installed it and i couldn't understand the error! i have created two recylcerView for two fragments which are attached in the main activity xml file Error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.invincible.fragfrag, PID: 14384 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.invincible.fragfrag/com.invincible.fragfrag.MainActivity}: android.view.InflateException: Binary XML file line #14: Error inflating

Fragment still exist after remove in SDK < 24

喜夏-厌秋 提交于 2019-12-02 04:37:53
I'm facing the problem about removing Fragment in SDK < 24. removeFragment() FragmentTransaction frgTrans = fragmentMng.beginTransaction(); MyFragment myFrg = (MyFragment) fragmentMng.findFragmentByTag(TAG_MY_FRAGMENT); frgTrans.remove(myFrg).commit(); getFragment() MyFragment myFrg = (MyFragment) fragmentMng.findFragmentByTag(TAG_MY_FRAGMENT); if (myFrg == null ) { // Do sth } // But I checked that myFrg is NOT NULL ??? Furthermore, this problem only happened in SDK < 24 ( Android 5,6 ). What's difference things between Android SDK < 24 and 24 above ? I also try to call commitNow() for