android-fragmentactivity

Unfortunately, (App Name) has stopped when i use fragment to use Google Maps

白昼怎懂夜的黑 提交于 2019-12-13 10:31:40
问题 Can anyone clarify where my error is? The Android app crashes with the error, "Unfortunately, my app has stopped working".Just when put fragment in Main_layout file. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent"

java.lang.IllegalArgumentException when switching fragments

廉价感情. 提交于 2019-12-13 08:50:54
问题 I have an app that has a bottom bar with three fragments. There are also a few child fragments that are being called from parent fragments. Google Play console shows several crashes due to java.lang.IllegalArgumentException . I cannot seem to replicate the error, and nothing points to my code in the logs. Can anybody decipher what could be the problem? Here is the error stack trace. java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3190) at

Open another app within a fragment

﹥>﹥吖頭↗ 提交于 2019-12-13 07:26:27
问题 I am creating an app to run multiple tasks within a same activity. I am achieving this using fragments. Now, I want to run a game which is installed on my phone in a fragment within my activity. I tried this : PackageManager pm = getActivity().getPackageManager(); Intent intent = pm.getLaunchIntentForPackage("com.exo.drive"); getActivity().startActivityFromFragment(this, intent, getTargetRequestCode()); But this as expected opens another activity and launches the game. How do I make the game

Pass a list from a Fragment to a Class

你离开我真会死。 提交于 2019-12-13 07:07:33
问题 I have a fragment which present a list to the user, so I have inside the class extends fragment, 2 classes : one for the Holder and other for the Adapter. public class ListFragment extends Fragment { List<>mylist; //some stuff public class Holder extends RecyclerView.ViewHolder implements View.OnClickListener{ //some Stuff } //Another class public class NoteAdapter extends RecyclerView.Adapter<NoteHolder>{ //I put my list inside the adapter } } What I am trying to do is to create a Widget

Error:(72, 42) error: incompatible types: FragmentActivity cannot be converted to Fragment

爱⌒轻易说出口 提交于 2019-12-13 06:53:57
问题 I am having so issues with my project, i am getting the error: Error:(72, 42) error: incompatible types: FragmentActivity cannot be converted to Fragment. Could anyone assist me on this issues? This is one of my Fragments public class contact_Fragment extends FragmentActivity { View rootview; @Nullable public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootview = inflater.inflate(R.layout.contact_layout, container, false); return rootview;}

Integrating FragmentActivity in Fragment

帅比萌擦擦* 提交于 2019-12-13 06:27:09
问题 I've been searching but didn't find a fitting answer to my question. I'm totally new at android dev and trying to learn throw samples. I've 2 samples that I want to put together. A Slidemenu and a Tab layout. Both work great, separately.. For the Slidemenu i'm using the AndroidHive Example: http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/ For the tab layout I'm using the Androi Dev example. One of the menu items is General. In General I want to have 3 tabs

IllegalArgumentException when using fragment with tab

蓝咒 提交于 2019-12-13 06:01:36
问题 Below is the code for my Fragment Activity in which I am using tab layout.The code seems to be working just fine but from no where its starting giving exception.I already checked my view in both fragments but I cant find any error. package com.test.tabwithfragment; import java.util.HashMap; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentTransaction; import

Replacing Fragment : Didn't work

本小妞迷上赌 提交于 2019-12-13 05:51:18
问题 I have a Button in Fragment . If Button is clicked it has to replace the Fragment with another Fragment . The Fragments in activity_main.xml is created statically. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#efefef" android:orientation="vertical" tools:context=".MainActivity" > <LinearLayout android:layout_width="match_parent

How can I use set fragment inside my class which extends the Fragment class?

大兔子大兔子 提交于 2019-12-13 05:42:39
问题 Null returned from ((MessageTextFragment)fragment).setActionButtonStateListener(bAction); Here is the SetupMessageFragment.java package com.mayday.md.fragment; import com.mayday.md.MainActivity; import com.mayday.md.R; import com.mayday.md.WizardActivity; import com.mayday.md.adapter.PageItemAdapter; import com.mayday.md.common.AppConstants; import com.mayday.md.common.AppUtil; import com.mayday.md.common.ApplicationSettings; import com.mayday.md.common.MyTagHandler; import com.mayday.md.data

Android::Data are not retrieving to EditText field through Database

老子叫甜甜 提交于 2019-12-13 05:15:21
问题 I had gone through all the post regarding accessing data from database although I can't be able to solve my problem so I am posting my problem in this site. I want to access the SQL table which has been previously stored. My code works fine with storing of data but when I click on the save button but it is not working when I pressed on the Load button means it is inserting null values rather then stored values. Here are my code.. public class SetValue extends Fragment { @Override public void