android-activity

Add Items to an ArrayList<String> that has been passed between Activities

帅比萌擦擦* 提交于 2020-01-05 12:12:30
问题 I have Looked around here on StackOverflow and the internet and tried a few things but all of them are giving me the same general problem. I have an ArrayList that I create in one activity and then send it through (another activity or 2 others depending on the users choices) and in each activity (including the one that the arraylist is created in) has the user select a single button from a group. Upon selecting the button I have a listener that creates a simple string and then adds that

Fragment shows twice on top of eachother

流过昼夜 提交于 2020-01-05 08:12:26
问题 I im displaying fragments in my activity, but seems that some fragments are displaying(instatiating) twice. I'm double checking my code but and in my opinion all should be ok. The issue is when I show the fragment its ok, but after showing another fragment and showing the same fragment it's like reloading the calling the same fragment all over again and it shows updated data - although no data updating was done. this is how I call my fragments: public void showFragment(Fragment fragment,

ActivityNotFound exception thrown for a PreferenceActivity listed in the Manifest xml

泪湿孤枕 提交于 2020-01-05 07:25:03
问题 I'm trying to implement a PreferenceActivity in my app, but I keep getting an exception of type android.content.ActivityNotFoundException . It mentions making sure that the Activity is listed in my Manifest file, but it is and I still get the exception. Thanks in advance for your help--this is has been driving me crazy. This is a similar posting I found that has a solution, but it didn't work for me: My PreferenceActivity does not show up, even though it is in my manifest file res/xml

ActivityNotFound exception thrown for a PreferenceActivity listed in the Manifest xml

一笑奈何 提交于 2020-01-05 07:23:05
问题 I'm trying to implement a PreferenceActivity in my app, but I keep getting an exception of type android.content.ActivityNotFoundException . It mentions making sure that the Activity is listed in my Manifest file, but it is and I still get the exception. Thanks in advance for your help--this is has been driving me crazy. This is a similar posting I found that has a solution, but it didn't work for me: My PreferenceActivity does not show up, even though it is in my manifest file res/xml

Android - Status bar hides part of view sometimes

血红的双手。 提交于 2020-01-05 06:33:53
问题 Hi I have previously asked this question but didnt get any solution. I have following problem with Galaxy nexus running android 4.2. I am using camera intent to take photo. If I capture pic in landscape mode and return to activity(activity is in portrait mode with android:screenOrientation="portrait" in manifest) the status bar hides the view. It works well if pic is taken in portrait mode. This happens only with certain devices like Galaxy Nexus and Sony Xperia Neo . I tested it on htc

Android - Status bar hides part of view sometimes

牧云@^-^@ 提交于 2020-01-05 06:33:09
问题 Hi I have previously asked this question but didnt get any solution. I have following problem with Galaxy nexus running android 4.2. I am using camera intent to take photo. If I capture pic in landscape mode and return to activity(activity is in portrait mode with android:screenOrientation="portrait" in manifest) the status bar hides the view. It works well if pic is taken in portrait mode. This happens only with certain devices like Galaxy Nexus and Sony Xperia Neo . I tested it on htc

StartActivity from string

拈花ヽ惹草 提交于 2020-01-05 05:37:09
问题 I want to start Activity using Aktywnosc string from Kalkulator in Xamarin Android Visual Studio public class Kalkulator { public int Id { get; set; } public string Nazwa { get; set; } public string Aktywnosc { get; set; } public string Krotki_opis { get; set; } public string Zrodlo { get; set; } public string Ineksowanie { get; set; } } The Activity is in Resource.biblioteka folder. I'm trying: Intent and start activity from string and this How can I start a new android activity using a

Set different activities for pending intent of notification

好久不见. 提交于 2020-01-05 05:27:09
问题 I am currently facing the problem of setting pending action for two different activities to notification. I have a ParentActivity and a ChildActivity. I want open ChildActivity on notification click if currently it is running or paused, otherwise start ParentActivity. I tried this : ......... Intent resultIntent = new Intent(this, ChildActivity.class); TaskStackBuilder stackBuilder = TaskStackBuilder.create(this); stackBuilder.addParentStack(ParentActivity.class); stackBuilder.addNextIntent

onRequestPermissionsResult called in HomeActivity but not in Fragment

不羁的心 提交于 2020-01-05 05:25:22
问题 In a fragment I call requestPermissions public class FgDialogFragment extends DialogFragment { requestPermissions(new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},22); In the HomeActivity. java I wrote this code which is working fine @Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { Log.i("info", "Result recieved"); } but I want to get onRequestPermissionsResult on the FgDialogFragment class. I tried this but it's not

Android Studio Gradle build errors with login activity

£可爱£侵袭症+ 提交于 2020-01-04 21:28:52
问题 I am having these weird errors, and I am unable to fix it. All I did was create a new login activity and this problem occurs. I have read that I have to migrate to GoogleApiClient, but I have no idea how to 'migrate' to it...I installed Android Studio today as well and everything is brand new. I just really want to start doing some app development, but this is in my way. Here is a related error as well UPDATE: I have changed the version of the google play services in gradle dependencies, but