Hi there! CAn you share your code for this combination? Right now im using
an async task in my parent activity to launch threads, i also have a custom
header with a progressbar(indeterminate) where my threads change its state.
Right now this seems to be working, but the problem arises when i
How do you something like this:
Heres my onCreate of the parent activity:
protected void onCreate(Bundle savedInstanceState) {
//set theme first for showing correct header
setTheme(getThemeId());
super.onCreate(savedInstanceState);
themeId=getThemeId();
//in case the screen will have a
Hi! So i've been trying to get a solution for a very specific problem that
involves using Async tasks and dealing with the rotation and also a custom
header that contains a progressbar view(the small spinner one, including a
text view saying Loading...). I've followed
IS there a way to avoid the static references to the views, but at the same
time giving the possibility of the tasks to change the visibility of the
progressbar even if the current activity visible is not the one who laucnhed
the task initially?
--
You received this message because you are
Hi! im using an Async-Task and currently im using runOnUiThread in the
doInBackground method to refresh activities UI, this seems to be working but
on rotation it loses the data and im usng the
getLastNonConfigurationInstance and the onRetainNonConfigurationInstance
methods, here's the parent
The only static variable in use is an int, for maintaining the state of a
progress bar while switching activities. the updateResultsinUi() is an
abstract method tha is implemented by sub activties classes.
regards,
--
You received this message because you are subscribed to the Google
Groups
So im using an AsyncTask but i'm getting random null exceptions for the
activity reference in the doInBackground method. Anyway here's the non
inner public async task:
public class QuadrosMobileActivityTask extends AsyncTaskVoid, Void,
Object{
*protected QuadrosMobileActivity activity=null;*
No one?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options,
yes the detach is called on the activity thread in the
onReatainNonConfigurationInstance method...:
*@Override*
* public Object onRetainNonConfigurationInstance() {*
* if(task!=null)*
* task.detach();*
*
*
* return(task);*
* }*
And here's the method that attachs the activity back to the
Well the thing is, this Asynctask is binded to a parent activity, that the
subactivities use when they want to do some background work. They each
implement the method you see in the code i've posted, the *
activity.doBackGroundRequest(); *
I've actually had errors even after the line
Also wouldnt using the activity.getApplicationContext() result in the same
problem??? if activity is null i would stil lget the null exception???
regards,
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
yes, but how can i get the method from the activity that contains the logic
to do in the background from the context, is this possible? im getting null
exception for the activity after verifying if the activity is not null:
if(activity!=null){
return
How so? each activity launches its own async task with its own specific
logicwhen you rotate you just detach the current activity from the
async task, the activity gets destroyed, a new one is created and attached
to the SAME async task
--
You received this message because you are
Hey Skyler, thanks for the link. so i need to get rid of activity reference
on the doInBackground...i assume its possible to use the activity reference
in the preExecute and post
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
Hi again skyler, thanks for the reply, yes the code im using in the
doInBackground deals with the logic i want to do in the background that
each activity has, in this case the method doBackgroundRequest is the
method every activity uses if it wants to use an async task...but it seems
this
What about extending the async task and then implement the logic directly
in the doInbackground method?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe
Yes i have a indeterminate progressBar in the header, the spinner one, but
im using broadcast to all the activities which have the spinner to show or
hide it if there's a task running in the background :
@Override
protected void onPreExecute() {
Hi there! Yes i removed the code from activity.doBackgroundRequest to the
extending Async Tasks doInBackground, i think it might solve this, BUT i
will se the thread synchronization topic.
Thanks for the attention.
--
You received this message because you are subscribed to the Google
Groups
Hi there! Sorry for posting here again, but i was hoping if i could try
this sample, you said to put the synchronized in the detach method here:
void detach() {
*activity=null;*
}
in the asynctask, is this correct?but detach() is only called in the
activity and not the in the async task
Hi all! so currently i have an activity that laucnhes an async task from
inside the spinner onItemSelected method with the select int year value:
spinYears.setOnItemSelectedListener(
new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView? item, View arg1,
int arg2,
Hi There! So im trying to create a multiple selection list with checkboxes
and im using the arrayadapter with
the R.layout.simple_list_item_multiple_choice option:
public static ArrayAdapter? listMultipleSelectionAdapterArray(List?
elements, Context cont){
ArrayAdapter? newAdapter=new
No one?i created a custom arrayadapter but i dont know if i can get all
checked items without any connection to the custom row that has the
checkbox...
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Hi! im currently using an expandable list as an n-tree level list, and i
use the long click to select any element, either group or childs, the
problem is that the group row has a gradient gradient backgroup so
translates in it not having any kind of highlight. i managed the normal
click color,
Basically what i want is default behaviour in all states but with my own
backgroud gradient:S
On Monday, February 27, 2012 2:14:45 PM UTC, Bluemercury wrote:
Hi! im currently using an expandable list as an n-tree level list, and i
use the long click to select any element, either group
/ selected. For those
states, your drawable will turn transparent and let the android list item
drawable show.
You'll also need android:duplicateParentState on the layout added in step
1.
-- Kostya
On 02/27/2012 06:31 PM, Bluemercury wrote:
Basically what i want is default behaviour in all
ididnt understand if the new layout would wrap the textview like that.
regards,
On Monday, February 27, 2012 3:17:12 PM UTC, Kostya Vasilyev wrote:
On 02/27/2012 06:57 PM, Bluemercury wrote:
Didnt change the row layout like you said, but it seems to be working
as expected. Any reason to change
, Kostya Vasilyev wrote:
On 02/27/2012 07:25 PM, Bluemercury wrote:
Hi again Kostya, seems that the cursor focus isnt working althought that's
not the most important thing it still is default behaviour so im wondering
why it doesnt work. Also the extra layout was something like
android:bottomLeftRadius=7dp
android:topLeftRadius=7dp
android:topRightRadius=7dp /
/shape
regards,
On Monday, February 27, 2012 3:58:51 PM UTC, Kostya Vasilyev wrote:
On 02/27/2012 07:53 PM, Bluemercury wrote:
Am i missing something the in selector file?
regards,
Yes - the selector
wrote:
On 02/27/2012 08:13 PM, Bluemercury wrote:
Okay, even after those changes i still get the focus color behind the
gradient background. i just putted round corners in the gradient and i
can see it behindlet me show what i have now then:
Here is my selector:
?xml version=1.0
Hi! So im currently trying to make my custom dialogs persistent after
rotation and i was going to use the onCreateDialog method for that. but it
seems to be deprecated and instead i was pointed to the DialogFragment
class.
I've seen some tutorials in android developer page and my main question
So i was having this error after some rotations were made. After this i
used the onDestroy method do get rid of drawables:
@Override
protected void onDestroy() {
super.onDestroy();
*unbindDrawables*(findViewById(android.R.id.content).getRootView());
System.gc();
Runtime.getRuntime().gc();
}
Hi! so im currently having a problem regarding the onSaveInstaceState
method in the Fragment class. This class is called from a FragmentActivity
that acts as a Tab created in another FragmentActivity, but i cant seem to
make the call to onSaveInstanceState to happen, here's some code:
/FragmentTabsPager.html
On Tue, May 22, 2012 at 10:25 AM, Bluemercury joao.ro...@gmail.comwrote:
Hi! so im currently having a problem regarding the onSaveInstaceState
method in the Fragment class. This class is called from a FragmentActivity
that acts as a Tab created in another FragmentActivity
/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.html
or
http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabsPager.html
On Tue, May 22, 2012 at 10:25 AM, Bluemercury joao.ro...@gmail.comwrote:
Hi! so
.
Hope this help,
Fred
On 3 June 2012 01:09, Bluemercury joao.ro...@gmail.com wrote:
So im adapting my DateTimePickerDialog implementation to a
DialogFragment, and right now it works well, i press the button to show the
dialogfragment choose a date/time value, press ok and it will show
Hi al! The thing is here im using framents, the text field is on the
fragment, not on the activity itself. The ideia was to create a dynamic
dialofgragment without to mess around with the activity too much, since in
this case the fragment is part of a viewpager in the activity. What if i
use
Hi al! i've read the answer from Dianne, and it seems i can declare an
interface in one fragment and then implement it on another. But for this i
need the pointer to the fragment in question, she said:
take advantage of the FragmentManager APIs to save a fragment pointer
in a bundle and
somehow point to the
correct edittext
regards,
On Wednesday, June 6, 2012 2:16:42 PM UTC+1, Bluemercury wrote:
Hi al! i've read the answer from Dianne, and it seems i can declare an
interface in one fragment and then implement it on another. But for this i
need the pointer to the fragment
38 matches
Mail list logo