Tag: android-intent

how to change the dropdown height in spinner

i tried a lot to change the dropdown item height of spinner.. but i couldn’t get a good solution.. plz help me guys.. here is a code loginactivityview.xml <Spinner android:id=”@+id/spinnerFacility” android:layout_width=”400dip” android:layout_height=”50dip” android:layout_alignLeft=”@+id/lpassword” android:layout_below=”@+id/lpassword” android:layout_marginTop=”32dip” android:background=”@drawable/location” android:paddingLeft=”10dip” android:dropDownWidth=”@style/dropDown” android:minHeight=”40dip” android:typeface=”monospace” /> loginrowspinner.xml <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” > <TextView android:id=”@+id/textViewRowFacility” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:gravity=”left” […]

Intent.FLAG_ACTIVITY_CLEAR_TOP doesn't deletes the activity stack

I am developing the application in which i want to close whole application on button click. I know in android we should not think about to close the application because android does that automatically from this Is quitting an application frowned upon?. but yet i want to close my application. So what i am doing […]

passing jsonarray from 1 activity to another

I am making an app in which I want o pass a json array between 2 activities .how to pass json arry from one activity to another through intents in android. can anybody help me over this?? thanks

How to set photosphere mode when open panorama Android

I am stuck with a problem when I want open a photosphere picture with my android application. Indeed, I can open it but the application show a sort of preview of the photosphere (it scrolls the picture from left to right). I want that my application open the photosphere with the acceloremeter mode (the mode […]

in Android if OS kills my application, will getIntent() return the Intent with the same extras?

After my application has been restored, of course. or I have to store everything at onSaveInstanceState()?

startActivityForResult and Intents Extras, it seems extras are not pushed back

I have this code: Intent intent = new Intent(); intent.setAction(Intent.ACTION_PICK); intent.setData(ContactsContract.Contacts.CONTENT_URI); intent.putExtra(EXTRA_ONLINE_ID, (String) v.getTag()); startActivityForResult(intent, PICK_CONTACT); Then on response: public void onActivityResult(int reqCode, int resultCode, Intent data) { switch (reqCode) { case (PICK_CONTACT): if (resultCode == Activity.RESULT_OK) { try { Uri contactData = data.getData(); String onlineid = data.getStringExtra(EXTRA_ONLINE_ID); } catch (Exception e) { e.printStackTrace(); } […]

Intent.ACTION_PICK returns empty cursor for some contacts

I have an app in which one aspect is for a user to select a contact and send a text to that contact thru the app. The app only works with some contacts and fails on others. More precisely: for the contacts that I entered into my contact book by hand, the Intent.ACTION_PICK has no […]

Android Google Chrome not firing after lockscreen app

I have a lockscreen app, my activity is the first when the user hits unlock power button. I have a website link on the lockscreen-app. When the pattern-unlock is disabled , chrome gets fired with the the website link. But when I enable the security pattern, after the user enters his pattern, chrome app opens […]

Activity's slide animation with overridePendingTransition having an strange effect

I’m creating an animation to be displayed when the user goes to a specific activity. Basically, this activity slides up to be showed and slides down to be closed. I’m using overridePendingTransition to make this animation happen. But there’s an ugly effect with the slide. It can be seen in the screen shot: Look at […]

Camera or Gallery intent destroys old activity on some devices

I am working on app which uses WebView to display its content. However, it needs to open camera or gallery in order to choose picture: Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, 1); Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(galleryIntent, 2); It’s working fine on most devices, but on HTC One and few others both intents […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.