**** BEGIN LOGGING AT Sun Sep 16 03:00:00 2012 Sep 16 03:09:23 howdy Sep 16 03:17:10 Is it possible to access the application object from a broadcast receiver? Sep 16 03:18:31 I have to set some objects in my custom application class when a broadcast is received. Is it possible? Sep 16 03:26:18 napster: Do you have a Service running? Sep 16 03:26:40 3~^^ Sep 16 03:26:50 oops. yeah, ki was gonna say maybe lok into a service Sep 16 03:27:01 napster: A Service can hold objects...and then your broadcast receiver can access the objects running in the Service Sep 16 03:27:02 Ologn: I have one but it is provided by a library, so no access to it apart from the fact that it sends a broadcast Sep 16 03:27:05 service shold be able to access the APplication object Sep 16 03:27:21 napster - override the class you are using from the library Sep 16 03:27:33 err, extend it* Sep 16 03:27:43 speakingcode: not possible to do that :( Sep 16 03:29:11 Ologn: Basically this library sends me a broadcast. I can choose to receive it and what I need is to set a variable in my custom application class onRecieve Sep 16 03:30:16 Ologn: From the documentation class, I have a bare understanding that a broadcast receiver cannot access application class with its given base context. I just wanted to clarify. Sep 16 03:30:28 *documentation about application class Sep 16 03:31:04 napster, have all the objects and methods in a Service class. When you catch a broadcast with the Broadcast Receiver, send it to the Service, including any method parameters Sep 16 03:31:25 Ologn: ok, I need to write another service right? Sep 16 03:31:27 the service will contain an object of the custom class Sep 16 03:32:09 ok Sep 16 03:33:34 The service will also contain methods to access that object. As far as how many services, it depends what you're doing. Sometimes one is OK, sometimes more are needed. Sep 16 03:37:43 ok Sep 16 03:38:38 Can anyone point me in the direction of updating a database record based on a PagerAdapter's view created by said database records? Sep 16 03:49:44 anyone know how the Google+ app is able to scroll with so many images so easily? Sep 16 03:49:52 how can i run something on the UI thread in a fragment? Sep 16 03:49:57 in a method that is caleld by another thread Sep 16 03:50:13 do i have to do getActivity().runOnUI.... Sep 16 03:50:31 recycled views? Sep 16 03:51:52 speakingcode: i think that's what I did to runOnUI Sep 16 03:52:15 and yeah, i figure recycled views. looks like I'll have to create a custom view for what i'm looking for Sep 16 03:52:37 i'm trying to create a scrolling grid of images, but not aligned... sorta like how pinterest looks. Sep 16 03:52:58 anyway, i'm currently doing it with a ScrollView, with 3 LinearLayout columns, adding items into each one as needed Sep 16 03:53:09 no recycled views, and I'm eventually running out of memory Sep 16 07:22:29 does anyone know why a small bit (~ 5%) of a view i set to invisible would still be showing? Sep 16 07:51:03 because you have an animation set on it Sep 16 07:58:29 i've called clearAnimation, shouldn't that do the trick? Sep 16 08:00:56 howdy Sep 16 08:01:53 I have two listview fragments, when an item is selected in one it populates the other , yadda yadda. is there a simple way to highlight the selected one that will unhighlight when selecting another item in that list? Sep 16 09:27:44 LOL http://www.maxconsole.com/cgi-bin/maxconsole/rknewz.pl?function=detail&id=RKLS00000014330&cat=ANDROID Sep 16 10:35:31 Hello, I've a not properly technica Sep 16 10:37:21 Fucking t9. I've a non technical question. I'm looking for a designer for creating a few assets for my app. Any raccomandation? Sep 16 11:02:46 Anyone know how to fix emulator keyboard input (Android 16 emulator target, Ubuntu 12.04 host)? The soft keyboard appears but I can't type directly into the emulator, I must clock of the soft keyboard directly :-( Sep 16 11:05:10 nm... I had to set "keyboard support: yes" in options. Seems logical now ;-) Sep 16 11:06:49 That used to be the default tho, didn't it? Sep 16 11:07:04 should be Sep 16 11:07:23 But now I know why I haven't been able to type in my emulators directly lately either :p Sep 16 11:08:14 yep. i ran into a few times on my work system but it worked on the latpop. I had been assuming some system thing. Until I recreated the avd here and it stopped working. Sep 16 11:08:37 on another note, the performance of 4.1.1 x86 emulator with GPU emulation is just astounding! Sep 16 11:09:09 I can run a full xhdpi / 720p screen at 60fps! Sep 16 11:13:21 Haven't tried that yet Sep 16 11:13:34 Since I use my GN when testing on JB :p Sep 16 11:13:50 it boots in <5 sec. this is without a snapshot Sep 16 11:13:56 I really dont know how thats possible Sep 16 11:14:21 THis is on Linux BTW (I know qemu on Mac has always been a bit slower) Sep 16 11:15:53 Yeah, it runs nice Sep 16 11:17:28 I mostly use the API7 emulator during development, and my device.. Then go through the other before releasing anything Sep 16 11:18:48 ever since lint started flagging API level problems, I dont worry so much Sep 16 11:19:28 API7 just runs pretty fast Sep 16 11:20:20 this is faster Sep 16 11:21:35 I have a JB phone and a ICS tablet, I don't really have much use for the JB emulator during development ;O Sep 16 11:22:17 It's handy for having multiple incompatible versions of my app available to regression test. Sep 16 11:23:22 also considering the emulator is an eng build and not 'user'. Meaning you can 'adb root' and browse files, and things of that nature Sep 16 11:23:39 its handy for poking at sqlite dbs in-plac Sep 16 11:23:48 hehe Sep 16 11:43:55 Hi chat. Sep 16 11:44:46 I set a button to do an HTTP transaction. Using the log I have verified that the request is successfully completed, but the activity just hangs after that. Sep 16 11:45:55 I am using a ThreadPoolExecutor and I block until the transaction is completed. After the thread is done doing the transaction, the activity just stays there and doesn't resume. Any ideas on why this is the case? Sep 16 11:46:09 I've tried logging onPause and onResume as well, but they aren't being called either Sep 16 11:50:01 What are you blocking Sep 16 11:51:39 I'm blocking on the completion of the request Sep 16 11:51:59 I made a RunnableFuture and I just wait till isDone() is true Sep 16 11:52:18 and it works, and gets the result, but the GUI doesn't work after that Sep 16 11:53:10 I am guessing it's better if I would let the Future notify the activity somehow, instead, but I still dont' know why this doesn't work though. Sep 16 11:53:22 hello all Sep 16 11:54:19 how start activity A if A activity on top then reload? Sep 16 11:56:02 How chat if no English? (Just kidding). Uh, maybe you are asking about how to handle onRestart()? Sep 16 11:56:12 Brb, class Sep 16 11:56:17 * eudicot -> Sep 16 11:57:21 maybe add flags to Intentent? Sep 16 11:57:27 *Intent Sep 16 11:57:36 Look into onNewIntent Sep 16 11:57:39 or change launchmode of Activity Sep 16 11:57:49 eudicot: blocking UI thread is *BAD* idea Sep 16 11:57:52 onNewIntent works on single task? Sep 16 11:57:57 And yeah, launchmodes Sep 16 11:58:01 singleTask Sep 16 11:58:11 singleTop maybe Sep 16 11:58:31 Google it, I can't remember exactly - but onNewIntent is probably what you want Sep 16 11:59:26 singleTop and FLAG_ACTIVITY_REORDER_TO_FRONT Sep 16 11:59:47 not destroy in "A -> B -> A" first A Sep 16 12:01:17 the way it should be? Sep 16 12:02:39 but singleTask and FLAG_ACTIVITY_REORDER_TO_FRONT it works correctly Sep 16 12:16:39 Is there some intellij shortcut to collapse all /* */ comments? Sep 16 12:50:58 does anyone here know how to auto-start an app after it's exited, so far i removed the launcher so if the guy exits the app it will have a black screen, deactivated the home key so he cant go back that easy, written an init.d script to make the app launch when the phone boots but i can still exit the app if i go back, back, back, back a million times or if i just hit menu, exit, i can deactivate the menu, exit easily but i cant deactivate this back Sep 16 12:50:58 million times Sep 16 12:52:31 Enver_kemoba: Make your app respond to the launcher event Sep 16 12:52:41 and catch all the buttons Sep 16 12:53:06 ;), smart... :D Sep 16 14:30:31 how can add RemoteViews to LinearLayout? Sep 16 14:36:41 You don't Sep 16 14:41:04 SimonVT can use one RemoteViews one and more times in Notification.contentView ? Sep 16 14:41:38 one object of RemoteViews Sep 16 14:43:17 I don't know, try it Sep 16 14:43:43 i gotted big lags Sep 16 14:50:16 hey, has anyone ever created a widget that allows you to layout items in a Pinterest-style manner with recycled views? Sep 16 14:50:36 I think I'm going to have to write my own custom control to do it, but I figured I'd ask before I went down that path. Sep 16 14:51:38 Hi Sep 16 14:51:44 How do I deodex my rom ? Google Nexus 7 Sep 16 14:51:50 Using Ubuntu (Linux Mint 13) Sep 16 14:53:21 Hi Sep 16 14:53:44 How do I deodex my rom ? A rom for Google Nexus 7 in Ubuntu (Linux Mint 13) ? Sep 16 14:55:33 Jamesstp20: #android-root Sep 16 15:16:34 somebody there ? Sep 16 15:19:59 hi guys Sep 16 15:20:36 guess what, after I tried to deploy an android app with the proper data cable attached to my phone it took like 3 minutes to create and deploy and run a hello world app on my phone lol Sep 16 15:20:57 no problem though the first 3 days I spend learning to create a download for deployment was worth it Sep 16 15:21:20 it is pretty slow process indeed Sep 16 15:21:31 but for me it takes something like 30 seconds instead of 3 minutes Sep 16 15:22:16 takes me closer to 10. Sep 16 15:22:25 and I'm on a pretty weak machine Sep 16 15:22:46 I can't run the emulator Sep 16 15:22:58 ofcourse it depends if the phone is samsung s3 or zte blade Sep 16 15:23:05 on this netbook with 1gig ram Sep 16 15:23:30 well, 1gb ram isn't much Sep 16 15:23:43 netbooks won't be able to handle the emulator in any real way. Sep 16 15:23:49 not for running that emulator no Sep 16 15:24:32 I think my eclipse will take something like 600-700mb of ram few minutes after startup Sep 16 15:24:56 that is pretty cool though, click on run in eclipse and it automatically installs and runs the app on the phone Sep 16 15:24:56 yup. Sep 16 15:25:13 if only eclipse gave clear error messages. Sep 16 15:25:47 there was some option it ask me if I wanted to display some log from the phone on eclipse Sep 16 15:26:01 you probably want to. Sep 16 15:26:04 yeah Sep 16 15:26:18 yes I accepted Sep 16 15:27:38 could smb help at serealizing an big object to an file ? Sep 16 15:28:20 Mastaofich: Use "an" if the next word starts with a vowel (phonetically). Use 'a' if it doesn't. "An apple". "A file" :D Sep 16 15:28:28 I guess if a person puts an app on google play or whatever, he must learn how to provide updates Sep 16 15:29:04 caverdude:Maintain compatability, resign with same sig, build and resubmit apk Sep 16 15:29:18 (Or at least that's what the guides make it sound is required) Sep 16 15:29:28 i know english isnt my best subject :D Sep 16 15:29:49 maslen, ah Sep 16 15:29:51 Mastaofich: It's not mine either. Think of it as a simple rule that will make you sound much more intelligent. Sep 16 15:30:11 ok :D Sep 16 15:30:27 maslen : could you help me ? Sep 16 15:31:03 Probably not. I've been programming on android for about 3 days now. Sep 16 15:31:13 ok :D Sep 16 15:31:34 Hey, I'm trying to implement the suggested solution here: http://developer.android.com/training/implementing-navigation/temporal.html#back-webviews but I can't figure out where the override is supposed to go, could anyone tell me or link me to a more complete example? Sep 16 15:32:58 how can I define what happens if I press the "back" button? my app minimizes instead of going back to main view Sep 16 15:33:48 set an onclicklistener for that button Sep 16 15:34:08 fubbi: maybe you should follow the link I just posted Sep 16 15:34:45 fubbi: main_view is an view or an activity Sep 16 15:36:39 Mastaofich: What difference would it make? Sep 16 15:36:47 how can listen for back being pressed when I'm in a fragment? Sep 16 15:36:48 (excuse my ignorance; I'm here to learn) Sep 16 15:37:23 maslen: to what ? Sep 16 15:37:56 so updates are complete re-downloads? Sep 16 15:38:02 not just patches? Sep 16 15:38:27 4.0 and lower just redownloads (e.g. Dead Trigger 149mb again) Sep 16 15:38:49 hmm Sep 16 15:38:52 ok Sep 16 15:38:53 4.1 and higher they wanted to introduce "patches" Sep 16 15:38:59 cool Sep 16 15:39:18 that will be an improvement Sep 16 15:39:36 does the download site construct the patch or does the adt plugin? Sep 16 15:40:16 Pretty sure it's not just on JB Sep 16 15:40:38 It's handled by play store Sep 16 15:40:39 jb? Sep 16 15:40:46 SimonVT, ah nice Sep 16 15:40:59 Your apk is basically a zip file.. It checks which files are new/changed/removed, and makes it match the current version Sep 16 15:41:17 SimonVT: that's what I had heard also. Sep 16 15:41:38 caverdude: Android 4.1 Jellybean Sep 16 15:41:51 ah Sep 16 15:42:51 so how can I access the WebView in my fragment from it's parent activity or the back button in my activity from it's child fragment? Sep 16 15:45:46 ah okay, it was announced in the 4.1 keynotes, "smart updates" are available on google play for all android devices since 17th August Sep 16 15:48:08 but it still shows the full app size during update, it just aborts when you downloaded enough o_O Sep 16 15:48:35 darn, i dont have enough memory to run eclipse :/ Sep 16 15:49:20 looks i'll be using maven then Sep 16 15:52:04 How to deodex a Google Nexus 7 Rom ? Sep 16 15:52:46 By going to #android-root Sep 16 15:59:25 SimonVT: +1 Sep 16 16:00:32 When i am displaying two fragments, how do I know which fragment is listening for the back, button? Is it just whichever launched first? Sep 16 16:01:04 None of them are Sep 16 16:02:06 SimonVT: okay then, what is and how can I change it's behavour? Sep 16 16:02:13 Your activity is Sep 16 16:03:24 oh yeah, of course. badly worded question. I've found where the logic needs to go. Sep 16 16:06:41 d'oh I did a find and replace for ' fragment' and forgot to make it case-sensitive Sep 16 16:24:49 Ankhwatcher: i catch it in my activity, and pass it to my fragment when needed. Sep 16 16:25:17 my fragment does whatever with it, and returns a boolean value for my activity to act upon. Sep 16 16:26:07 HorizonXP: that's exactly what I worked out;-) Sep 16 16:26:43 :) Sep 16 16:26:47 works nicely Sep 16 16:27:47 HorizonXP: http://pastebin.com/2WxUWR5V Sep 16 16:32:14 HorizonXP: now I'm trying to figure out how to reload the same web page after the device is rotated. The solution I found overloads savedInstanceState, but I'm worried about it because my fragment solution is already using savedInstanceState Sep 16 16:50:25 Ankhwatcher you could use preferences as a place to hold the current page. Sep 16 16:50:25 When you restore state to a WebView, does it reload the page it was looking at? Sep 16 16:50:45 dakun: I know, but using preferences like that tends to get messy. Sep 16 16:51:21 yeah, but i also dont know enougb about the "states" myself Sep 16 16:52:06 dakun: there are lots of helpful solutions for a webview in an activity, the trick is trying to figure out how to apply them to a fragment Sep 16 16:53:37 oh maybe this will work better, I can just save the URL instead of the whole state Sep 16 16:54:12 ahh, i havent messed with fragments yet, i should catch up. my device hasnt had 4< on it long so still kinda learning what i can do and still have devices handle it woth older versions Sep 16 16:54:54 :p i thought i said thag, i may have used the wrong words x.x Sep 16 16:54:55 dakun: fragments are rolled into support package, what I'm working on is compatible from 2.2 to 4.1 Sep 16 16:56:05 yup ive heard that too Sep 16 16:56:40 yeah i did use the wrong words, i meant url, oh well lesson learned Sep 16 18:19:09 hello Sep 16 18:19:36 eclipse is stuck at uploading the .apk file, is there any known fixes for this ? Sep 16 18:19:49 it was working for awhile, but a short while Sep 16 18:20:27 I uninstalled the app, tried making a new virtual machine, I'll try again Sep 16 18:23:05 try restarting eclipse Sep 16 18:23:18 or killing the adb serrver n restarting it Sep 16 18:23:23 or rebooting Sep 16 18:23:27 >_< Sep 16 18:23:50 ok I had already tried rebooting, not sure why it ever worked now Sep 16 18:24:07 hmmm Sep 16 18:24:11 the emulator was running super slow Sep 16 18:24:23 ARM emu? Sep 16 18:24:25 see what happens if you manually do the apk Sep 16 18:24:29 working as intended :X Sep 16 18:24:51 I increased the timeout in Window->Preferences->Android->DDMS to 360000 Sep 16 18:27:58 I also love how its so hard to program lol Sep 16 18:28:22 less competition Sep 16 18:28:51 uhm Sep 16 18:28:59 i've never found Android particularly hard to program Sep 16 18:29:12 but then, i'm one of those crazy retardos who actually reads the documentation. Sep 16 18:29:24 seems that 99.99% of people do not :P Sep 16 18:29:25 read a million billion pages ? Sep 16 18:29:51 I just tried going from modifying examples from stackoverflow Sep 16 18:30:26 already did a lot of java and *NIX before but this is a bit different Sep 16 18:31:07 yes, it is Sep 16 18:31:13 but if you read the docs, it's pretty simple Sep 16 18:31:13 java is just a language., thatls only half of it Sep 16 18:31:42 in the context of android, the language is used to describe a fairly complex, but straightforward, system architecture Sep 16 18:31:44 I'm getting the basic concept but yeah theres a lot to look at Sep 16 18:32:39 modified an efficient custom listView that loads images from the internet, so far its loading all countries with their flags Sep 16 18:32:51 zinx: good basic tutorial? I'd like to fork Dan Nubelin's Send to SD into something that can serve as a SEND shim between eBay mobile and the user browser. Sep 16 18:32:57 shmooz is it threaded? Sep 16 18:33:01 and then tried to add a AutoCompleteTextView for quick search but that was not possible Sep 16 18:33:03 Baylink: http://developer.android.com/training/index.html Sep 16 18:33:33 I'll give it a look, but the official documentation rarely has good things to be said about it, for beginners, IME... Sep 16 18:33:39 Baylink: what you're wanting is a somewhat more advanced topic, but you need to know those basics too anyway Sep 16 18:33:55 Baylink: the Android stuff is actually pretty decent Sep 16 18:34:05 the documentation these days is just about better than any android book i've looked at Sep 16 18:34:08 Hmmm. Well, there has to be a first time for eveything. :-) Sep 16 18:34:12 I followed instructions on some youtube video, not sure about the threads yet lol Sep 16 18:34:26 I've found I learn best by aiming at a goal, and picking up along the way. Sep 16 18:34:48 the API docs are some of the best i've ever seen. Sep 16 18:34:49 Baylink: there's also http://developer.android.com/guide/components/index.html for a more reference-like guide that goes in to a bit more detail Sep 16 18:34:51 yes thats my way too Baylink Sep 16 18:34:57 Baylink: and of course, the API documentation itself Sep 16 18:34:57 I already know what my app should do Sep 16 18:35:36 Baylink: if you learn along the way, the more reference-like guide may be better for you Sep 16 18:35:52 Baylink: but all the documentation is pretty stellar Sep 16 18:36:05 android bootcamp series on youtbue is pretty good but it moves slow as they are recorded from live classes and some of the audience likes to ask silly questions Sep 16 18:36:20 ok it was this tutorial ... http://www.youtube.com/watch?v=uRPj6d-9g0U Sep 16 18:37:00 he shows you how to go get the efficient LazyList example from stack overflow and add onClickListener to make it react to clicks Sep 16 18:37:19 cool Sep 16 18:37:29 I did all that, and now I'm trying to implement AutoComplete manually with a EditText Sep 16 18:37:48 why manually? Sep 16 18:37:48 because AutoCompleteTextView won't work with the custom List Sep 16 18:38:18 AutoCompleteTextView needs ArrayLists and normal ListView Sep 16 18:38:21 why not? Sep 16 18:38:48 o Sep 16 18:38:59 o_O Sep 16 18:39:29 * zinx has no idea why a view would care what its parent is Sep 16 18:39:31 why not just duplicate the list in an arrayadapter... Sep 16 18:39:40 <-- winner of Amsterdam hackathon Sep 16 18:39:50 good job xorgate Sep 16 18:40:07 was it the prostitute rating app? Sep 16 18:40:36 we used nfc and cloudmessaging Sep 16 18:40:37 because its easier said than done ?? Sep 16 18:41:00 oh, not parent, the list for stuff in it... yeah, you can put it in to a form the AutoCompleteTextView will accept a lot easier than you can reimplement it properly :/ Sep 16 18:41:28 ^^ Sep 16 18:41:41 shmooz: http://developer.android.com/reference/android/widget/AutoCompleteTextView.html#setAdapter%28T%29 Sep 16 18:42:00 trying to get some clues from this example ... http://android-helper.blogspot.ca/2011/07/android-search-in-custom-listview.html Sep 16 18:42:15 yeah i can think of a few possible ways that would be like 10 lines of code give or take Sep 16 18:42:59 dependingo n what kind of adapter the listview is backed by Sep 16 18:43:21 The LazyAdapter in the example extends BaseAdapter Sep 16 18:43:49 so it uses what, list? Sep 16 18:43:51 shmooz: well, make something that extends ListAdapter Sep 16 18:43:53 its Lazy because it only loads the images when they come into view Sep 16 18:44:04 yeah, got that Sep 16 18:44:33 actually, BaseAdapter extends ListAdapter Sep 16 18:44:49 to get EditText to NOT pop up the keyboard was a lot of work Sep 16 18:44:50 wait no Sep 16 18:44:57 wrong page :P Sep 16 18:45:03 zinx: I'm gonna fork this guys code off github, and look at it, and see if i can make head or tail... Sep 16 18:45:14 and only pop up keyboard when clicked Sep 16 18:45:19 oh, no, BaseAdapter does extend ListAdapter Sep 16 18:45:24 My OOP is rather seldom, which isn't going to help much. Sep 16 18:45:42 you're right zzinx it does, indirectly Sep 16 18:45:48 shmooz: ?? Sep 16 18:46:07 yes zinx ? Sep 16 18:46:25 you have some List that backs your LazyList adapter Sep 16 18:47:02 yes for now its just two arrays, one with links to flag images online, and one with country names Sep 16 18:47:16 shmooz: nothing in http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptions controls when it pops up? Sep 16 18:47:22 all you need to do is ArrayList = new ArrayList(originalList); Sep 16 18:47:37 shmooz: hmm guess not Sep 16 18:47:51 well the LazyList constructor is weird, have to modify it Sep 16 18:48:00 then ArrayAdapter autocompleteAdapter = new ArrayAdapter(myNewArrayList, ...) Sep 16 18:48:16 then AutoCompleteText.setAdapter(autocompleteAdapte) Sep 16 18:48:40 LazyAdapter(Activity a, String[] d) Sep 16 18:48:42 three lines Sep 16 18:48:51 shmooz: i would think the IME would only pop up when it's focused in any case Sep 16 18:49:03 shmooz: in which case, the solution is simply to not focus it Sep 16 18:49:17 zinx the EditText widget pops up keyboard auto, without clicking Sep 16 18:49:23 why do you need to modify the constructor? Sep 16 18:49:24 shmooz: when it isn't focused?!?! Sep 16 18:49:28 shmooz: that has to be a bug! Sep 16 18:50:10 I have to set the defaults in xml android:focusable = "false" Sep 16 18:50:53 and then in addTextChangedListener(new TextWatcher) { Sep 16 18:51:00 shmooz: make sure you don't have in it Sep 16 18:51:07 forget the lazyList adapter for a second. we're talking about an AutoCompleteText. ignore the LazyList - an adapter has to have a data set to back it, be it a list, an array, whatever. copy that data into an ArrayList (unless it's _already_ an array or arraylist) and then construct an ArrayAdapter with that and set it as the adapter for the AutoCompleteText. 3 steps Sep 16 18:51:17 onTextChanged( ... I have make it focusable again and requestFocus() Sep 16 18:52:31 shmooz: that sounds like a pretty terrible hack Sep 16 18:53:05 AutoCompleteText needs a simple ListView, I dunno how to modify the existing custom ListView Sep 16 18:53:27 I thought it was ingenious Sep 16 18:53:46 shmooz: you should really make sure the EditText doesn't have a line in it, in the xml Sep 16 18:54:01 no it doesn't Sep 16 18:54:03 no, itt needs an adapter Sep 16 18:54:06 not a list view Sep 16 18:54:08 but it does request focus by default Sep 16 18:54:09 The list of suggestions is obtained from a data adapter and appears only after a given number of characters defined by the threshold. Sep 16 18:54:38 shmooz! Sep 16 18:54:48 Hey, I've got my webview successfully restoring it's state, but if I goBack then it crashes. canGoBack() is returning true? Sep 16 18:54:53 caverdude !!! Sep 16 18:55:00 shmooz, check pm Sep 16 18:55:05 hehe my old buddy Sep 16 18:55:10 from the #java channel Sep 16 18:56:15 schmooz a ListView and ListAdapter aren't the same, you realize that? Sep 16 18:56:27 yes sortof Sep 16 18:56:31 well Sep 16 18:56:37 a listView is a View - it's a GUI component Sep 16 18:57:33 Any idea why the forward/backward list isn't working after restore? Sep 16 18:57:51 it gets it data from an Adapter - an Adapter holds a set of data (array, ArrayList, List, sqlite cursor) - and has methods to get items according to position and return views for an item Sep 16 18:58:27 shmooz: you might check out android:windowSoftInputMode Sep 16 18:58:33 shmooz: as an option to your activity Sep 16 18:58:48 shmooz: http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft Sep 16 18:58:54 so when you look at the Nth item ni a list, the ListView says to tis adapter - give me a view to represent the Nth item - and the adapter looks into its data set, grabs the Nth item, populates a view and returns it Sep 16 18:59:26 ok thanks zinx I'll look at it Sep 16 18:59:50 the list view is a collections of views for each item (row) and the Adapter is the middle man between the lsit view and the data set it is backed by Sep 16 19:01:27 so Sep 16 19:02:30 you have a LazyList adapter - you feed it some data set (looks like a string array) and whenever the ListView connected to it says i need a view for item N - it lazily fetches the image n sends it back Sep 16 19:03:16 so pass that dataset to another adapter - an ArrayAdapter - and then use that for your AutoCompleteText. very simple Sep 16 19:04:53 ok thanks for the advice speakingcode Sep 16 19:05:04 or explanation Sep 16 19:09:42 np Sep 16 19:09:51 we're all in this together ;-) Sep 16 19:10:44 yeah I still have to do some reading to get my mind around things I guess Sep 16 19:11:08 but its great to have you guys and quick youtube examples to speed things up too Sep 16 19:14:45 when i want to pass data to an activity through an intent, do i need to create a listener in the activity? Sep 16 19:14:54 can somebody please help me? I have 10 linearlayouts all in a vertical linearlayout and they are all FILL_PARENT with weight=1 and they all fit evenly except for the bottom-most one. Why is this happening? I cannot seem to figure it out. I have no upper or lower margins or paddings set Sep 16 19:18:30 scant, no Sep 16 19:19:02 http://www.anotherandroidblog.com/2011/05/27/passing-data-with-an-intent/ Sep 16 19:20:02 well, if the Activity is already started and you're updating it (say, from a service for instance) you can use broadcast receiver Sep 16 19:23:40 what is the risk to reveal the public/private key of an apk Sep 16 19:25:52 my apk is authenticated with my account :/ Sep 16 19:26:10 yay, finally got eclipse to upload and install the app on the emu again, not sure what made it work Sep 16 19:26:32 raz86: you mean signing keys? Sep 16 19:26:58 p_l|backup yes Sep 16 19:28:04 raz86: unless a) you used shitty randomness source during key generation b) the other side got a quantum supercomputer with more than ~20 qbits, the chances are astronomically low Sep 16 19:28:20 bigger chance that someone will steal your private key by hacking into your box Sep 16 19:29:39 yes yes, I know this problem... but if he get this information with an other method (a post-it, for example ^^) what could he do? what is the motivation? Sep 16 19:30:08 jokes on them, they'll never look for my key on my desktop Sep 16 19:30:11 *joke's Sep 16 19:30:33 publish this same application with their name ? Sep 16 19:30:52 raz86: well, if I got your account, *and* the private key, I could push a modified version of your application (or a completely new one app) as update to yours Sep 16 19:32:02 ok, I see now, thx Sep 16 19:33:28 where I will place this post-it now :/ I could not publish my update if I lose it , lol Sep 16 19:41:55 can someone help me out? Sep 16 19:42:04 if anyone saw my question above Sep 16 19:42:15 better repeat it Sep 16 19:42:18 kk Sep 16 19:42:24 I have 10 linearlayouts all in a vertical linearlayout and they are all FILL_PARENT with weight=1 and they all fit evenly except for the bottom-most one. Why is this happening? I cannot seem to figure it out. I have no upper or lower margins or paddings set Sep 16 19:43:17 10 linearlayouts oO, design problem no? Sep 16 19:43:33 well that's the only way I can get a table to fit the screen Sep 16 19:43:36 imho your key does not fit into a postit, maybe you mean the passphrase to it Sep 16 19:44:11 SuD: well.. you can print QRcode of a key on a post it... ;) Sep 16 19:44:40 lol, geek Sep 16 19:45:32 i found a few pubkeys in qrcodes already, zxing failed with some of them btw Sep 16 19:46:24 If i lose my key release file, I can rebuild it with my pass phrase ?? Sep 16 19:46:49 no Sep 16 19:47:20 oO, I will send it by e-mail so :/ Sep 16 19:49:50 doomrobo: does-it work with 3-4 linearlayout? did you try with emulator and phone ? Sep 16 19:54:39 raz86, what do you mean 3-4? Sep 16 19:58:33 the number of linearlayout, if you reduce with 3 linearlayout Sep 16 19:59:26 or the problem occur only when you reach 10 ? Sep 16 20:00:54 Anyone use sl4a? Sep 16 20:01:03 (w/ lua interpreter) Sep 16 20:01:44 http://vhackandroid.wikia.com/wiki/Food! Sep 16 20:03:34 My webview goes null after I restoreState, is taht normal? Sep 16 20:04:13 raz86, so something weird is happening, I have everything in my LinearLayout (the horizontal) set to height fill_parent but it still only takes up the minimum height Sep 16 20:04:43 doomrobo what are yuo making? maybe a listview is better suited? Sep 16 20:04:57 xorgate, it's a schedule, there are 10 elements per day Sep 16 20:05:02 and one day fits on the screen Sep 16 20:05:10 so I want it to stretch to fit Sep 16 20:08:38 xorgate, what do I do? Sep 16 20:08:55 i have no idea Sep 16 20:09:18 at least I have confused people smarter than me :-P Sep 16 20:10:13 doomrobo: your problem is too specific, try to get an overview Sep 16 20:10:24 get or give? Sep 16 20:11:54 both is possible, lol, maybe you can do it with an other component? Sep 16 20:12:43 well put it this way: All I want to do is fit a few rows of text onto any android screen without having to hand-code dimensions (what I did with TableLayout) Sep 16 20:13:02 And it seems as though the android gods wish to smite me Sep 16 20:13:26 Anyone use sl4a with the lua interpreter? I'm trying to use that to make an app :3 Sep 16 20:13:37 An IRC boyt Sep 16 20:13:39 *bot Sep 16 20:13:51 wolfmitchell: geek! Sep 16 20:13:53 wolfmitchell, don't expect too much but it'll work Sep 16 20:14:09 Well, I'm trying to get it to actually run correctly... Sep 16 20:14:25 When I launch it, the script immediatly closes Sep 16 20:14:34 (before converting to a .apk) Sep 16 20:14:52 Anyone else having that problem with sl4a? Sep 16 20:14:58 wolfmitchell, I think I do Sep 16 20:15:03 figured it was just bugging out Sep 16 20:15:13 wolfmitchell, does it give an error totally unrelated to your code? Sep 16 20:15:31 Nope Sep 16 20:15:34 It just closes Sep 16 20:15:37 No output at all Sep 16 20:15:40 then nevermind Sep 16 20:15:55 Anyone know of an android screen recorder? Sep 16 20:16:56 raz86, is it really too much to ask for to make a view fit the damn screen? Sep 16 20:17:10 This certainly ain't an iPhone problem, they'd laugh at me Sep 16 20:17:58 ah Sep 16 20:18:02 Found a screen recorder Sep 16 20:18:10 I'll record a video, upload it somewhere Sep 16 20:20:08 doomrobo, no idea, I always have some problems for getting a good behavior of views Sep 16 20:20:24 I really wanna give up Sep 16 20:20:49 keep the fight doomrobo! ^^ Sep 16 20:21:33 I don't see the point of fighting with something you're trying to use to do good for others Sep 16 20:22:25 keep going! Sep 16 20:22:52 I have this code. the url download link DOES exist, and I get file not found exception. http://pastebin.com/55vd3ree please help Sep 16 20:23:51 the file on its server is there and you can try downloading it Sep 16 20:24:12 Do you have the permission? Sep 16 20:24:28 superlinux-hp this kind of code can be sandboxed in java Sep 16 20:24:53 raz86, that is the worst encouragement I've heard all year Sep 16 20:25:01 not even a reason?! :-( Sep 16 20:25:22 SimonVT, which ones of the permissions? Sep 16 20:25:29 internet permission Sep 16 20:25:37 the internet perm does exist Sep 16 20:25:50 Huh Sep 16 20:25:51 No idea then Sep 16 20:25:52 superlinux-hp: probably "nat" or "params" got a wrong value Sep 16 20:26:26 unless you already tested with the fixed url Sep 16 20:26:28 no Sep 16 20:26:37 i logged them out Sep 16 20:26:40 Just found out ddms had a screen recorder Sep 16 20:26:57 i did test it with the fixed url Sep 16 20:27:23 i'll try again with the fixed one Sep 16 20:27:46 i logged them out as i mean they url is correct Sep 16 20:28:01 i logged them out as i mean the url is correct Sep 16 20:29:03 InputStream objects... is java you can try it separately with a java project in order to see if it is a problem on android or not Sep 16 20:29:31 mm ok Sep 16 20:32:34 I've posted my conundrum to Stack Overflow: http://j.mp/Rf0MBJ Sep 16 20:36:51 Sounds like an issue with how you handle fragments tbh Sep 16 20:39:47 SimonVT: you mean when I rotate the tablet it creates a second fragment and pushes the button call out to that? Sep 16 20:39:58 Yeah, now that you say it that does sound likely Sep 16 20:40:12 if I want to save my keyrelease before a PC crash, I have to save my keyrelease file AND my keystore? Sep 16 20:40:13 Probably something like that Sep 16 20:40:20 but how do I stop that from happening? Sep 16 20:40:35 Don't create a second fragment or whatever is happening Sep 16 20:40:54 There are methods for getting the old fragment in the fragmentmanager Sep 16 20:42:27 could I save the fragment ID in a bundle and use findFragmentById to get it back again? Sep 16 20:44:50 fragment ids/tags are usually pretty constant Sep 16 20:45:02 I'll give that a go then, thanks Sep 16 20:48:27 Yep, that worked! Thanks SimonVT Sep 16 20:49:57 Anyone know of a screen recorder app? Sep 16 20:54:11 if you search for 'screen recorder' on play.google.com a couple show up at the top of the list... Sep 16 20:54:49 I guess another option is to run the app inside an emulator on a desktop machine and record using desktop recording software? Sep 16 21:03:06 I think I got my script to work :3 Sep 16 21:03:52 Just gotta restart the device for every script change :/ Sep 16 21:04:44 ...and the script is doing that again Sep 16 21:05:12 I posted the solution to StackOverflow. http://j.mp/Rf0MBJ Sep 16 21:05:48 marsilainen_work: My device != has google play Sep 16 21:09:14 I am using "aDosBox" to run a Dos program on my Android phone. An essential command needing to progress through the engineering program is the use of the F2 button. I have tried using the hackers keyboard, but Dos, or the emulator, is not recognizing the F2 button...rendering the Dos program useless. Any thoughts on different keyboards or how to fix this problem? Sep 16 21:10:04 jambalyasecond: Afaik there are F* keys in the Terminal IDE keyboard Sep 16 21:12:47 wolfmitchell: So, I can use the Terminal IDE keyboard as an emulator for Dos programs? Sep 16 21:13:21 or is it a keyboard I use with my current emulator? Sep 16 21:13:51 jambalyasecond: it's a keyboard you use with your current emulator Sep 16 21:13:52 jambalyasecond: It's a keyboard you use with your current program Sep 16 21:14:12 thank you....i'll give it a shot right now Sep 16 21:17:01 i've got a dialogfragment, that acts as a progress indicator, in this dialog there is a function using getActivity.runOnUIThread to update some textviews, when my background thread is working the dialog is shown, it has a reference to the dialog and calls the update function. The DialogFragment crashes because getActivity returns null Sep 16 21:18:03 why is that =| Sep 16 21:18:28 The dialogfragment is shown on screen, shouldn't getActivity return the FragmentActivity hosting it ? Sep 16 21:23:22 Yep, it should Sep 16 21:23:27 And it does Sep 16 21:23:59 not for me Sep 16 21:24:15 Then you're doing it wrong Sep 16 21:24:29 i thought so too, but everything looks good :D Sep 16 21:25:20 isResumed() returns false, shouldnt that return true? Sep 16 21:25:34 during runtime of the dialogfragment Sep 16 21:25:58 yep Sep 16 21:27:02 i added Thread sleep 2000 Sep 16 21:27:10 now it works, how can there be a race condition Sep 16 21:27:26 The DialogFragment gets shown in the preExecute of an async task Sep 16 21:27:45 the background thread obviously starts in the background part of the asynctask Sep 16 21:28:20 Fragment transactions happen asynchronously Sep 16 21:28:30 Unless you call FragmentManager.executePendingTransactions Sep 16 21:28:35 ah.... Sep 16 21:29:01 that explains it :|, would FragmentManager.executePendingTransactions be dirty ? Sep 16 21:29:05 is there a cleaner solution? Sep 16 21:29:53 could make a helper function that calls this on the fragment manager directly after calling show(...) Sep 16 21:31:26 how do I set a TextView to be right aligned and vertically centered? Sep 16 21:31:30 in XML, that is Sep 16 21:31:31 SimonVT, thanks :) saved me a major headache ^^ Sep 16 21:31:49 doomrobo, the textview itself, or its content Sep 16 21:32:18 dark3n, I'll try both Sep 16 21:32:26 but gimme the content first Sep 16 21:33:03 check layout_gravity, gravity Sep 16 21:33:10 I did Sep 16 21:33:44 and? Sep 16 21:33:58 got it Sep 16 21:34:03 right|center_vertical Sep 16 21:34:14 for gravity, that is Sep 16 21:42:16 also, fit_parent seems to be taking the entirety of the width even though there is a textview to the right of it Sep 16 21:42:27 should that happen? When I use weights it ruins everything Sep 16 21:42:39 how does one write data with android? java.io? Sep 16 21:43:01 jdbc? Sep 16 21:45:24 caverdude : I guess you normally use the sqlite database Sep 16 21:45:34 this is the weirdest damn thing. When I change android:width it can no longer stretch to fit the screen *vertically*...***VERTICALLY*** Sep 16 21:45:50 shmooz, hmm with jdbc? Sep 16 21:45:53 d.android.com has some great tutorials on interfacing with the sqlite db Sep 16 21:46:11 ok so its a google api and not jdbc then? Sep 16 21:46:22 thats the default way they recommend we store data I suppose Sep 16 21:46:43 that just leaves me wondering how much of the standard java aip I can use Sep 16 21:46:52 java.lang I guess :) Sep 16 21:46:58 not much Sep 16 21:47:23 it depends what you're storing, there's shared preferences as well as normal text/bin files Sep 16 21:47:46 ok Sep 16 21:50:40 ok, I'm done here Sep 16 21:54:13 well it looks like there is normal file io in the level 10 api Sep 16 22:02:26 ok how about gps? is that in android api? Sep 16 22:02:47 you been to d.android.com ? Sep 16 22:02:53 caverdude: Location services are included in android API, including raw NMEA iirc Sep 16 22:03:06 Location services might give you data not only from GPS, mind you Sep 16 22:03:12 hmm ok Sep 16 22:04:59 zinx: wolfmitchell: my emulator is not recognizing the function keys of the terminal IDE keyboard either. One solution is using a bluetooth keyboard, but when I need this program I am far from civilization Sep 16 22:05:26 I was thinking of writing an app that would record points on a white screen say every 500 feet of traveled distance for up to 20 miles or more Sep 16 22:05:57 jambalyasecond: Then Idk Sep 16 22:06:10 unfortunately android only does metric, so you'll have to do metres and kms ;) lol Sep 16 22:06:12 http://bluestacks.com Sep 16 22:06:17 Android emulator Sep 16 22:06:23 I can convert Sep 16 22:06:33 but ya I know what your saying Sep 16 22:10:25 wolfmitchell: thanks, but looks backwards...i am trying to run a windows (Dos) program in the android host Sep 16 22:10:57 o-o Sep 16 22:11:00 Idk. Sep 16 22:11:40 i wish i was a little bit smarter Sep 16 22:13:01 hi *, do you think it makes a "decent" difference in terms of performance to play with 8 bits of an int object instead of playing with 8 int object? if 8 is not enough take hundred or more. In C i could answer but in java i cannot ;( Sep 16 22:13:52 adq: for what? Sep 16 22:13:52 really hate when i go to run my project and eclipse tells me i have errors, but only red x is on top level of project.. Sep 16 22:14:14 adq: if bitfields? look into something called "boolean" Sep 16 22:14:38 p_l|backup, i'm abusing of number of objects (lot of static int[] per example), i'm trying to find a convinient way to improve perf, without rebalancing on right the cost on left Sep 16 22:15:34 i need lot of pseudo-boolean states (0/1 true/false whatever) to differentiate binary states Sep 16 22:15:51 adq: I'd go with array of bools Sep 16 22:16:00 or even separate bools Sep 16 22:16:16 thx i note! Sep 16 22:16:31 (depends whether you conceptually need 1-bit matrix or you're packing different kind of state variables) Sep 16 22:17:37 oh man I'm so happy to find the htcdriver.exe for my phone which enabled me to now push my apps from eclipse to my myTouch4G clone, no more waiting for the emulator :) Sep 16 22:18:09 shmooz, congratz Sep 16 22:18:25 thanks caverdude Sep 16 22:18:42 I just hope I don't brick the phone because of some silly java bug lol Sep 16 22:18:51 na you will not :-) Sep 16 22:19:20 shmooz: well, as long as you don't mess with root it shouldn't happen except for bugs in low-level stuff in OS Sep 16 22:19:26 the emulator kept timing out was unbearably slow, the phone is nice and fast Sep 16 22:19:42 (like several kernels for SGS2 that apparently could raze the internal flash due to bug) Sep 16 22:19:54 I haven't even rooted this phone Sep 16 22:19:57 shmooz, be prepare, you will face soon another problem: adb disconnection, bug whatever (especially in eclipse) Sep 16 22:20:10 can happen many times per hour. Sep 16 22:20:14 hopefully I won't have to do NDK development Sep 16 22:20:38 * shmooz knocks on wood and pulls his earlobe Sep 16 22:21:19 NDK is... fun. Not as fun as OS developement, but sometimes even more annoying Sep 16 22:21:55 i'm dealing with zillion of objects because i wanted to avoid NDK.. :p Sep 16 22:22:21 I do want to stream videos in my app but I think I just call the flash or vitamio player with the stream link in java, and won't need to do NDK for that I hope Sep 16 22:22:30 adq: primitives aren't actually objects in java, iirc Sep 16 22:22:42 true! Sep 16 22:22:49 was matter of speaking :p Sep 16 22:22:51 shmooz: use mediaplayer from framework Sep 16 22:23:15 oh, ok I'll look into that p_l|backup Sep 16 22:23:30 shmooz, i played with vitamio, their api works. Sep 16 22:23:40 can anyone recommend a Dos emulator for Android? Sep 16 22:23:55 just be sure to always redirect your user to the correct library based on the cpu detection & other info Sep 16 22:24:04 yeah well I want to make an app like TV-Go which uses flash and vitamio, and then I'll expand on it Sep 16 22:24:21 vitamio has some big limitation too Sep 16 22:24:22 jambalyasecond: I think there was a port of DosBox Sep 16 22:24:34 shmooz, check vlc project also Sep 16 22:24:39 they're making great works Sep 16 22:24:58 ok adq, thanks for the recommendations Sep 16 22:25:33 wow I'm excited, the sky is the limit now Sep 16 22:26:00 lol Sep 16 22:32:05 i upload a file from sdcard with ftp using ftp4j (http://www.sauronsoftware.it/projects/ftp4j/manual.php#4) Sep 16 22:32:32 what if i want to ftp some string built with stringbuilder? Sep 16 22:32:46 does the library want a stream? Sep 16 22:32:48 does the file first have to exist on disk to send it? or can i create a file in memory and send that? Sep 16 22:32:53 it wasnt s a file p_l|backup Sep 16 22:33:07 client.upload(new java.io.File("localFile.ext"), new MyTransferListener()); Sep 16 22:33:12 you can pass anything as base64 Sep 16 22:33:19 check if there's somewhere code that accepts streams Sep 16 22:33:33 or just create a temporary file and use that Sep 16 22:33:55 i dont want to reply on a temporary file, what if they dont have an sdcard plugged in? Sep 16 22:35:24 adq: but the constructor takes a file? Sep 16 22:35:30 how can i pass base64, i confused Sep 16 22:35:55 just a base64 encoded string? Sep 16 22:36:16 no, you need to respect the type of the input parameters of your function Sep 16 22:37:12 i don't know what it takes as input, but if the file on sdcard does not exit, you have to use a temporary buffer or something if you plan to still send something despite no file on sdcard Sep 16 22:37:34 at least you have to send you have nothing to send :p Sep 16 22:37:34 adq: he has a function that asks for filepath Sep 16 22:38:21 i thought i could crate a new file() and hold it in RAM, then pass that...but the File class takes a local path in its constructor :s Sep 16 22:38:22 according to the doc: The actual file referenced by a File may or may not exist. It may also, despite the name File, be a directory or other non-regular file. Sep 16 22:39:40 brx_, imagine what you describe is possible, what would be the length/size? if unknown would it be allocated dynamically with nothing? Sep 16 22:41:59 File.createTempFileFromByteArray() would be nice Sep 16 22:43:28 write1 Sep 16 22:58:15 Application.doEverythingIWantMyAppToDo() Sep 16 23:01:07 :) Sep 16 23:01:12 was a joke btw Sep 16 23:13:57 wolfmitchell: i figured out the problem with the function keys. Using the hackers keyboard, I just had to map the appropriate function key (F2) to a button on the hackers keyboard...thanks Sep 16 23:14:10 Oh Sep 16 23:16:29 Is this a reasonable place to ask for icon-suggestions? I need something to represent order-status (order recieved, in mfg, in quality, packed, shipped). Sep 16 23:17:19 empty box, being filled, ... Sep 16 23:18:47 we need something pre-made, we have a graphics guy but he can't really do icons. I don't mind paying for a set (free would be better -- less paperwork), but having something commissioned would definately be out of the question Sep 16 23:34:45 does anyone know how to write a good hash function for a 2d int array where the elements are unique and range b/t 0 and the array size? Sep 16 23:35:53 probably the wrong place to ask :-/ Sep 17 00:39:07 Hey guys, I have a sgsIII and can't take the JB wait any longer and I don't want to root, is there any harm in installing one of the beta updates from sammobile Sep 17 00:39:44 zfly9: I did that with my GNex and it's worked wonderfully. But it did wipe all my data. Sep 17 00:40:25 What's a good tutorial on Android development if you're already (very) familiar with java? Sep 17 00:40:48 Ok, and I don't need to root right? Am I able to install build after build? Seems like there is a better one every two days Sep 17 00:42:00 zfly9: you don't need to root, but you do need to unlock the boot-loader. Sep 17 00:42:16 zfly9: and I expect you'll lose all your music and photos on each update Sep 17 00:42:19 Logi: the docs are good...and usually if you know what you want to do, a quick google search suffices Sep 17 00:43:38 sampullman: I guess that's true, but I want to become familiar with the architecture and concept of the environment... Google's docs are good for that? Sep 17 00:47:02 Logi: pretty good. for starters, this is important to know: http://developer.android.com/reference/android/app/Activity.html Sep 17 00:52:42 allrighty Sep 17 01:30:45 http://code.google.com/p/androidscreencast/ Sep 17 01:31:03 May be useful for those who want to record stuff thats on their android Sep 17 01:34:36 i need stuff like setx,sety, but i'm not on honeycomb, so it's not available. any workaround to position a view some exact number of pixels from origin on old android targets? Sep 17 01:35:19 hello everyone... I'm trying to do an autocompletetextview with the hits being popluated from an sqlite db. what would cause the first 5 records to display while anything over the first 5 causes the app to FC? Sep 17 01:36:12 hmm, nm, i think i can abuse an absolutelayout for this Sep 17 01:40:20 sounds like an awful idea Sep 17 01:40:45 JakeWharton: any better ones? Sep 17 01:41:33 why can't you use traditional layouts which use responsive layout strategies that scale to all devices automatically? Sep 17 01:41:54 because i have to position buttons in an absolute position on a backing graphic/canvas Sep 17 01:43:50 using relative layout to have the canvas in the background, and a view in front with all my buttons and such. that works. now it's a matter of getting the buttons into the right spots, relative to the backing canvas Sep 17 01:47:04 Anyone know why my button slides 'behind' its neighbor (disappears as the animation progresses) when I translate in the x direction? Sep 17 01:47:29 y translation works fine Sep 17 01:50:11 anyone every tried generating a pressed state shadow with code/xml Sep 17 01:50:12 JakeWharton: actually, maybe your nineoldandroids lib will get me out of this trap. thanks! Sep 17 01:50:35 ie not using another asset Sep 17 01:50:36 muhoo: on pre-HC using it to position buttons will not move the click region Sep 17 01:50:50 that's a fundamental limitation of the View stack Sep 17 01:52:17 was that for my question jake? Sep 17 01:54:36 no Sep 17 02:37:10 iguay Sep 17 02:39:03 JakeWharton, happen to see my ListView stuff? Sep 17 02:39:19 When working with an object (such as one that holds an ArrayList of items), how do I make sure this object is saved when the activity goes into a pause state and then resumes? Sep 17 02:39:55 use onSaveInstanceState() Sep 17 02:40:07 override and stuff your array list into the provided bundle Sep 17 02:40:22 then pull it back out in onCreate(Bundle savedInstanceState) Sep 17 02:40:39 and that's for stop/start not pause/resume Sep 17 02:40:58 current Android versions will not kill your app in the paused state. Sep 17 02:42:09 JakeWharton, SherlockListView that is ;-) Sep 17 02:42:45 mrenouf: I thought about that, but wasn't sure if I could do that without the object being parcelable. I used to have it parcelable, but did not like that if one thing changed I had to modify how it created the object. Sep 17 02:43:15 From someones advice, I created it as simply an object that existed in an above global class that extended application Sep 17 02:43:55 mrenouf: or are you mainly suggesting, pull the values out of the object, bundle them, then restore them to the object on onResume Sep 17 02:43:56 epsilonorion, no no, don't do that Sep 17 02:44:08 whichever makes sense Sep 17 02:44:47 were you saying no to the using it through the global class? Sep 17 02:45:02 epsilonorion, yes, don't use a static field in a class to do this Sep 17 02:45:13 its the #1 Android anti-pattern Sep 17 02:45:46 I have not made it static Sep 17 02:46:12 what's an "above global class" then? Sep 17 02:48:07 I have a class that extends application (which is not static). It has a copy of the object in question which is first created in the MainActivity. Two other classes/fragments use the object. Sep 17 02:48:09 ... Sep 17 02:48:24 that's essentially the same thing Sep 17 02:48:39 I used to have this object parcelable and passed it to each fragment using bundles, but this had its own issues and someone suggested the current method i am using Sep 17 02:48:44 please just trust me on this, I know what I'm talking about Sep 17 02:49:06 mrenouf: I am not distrusting you, but getting various different suggestions. Sep 17 02:49:09 the problem is you have now lost touch with the lifecycle of that field Sep 17 02:49:21 agreed, which is what I face now Sep 17 02:50:10 if it's a simple structure that's not very large, you may be able to get away with Serializable, which is better than a global field Sep 17 02:50:26 however, the parcelable method does not seem like the best option, given that each item has to be parsed in a specific order to be correct. And if you add a single extra item having to go through multiple places to fix it Sep 17 02:50:42 you could serialize it with gson Sep 17 02:50:58 epsilonorion, there should never any code which touches the fields other than the class itself Sep 17 02:51:04 It will be a waypoint list of waypoints. Waypoint has multiple fields, and the waypoint list itself is large Sep 17 02:51:34 another option is the keep them on disk, access them through a cursor Sep 17 02:51:39 from a table Sep 17 02:51:49 you can pass cursors around Sep 17 02:51:52 they're parcelable Sep 17 02:52:03 waypoints can be created/generated by a user touching on a mapview Sep 17 02:53:17 I've used Parcelable, json, protobufs (passed as a byte array), and Cursors Sep 17 02:53:43 the point is, by passing it through as an intent, even if your app is killed in the background, that data is automatically saved for you Sep 17 02:54:11 if you dont change it within an activity, you dont even need to do onSaveInstanceState if the data provided from the Intent is good enough Sep 17 02:54:42 mrenouf: I do understand that, which is why I liked it in the first place. Sep 17 02:54:54 I just did not like the requirement for order in the parsing process Sep 17 02:55:56 epsilonorion, you have at most two places where code must match. createFromParcel() and writeToParcel() Sep 17 02:56:33 true Sep 17 02:56:41 make your Waypoint class Parcelable, then the container class Sep 17 02:57:51 mrenouf: So is that the best way to do it. Create a parcelable object, place it in a bundle which is passed to the fragments, and let them modify as needed. When onpause happens, nothing needs to be done as they will be saved anyways Sep 17 02:57:56 I wish ADT had a "makeParcelable" source action. Very similar to create setters/getters Sep 17 02:58:15 I definitely agree there Sep 17 02:58:18 epsilonorion, no, the data from the Intent is immutable Sep 17 02:58:48 so once you want to modify it, then you just need to stuff it into the Bundle in onSaveInstanceState Sep 17 02:59:09 in onCreate, you check savedInstanceState first, and use it from there if it exists, otherwise use the value from the Intent Sep 17 02:59:16 Got it Sep 17 02:59:44 Easy enough. Thankfully, I will just go to git and grab my old code and pull out the old way I did it then Sep 17 02:59:53 if you have a dozen fields or more, JSON is a better path, Gson as ron suggested would be a good choice. **** ENDING LOGGING AT Mon Sep 17 02:59:59 2012