Imageview Layout - Startactivityforresult

I have a imageview layout where one image need to be displayed on user selection.

If i click on image, it start a new activity for image selection and display that image on the previous activity image layout.

Activity 1:  


Activity 2:


View Full Post With 2 Replies

Related Forum Messages:

Please Follow Index to Quick Jump to the Message.


I am using listactivities to drill down into a hierarchy; artist, album and song. One activity per hierarchy. So, from the main activity  i start the artistactivity with the startactivityforresult method and when the an artist is selected i call the


Posted On: Jan 6 . View Related Posts . . View 3 Replies .

Startactivityforresult Error

I can't launch a new activity with startactivityforresult/startactivity method.

Below is the code.


Posted On: May 26 . View Related Posts . . View 5 Replies .

Startactivityforresult And Setresult

I have two classes my main class calls a menu class when the user gets done with that they press the back button to go to the main class. On the main class i have onactivityresult setup but no matter what the data field is null all the time even though i setup the bundle and attached it to an intent. Please look over my code and see what it going on.

Main class:


Posted On: Mar 31 . View Related Posts . . View 5 Replies .

Startactivityforresult From A Service

Id like to enable bluetooth like in this example.

However my class isnt a activity but a service and therefore i can't call startactivityforresult. How can i solve this problem?.

I know there are other questions that have been answered like:

But this doesn't solve my problem because my application consists of the service and nothing else.

Posted On: Aug 10 at 11:37 . View Related Posts . . View 1 Replies .

Startactivityforresult Always Gets A Resultcode Of 0

For some reason, when i use the call, the result is always returned as 0. All i am doing is popup the selection box and then once the selection is made, the user hits the back button. Does anyone know what mistake i could be doing?

Calling activity:


Invoked activity:


If i include the finish() call, it gives me the following:


Posted On: Dec 18 09 at 4:32 . View Related Posts . . View 2 Replies .

Startactivityforresult On Tab

I need to start startactivityforresult on a tab click, here is my activity senario:


How can i call the above myclass as startactivityforresult ?

Also can i call any function on tab click?

Posted On: Apr 6 2009 . View Related Posts . . View 4 Replies .

What Mechanism Behind Startactivityforresult()

I have an activity. In this activity i want to start another activity using startactivityforresult(). I understand that my basic activity is started within a process with a main gui thread.

But as far as i understand, startactivityforresult() is asynchronious which means that my new activity will be executed in a different thread.

I can't find information regarding the threads inside. If there is only one gui thread, how does these functions work asynchroniously ?

Posted On: Aug 15 at 20:42 . View Related Posts . . View 2 Replies .

Startactivityforresult In Onresume

I have action which can obtain data from two sources - from intent's extra and when there is no data it starts new anctivity and takes results from it.

In the second case it tooks very long to do startactivityforresult. It's faster even when i remove startactivityforresult from onresume and run it from menu, but it's unacceptable for end-user.

This second activity (started using startactivityforresult) has android:theme="@android:style/theme. Translucent" maybe it's the problem.

There is also another strange thing - when i start that transcluent activity from menu i can see "through" it (as i wanted), but when i run it from startactivityforresult translucent space is black.

Posted On: May 21 2009 . View Related Posts . . View 2 Replies .

Result Using Startactivityforresult From An Activity

Encoutered a tricky result using startactivityforresult from an activity

In the called activity , i set result like that:


When running the on activityresult, the extra has disappeared from intent in the method *onactivityresult*

In the api doc, it is telling that package name must be used , so i used it (see code upwards ).

Posted On: Feb 27 . View Related Posts . . View 3 Replies .

Startactivityforresult Be Called From Within Inputmethodservice

I am trying to add voice recognition to my input service keyboard.

So i have:


But then to call voice recognition, after the example in the sample, i need to do:


But then i get the eclipse error that:   startactivityforresult is undefined for this type.

So is it the case that i cannot get startactivityforresult from inputmethodservice? Then what's the work around?

Posted On: Oct 15 . View Related Posts . . View 7 Replies .

Onactivityresult Is Not Called For Startactivityforresult

I have an activity a as launch mode 'singletask'.

And  i am launching b from a by using startactivityforresult().

From i am calling setresult(). But onactivityresult() of a not being called.

Is there any problem with launch mode of a?

Posted On: Apr 15 . View Related Posts . . View 3 Replies .

Onactivityresult Does Not Always Get Triggered When Using Image_capture With Startactivityforresult

I am trying to track down and see if anyone else has encountered something similar to a behavior i am seeing regarding the image_capture intent.

Using the emulator it is the case that every time i call startactivityforresult() and choose ok after taking a picture, the code that i declared in my onactivityresult() function successfully gets executed. However when i switch to a real device, ( i tested this on both a motorola droid and htc eris) there are cases that clicking the ok or done button within the camera app just results in the camera app (image_capture intent) to simply restart instead of executing the code in onactivityresult(). I also noticed that if i put a break point in my onactivityresult() function when debugging with a device than the break point gets hit every time. Additionaly this behavior seems to be occuring more frequently in debug code (without the break point in onactivityresult) than in release code.

It just seems like i am hitting a bizarre timing issue. I am wondering if anyone out there has observed similar behavior in the image_capture intent. I don't have any special intent-filters declared in my androidmanifest.xml file for the activity i am using i wasn't sure if i needed to specify anything in there.

Below is the code i am using to startup the image_capture intent and the onactivityresult() function declared within the same class.


Posted On: May 20 . View Related Posts . . View 3 Replies .

Startactivityforresult And Onactivityresult Within Custom View Class

Is it possible to implement startactivityforresult and onactivityresult within a custom view class?

Posted On: Dec 31 2009 . View Related Posts . . View 2 Replies .

Translucent Theme Turns Black When Using Startactivityforresult / Fix It

I have two activities, a and b a is a background activity and b is a translucent open gl activity i can see the background when using startactivity() , however when i use startactivityforresult, the transparency lost, and the background turns black in color is it a bug for the android? Or someone has a solution about it?

Posted On: May 3 . View Related Posts . . View 2 Replies .

Startactivityforresult - Return 0 Result Code After Start New Activity

I've use startactivityforresult as it described in many examples but it return 0 result code after start new activity.

In main activity i use such code for sub activity invocation


And such code for getting results.


This code should work according many examples. And it should return result_ok after btnok clicked but after i click this button it only closes showvideo activity.

Posted On: Mar 11 2009 . View Related Posts . . View 3 Replies .

Can't Call Startactivityforresult From The Context - Retrieve Data From New One To Old

This is the same question as "how can i retrieve data from the new one to the old one".

But in my first activity, i called setcontentview(r. Layout. Main);. There is a surfaceview drawing on canvas.

The only method i know is to call getcontext() to get the context, then call startactivity(). But i can't call startactivityforresult() from the context i get, it seems that it doesn't support, i need to call it only in my activity class.

Can anyone give me any opinion? Code.

Posted On: Nov 21 at 18:52 . View Related Posts . . View 2 Replies .

Cannot Get Drawable To Appear In Imageview I Created / What To Do

I am writing an app which will create drawable shapes and add them to other drawables. (Think tetris pieces onto a tetris board. ) As a test, i want to have a particular shape appear when my activity is loaded, but i cannot get a drawable to appear in the imageview i created.could anyone explain why the following code isn't working?

Activity code.

Note: i have been able to make static resources from the 'drawable' folder appear in this imageview, just not drawables i have created in the code.

Posted On: Jan 12 at 3:29 . View Related Posts . . View 2 Replies .

Removing Imageview Border

I have a vertically oriented linearlayout that has a child linearlayout that includes a textview, an edittext, and a button, and a child imageview.

So something like:


And the problem i am experiencing is that the seperation between the linearlayout and the imageview (displaying a .png as a background with android:background="@drawable/sun") is displaying a visible crease in between them. I have the linearlayout using the same background color as the .png so that it looks like they flow together, but the crease ruins that aspect.

Edit: here's a screenshot!

Do you see the thin line under the submit button?

Here is the xml:


How can i fix this? (My sun and cloud have rough edges, any quick fixes with gimp?)

Posted On: Nov 16 at 7:07 . View Related Posts . . View 1 Replies .

Make A Imageview At Right Of Linearlayout

In the linearlayout, i need to put the image at right. I have tried a lot of method, none of them works. Can someone point out what is wrong? Code.

Posted On: Jul 4 . View Related Posts . . View 12 Replies .

Custom Checkable Imageview

I trying to create an imageview with 3 states - default, pressed, and checked. I've extended imageview, implemented the checkable interface, and created a selector drawable file with entries for the three states. But i'm confused about just how it all is supposed to work. I've got the default and pressed states working as desired but the checked state isn't appearing when i think it should. Is there an example of a custom checkable imageview somewhere?

Posted On: Nov 15 . View Related Posts . . View 3 Replies .

Bitmapdrawable Gravity Ignored In Imageview

I have created a bitmapdrawable and have set the gravity to clip vertically and to position at the bottom. Then i have added this to the imageview object, but the clipping is ignored and instead is being scaled instead. What am i doing wrong? I have even tried to set a small rectangle of 50x50 as the bound for the bitmapdrawable and the imageview still displays the whole image scaled. All i want to do is be able to have the image gravity set and clipped. Any help would be appreciated.

Posted On: Sep 1 2009 . View Related Posts . . View 2 Replies .

Imageview Button Interface

I've got an imageview inside a layout and i intercept onclick events. But when i press on it, there's no visual feedback - e.g.color changing until release. Essentially some button pressed feedback.

Posted On: Sep 27 . View Related Posts . . View 2 Replies .

Unable To Change Width Of An Imageview / Why It Does Not

This looks too simple, but i can't figure out why it does not.

I have an imageview inside a relative layout code.

In the code, i would like to change it's width: (in response to the change of a seekbar) here's the code.

Posted On: Oct 5 . View Related Posts . . View 4 Replies .

Imageview Selection In Custom Listview

I have developed a custom listview with following pattern

Name |-| age  | my tiny image  | email | -|

Now i want to know after clicking on my tiny image some function should be called. How to attach listener to this image which is part of custom listview row.

Posted On: May 12 . View Related Posts . . View 2 Replies .

Specify A Border Color For An Imageview When It Focus

In android, how can i specify a border color for an image view when it has focus? e.g. How to put an orange border around an image view when it has focus?

Posted On: Aug 3 2009 . View Related Posts . . View 2 Replies .

Can't Animate Imageview / Fix It

I'm having problems when trying to animate an imageview. It is a simple alpha animation.code.

And i load it on the ondraw() from a class that inherits from relativelayout:

Animation anim = animationutils. Loadanimation(ctx, r. Anim. Appear); apolloview. Startanimation(anim);

The image shows but in only displays the first step of the animation (the first frame).

Posted On: Oct 13 . View Related Posts . . View 3 Replies .

Dynamic Create A Imageview On Widget

I want to dynamic create imageview on a widget. How can i do this?

Posted On: Jun 3 . View Related Posts . . View 2 Replies .

Setting Margins For Imageview Using Code

I want to set margin for an imageview through code. I coudnt find any method for that xml attribute is android:layout_marginleft. What is the java method ? Setpadding() does not work in my case.

Posted On: Feb 16 2009 . View Related Posts . . View 6 Replies .

Getting Images From Intents To Be Showed Correctly In Imageview

I'm developing an app, and i want the user to be able to get an image either from their gallery or to use the camera to get the image. The intents are working fine, but im having trouble showing the pictures in my imageview, if the image is comming from the camera intent, the image is cropped and only shown a portion of it, when the image comes from the gallery intent the image is shown fine.

Here's the xml layout for the imageview:


Posted On: Mar 30 . View Related Posts . . View 4 Replies .