**** BEGIN LOGGING AT Thu Jan 03 02:59:59 2013 Jan 03 03:03:00 looking for a sample simular to this for android 3.0+/4.0+ dont know what has been changed so much :( Jan 03 03:03:05 doesnt work at all Jan 03 03:10:42 Does this control scheme make sense for a 2D action/platformer game? http://i45.tinypic.com/34zy2ok.png Jan 03 03:14:10 not to me Jan 03 03:14:24 due to size variants Jan 03 03:14:28 hrm.. I'm trying to avoid virtual controllers :-/ Jan 03 03:14:43 10 inch tablet, 4 inch phone etc Jan 03 03:14:49 phone maybe ok Jan 03 03:14:49 exactly.. Jan 03 03:14:59 but from a tablet pov Jan 03 03:15:02 so I may need to do a size check and do a different scheme from a tablet Jan 03 03:15:04 no, would be horrid Jan 03 03:15:27 essial: id say use buttons on the right for jump and attack Jan 03 03:15:29 like gamepad on sides Jan 03 03:15:48 keep movement and actions far away from each other Jan 03 03:16:18 well the problem is there is no tactile feedback on virtual buttons -_- Jan 03 03:16:32 so when I tried doing it that way I kept 'loosing' my buttons Jan 03 03:16:58 plus this game really needs 3 buttons aside from direction... Jan 03 03:18:19 http://www.youtube.com/watch?v=98dufphHdTU don't turn the volume up because it's really quiet at the start, but that's how it works currently Jan 03 03:21:40 so at least you can see what I was ATTEMPTING to do anyway -_- Jan 03 03:22:38 ah i see, the controls overlay the entire screen Jan 03 03:22:41 yes Jan 03 03:23:02 bad example as i had a giant iMac in front of me, but it makes sense in my head :p Jan 03 03:23:27 that might work, never seen it done before... Jan 03 03:23:33 :D Jan 03 03:23:46 as i said, dont like the controls for many reasons Jan 03 03:23:57 dunno about the action button being in the middle of the screen, since you'd be covering half your view Jan 03 03:24:12 well it's only for transitioning, dialog, stuff like that Jan 03 03:24:20 you won't be moving when you hit the action button usually Jan 03 03:24:28 enter/talk/store/etc Jan 03 03:24:39 hm im not sure what i'm doing but my app is getting killed without any interface message Jan 03 03:24:53 but i guess i'll keep experimenting Jan 03 03:25:42 k StingRay I've simplified it down to no support lib, no nesting of fragments. just a listfragment, still not showing stuff though. is it right to make the adapter in onviewcreated? Jan 03 03:26:49 trogdor_the_burn i do Jan 03 03:27:05 bleh. this makes no sense Jan 03 03:27:08 t.t PackageManager.DONT_KILL_APP Jan 03 03:27:15 well if you ment onCreateView Jan 03 03:27:20 i do Jan 03 03:28:30 trogdor_the_burn pastebin your fragment Jan 03 03:28:39 now that it's small and simplified Jan 03 03:28:58 also your activity fragment init stuff Jan 03 03:29:44 http://pastebin.com/zrXZ5T0A Jan 03 03:29:58 its a frankenstein of comments since it used to be hte fragment that nested the list Jan 03 03:30:03 but now its hte list itself Jan 03 03:30:47 and the activity: http://pastebin.com/jF2mHTwZ Jan 03 03:31:00 wait i got it! Jan 03 03:31:17 brush finger up to jump, touch left or right side to walk, slide it a bit to run Jan 03 03:31:33 attack is brush down Jan 03 03:31:35 essial: i like that Jan 03 03:31:43 action is press hol Jan 03 03:31:44 *hold Jan 03 03:31:46 dunno about gesture to attack though Jan 03 03:31:47 yeah Jan 03 03:31:52 or 'tap' Jan 03 03:31:55 tap can be ttack Jan 03 03:32:04 and it will attack relative to finger Jan 03 03:32:12 so tap to left of character turns character left to attack Jan 03 03:32:36 and when jumping, use finger drag for air control Jan 03 03:32:45 looking for a sample simular to this for android 3.0+/4.0+ dont know what has been changed so much :( http://code.google.com/p/krvarma-android-samples/source/browse/trunk/PhoneStateSample/src/com/varma/samples/phonestatesample/PhoneStateSample.java Jan 03 03:32:48 suggestions? comments? Jan 03 03:33:01 i think keep the controls simple Jan 03 03:33:08 tap left or right for movement Jan 03 03:33:24 maybe just buttons on left and right for attack in either direction? Jan 03 03:33:27 well it's a platformed so i have to have walk/run for control Jan 03 03:33:31 trogdor_the_burn why when init you using replace ? Jan 03 03:33:32 *platformer Jan 03 03:33:35 and the normal left/right movement for air control Jan 03 03:33:54 trogdor_the_burn and I would try moving adapter list view to onCreateView Jan 03 03:34:03 before it returns it to act Jan 03 03:34:07 stingray_, because screen rotation triggers oncreate, so add messes up Jan 03 03:34:13 maybe double tap (tap/press) for run Jan 03 03:34:16 replace seems to be a worthy subsitute Jan 03 03:34:18 and just press for run Jan 03 03:34:21 er walk Jan 03 03:34:21 not if you setRetainInstance Jan 03 03:34:30 and if you do ==null check Jan 03 03:34:31 true Jan 03 03:34:31 ill try that Jan 03 03:34:50 you can tag a fragment Jan 03 03:34:56 and find it later Jan 03 03:35:03 tap for attack, press for walk, tap/press for run.. then action is simply hold press Jan 03 03:35:49 or maybe press, then drag as if the dpad magically gets created centered on your press location Jan 03 03:36:31 no dice, still got me an emtpy list Jan 03 03:36:57 there actually data there ? Jan 03 03:37:05 in the adapter ? Jan 03 03:37:12 yeah, its using that vehicles list i chucked in Jan 03 03:37:23 im going to try changing the adapter anyway Jan 03 03:37:37 oh hang on Jan 03 03:37:41 your using listFragment Jan 03 03:37:45 yeah Jan 03 03:37:49 I didnt Jan 03 03:37:52 not sure why Jan 03 03:37:56 maybe I had probs Jan 03 03:38:05 yeah, i've done it without too, still was a problem Jan 03 03:38:34 is there like a simple throwaway adapter you can make in a line? Jan 03 03:39:04 where do you attach adapter to list ? Jan 03 03:39:14 ListAdapter = new VehicleListAdapter() { Jan 03 03:39:17 sets it to the fragment Jan 03 03:39:22 thats how listfragment works supposedly Jan 03 03:39:26 it manages the listview Jan 03 03:39:34 that sux Jan 03 03:39:36 :) Jan 03 03:39:38 lol Jan 03 03:39:56 there is no setAdapter? Jan 03 03:40:53 its c#, so ListAdapter = is the equivalent to SetListAdapter() Jan 03 03:41:41 out of interest Jan 03 03:41:54 setEmptyText("this list is empty"); after init Jan 03 03:42:05 i am listening to CONNECTIVITY_CHANGE broadcast to start a download, when network becomes available. Thing is that i get 2 broadcasts claiming network just became available right after eachother, but i don't want to start the download twice. In the first one I even turn off the broadcastreceiver. what's going on? Jan 03 03:42:21 ListFragment is crappy Jan 03 03:42:30 just use normal Fragment and manage the listview yourself Jan 03 03:43:07 from docs Jan 03 03:43:07 You must use ListFragment.setListAdapter() to associate the list with an adapter. Do not directly call ListView.setAdapter() or else important initialization will be skipped. Jan 03 03:43:49 hey my data showed Jan 03 03:43:51 i dont know why Jan 03 03:44:09 what did you change ? Jan 03 03:44:17 set empty text lol Jan 03 03:44:32 yeah wtf. it suddenly renders after setemptytext() Jan 03 03:44:48 read my prev msg Jan 03 03:44:51 from the docs Jan 03 03:45:06 yeah that one i am doing Jan 03 03:45:07 setempttxt could force init Jan 03 03:45:10 thats the ListAdapter = Jan 03 03:45:19 hmmm Jan 03 03:45:31 i am confused Jan 03 03:45:58 now to try nesting it again, i guess Jan 03 03:46:46 no idea why this is working Jan 03 03:47:13 space magic is always reliable Jan 03 03:47:44 lol Jan 03 03:48:38 ok simple question Jan 03 03:48:39 t0mless, whats wrong with listfragment? it seems to be just as buggy as a fragment with listview to me :D Jan 03 03:48:50 disagree Jan 03 03:48:52 if I extend a view like a button and want to inflate a layout Jan 03 03:48:58 not if you know how to properly manage a listview Jan 03 03:49:05 how do I draw that in onDraw ? Jan 03 03:49:38 my main issue is that the support version of listfragment doesn't let you define the list in XML Jan 03 03:49:45 or at least it didn't, they may have fixed that Jan 03 03:49:53 ah, havent tried that Jan 03 03:50:06 so it is always a full screen list with no id Jan 03 03:50:15 what happens if you just override oncreateview the normal way? Jan 03 03:50:39 k still doesnt draw when its nested Jan 03 03:50:48 nested list views? Jan 03 03:50:55 * t0mless shudders Jan 03 03:51:08 StingRay_ : why would you worry about manually drawing? Jan 03 03:51:25 reading docs Jan 03 03:51:33 t0mless, no nested fragment Jan 03 03:51:33 onDraw on extending does nothing Jan 03 03:51:44 and if the source is a layout resource Jan 03 03:51:49 you can't nest fragments Jan 03 03:51:53 not sure how it would work Jan 03 03:51:59 t0mless, you totally can Jan 03 03:52:09 t0mless i thought that Jan 03 03:52:14 and it was true for me Jan 03 03:52:14 the layout determines the controls that get created and positioned for you Jan 03 03:52:18 thats why google blessed us with the 4.2 sdk and updated compat library Jan 03 03:52:19 till i updated the sdk Jan 03 03:52:20 you don't have to manually draw that stuff Jan 03 03:52:31 I haven't read anything about 4.2 yet Jan 03 03:52:57 but the whole point of fragments is supposed to be little comparmentalized parts Jan 03 03:53:04 so why would you need to nest them? Jan 03 03:53:17 yeah, but sometimes you need compartmentalized parts in compartmentalized parts Jan 03 03:53:27 so make a custom view control? Jan 03 03:53:35 like the app im working on, uses a side menu Jan 03 03:53:41 for navigation Jan 03 03:53:46 so the main area is a fragment Jan 03 03:53:51 which is switched out Jan 03 03:54:05 then i want it to be tablet friendly Jan 03 03:54:11 so some of those screens nest fragments Jan 03 03:54:16 Pfhoenix i'm confused, seem to be too many examples that all do diff things Jan 03 03:54:49 looked at 5 that all just use onDraw to do things, none using inflated resource Jan 03 03:55:14 if you're drawing your own view you're not going to be inflating a resource Jan 03 03:55:24 the view might be created BY an inflater Jan 03 03:55:56 StingRay_ : I'm guessing because they wanted to draw some custom stuff Jan 03 03:56:11 using a layout isn't the same as drawing an extra line in an EditText Jan 03 03:56:38 so in extending a view i would just need this.inflate(context,myres,null); Jan 03 03:56:53 ... Jan 03 03:56:55 No... Jan 03 03:57:10 then I'm a bit lost, my 1st time extending a view Jan 03 03:57:23 if you were extending a layout you might need to inflate it Jan 03 03:57:47 well the idea is my min sdk falls short of using a nice switch Jan 03 03:57:55 and I want animated switches Jan 03 03:58:20 so I just though of attempting to use a layout with all the components in it that I would need Jan 03 03:58:28 i think there's a library on http://www.androidviews.net/ that might help there Jan 03 03:58:29 as a customView Jan 03 03:58:37 but its rendering garbage for me right now Jan 03 03:58:52 is that site not useless anymore? Jan 03 03:58:59 * t0mless hasn't been around anything android for months Jan 03 03:59:28 t0mless, eh? you're in an odd channel then? Jan 03 04:00:00 I used to be around here often Jan 03 04:00:15 but then I moved and changed jobs and got busy Jan 03 04:00:23 ah Jan 03 04:00:27 nah androidviews is heaps good Jan 03 04:00:34 didnt even knwo it existed a few weeks ago Jan 03 04:00:55 last time I had looked at it, it was empty and useless... at least if it's the same thing I'm thinking of Jan 03 04:01:08 any other examples/resource Jan 03 04:01:09 probably not then Jan 03 04:01:13 theres like 50 things there Jan 03 04:01:16 stack overflow dont really have anything Jan 03 04:01:18 when the site's working, at least Jan 03 04:01:32 50 is not that many... Jan 03 04:01:44 especially when most of them are simple stupid things Jan 03 04:01:49 is what I remember of that site Jan 03 04:03:28 nah, i think most save quite a bit of time if you need what's there Jan 03 04:03:43 and things like the pinchable image viewer should be part of the sdk anyway Jan 03 04:07:55 yay SetEmptyText in the nested fragment works with some rejiggering Jan 03 04:10:10 i really would like to know why Jan 03 04:11:35 hi i have a service running i wanted to make a connection before the wifi disconnects eg walking out the door. im getting a unreachable exception on wifimanager.getwifistate()==wifimanager.wifidisabling Jan 03 04:13:15 Could someone point me in the direction of a good tutorial on how to make a "days left" (count down) widget? Jan 03 04:17:06 w/ all that facny gcd stuf fi cant understand why i keep seeing spinning beach balls Jan 03 04:26:59 ""Google+ is Google," uh ohs, so if i dont want to use G+ i better move away then Jan 03 04:27:15 I'm having trouble getting an ImageView to display. I have a really simple layout, but while the TextView shows up, the ImageView does not. Any idea what I am doing wrong? My XML is http://pastebin.com/UyKnbDT5 Jan 03 04:27:30 g00s: seeya Jan 03 04:27:47 The image is quite large (1920x1200 PNG), maybe that has something to do with it? Jan 03 04:28:03 Leeds: do you use G+ ? Jan 03 04:28:04 mdkess: anything in your log about memory? Jan 03 04:28:08 g00s: a bit, yes Jan 03 04:28:29 i would be OK if they dont force it on me Jan 03 04:29:08 but it seems like, they want to make it the entry point to everything, and integrated to everything Jan 03 04:29:31 http://online.wsj.com/article/SB10001424127887324731304578193781852024980.html Jan 03 04:29:48 how related are Chromium and Android's Chrome? Jan 03 04:29:57 Ah hah: "Bitmap too large to be uploaded into a texture (2556x1598, max=2048x2048)" Jan 03 04:30:04 Although the image is definitely 1920x1200. Jan 03 04:30:16 I would be interested in contributing to Chrome/Chromium for Android Jan 03 04:30:39 RustyShackleford: same tree, AFAIK, but Android/Chrome is entirely closed Jan 03 04:30:54 I couldn't tell if a google play review I was writing was going to show up on my g+ thing or not Jan 03 04:31:00 it worded it like it was going to Jan 03 04:31:17 I found a page about building Chromium for Android Jan 03 04:31:28 has anyone done it here? Jan 03 04:31:31 no you didn't Jan 03 04:31:50 you found a page about building chromium's *test cases* for Android - unless something has changed a lot recently with no notice Jan 03 04:32:17 http://code.google.com/p/chromium/wiki/AndroidBuildInstructions Jan 03 04:32:49 it looks like Greek to me, so it's likely your right Jan 03 04:33:39 hmm... looks like there's more there than there was, but I don't think it's a full browser Jan 03 04:35:43 So definitely my image is being scaled up, does anyone know what does that? Jan 03 04:36:14 cool, making progress with the listview. setting the emptyview seems to break it... thanks for hte help StingRay_ Jan 03 04:41:01 Hello Jan 03 04:41:14 guys, an good and updated to latest api good (e-)book about android dev? Jan 03 04:41:35 d.android.com Jan 03 04:42:29 I know about that but I prefer a book that explain stuff in a better and extended way Jan 03 04:43:30 Reito Meir Professional Android Dev Jan 03 04:43:32 Edition 4 Jan 03 04:44:20 http://www.amazon.com/Professional-Android-Application-Development-Guides/dp/1118102274 Jan 03 04:44:26 why not play books lol Jan 03 04:45:25 that book is rated 3.5 on play? Jan 03 04:45:48 Thanks Jan 03 04:47:50 but that book only has up to 4.0 Jan 03 04:47:54 murphy's ebook goes into a lot of detail i think Jan 03 04:47:56 d.android.com has up to 4.2 Jan 03 04:48:34 wow ebooks are stupid Jan 03 04:48:36 canadiancow: but fortunately, almost nobody in the real world has 4.2 :) Jan 03 04:48:39 kindle edition is 24.74 Jan 03 04:48:45 paperback is 26.86 Jan 03 04:48:57 why is an ebook not half the price or something ~_~ Jan 03 04:49:02 canadiancow: a book is book :) Jan 03 04:49:11 ebooks are incredibly stupid Jan 03 04:49:22 Leeds, he asked for UPDATED TO LATEST API Jan 03 04:49:26 :P Jan 03 04:49:40 then Mark Murphy's stuff is going to be the only thing close Jan 03 04:51:18 time to sleep. bye Jan 03 04:51:49 how can i capture the back key when the IME is shown? i tried onBackPressed, but that only works when the IME is hidden.... Jan 03 04:53:18 I suspect you can't *capture* it, but you should be able to respond to it by checking for the IME going away? Jan 03 04:59:00 This is perhaps a long shot but - with SlidingMenu, is there any way to set the width of the main view so that the menu view is always shown slightly? Jan 03 05:01:01 Leeds, so hot to respond to it? Jan 03 05:01:25 i find no methods for checking if IME going away Jan 03 05:01:30 murphy's book is a lot of whitespace and margins Jan 03 05:01:51 if your getting a book , go with Reto, he has access to the right people at least Jan 03 05:02:24 there isn't enough between 4.0 and 4.2 to give a fuck about, really Jan 03 05:02:31 so that book is fine Jan 03 05:04:02 for the few silly things that were added, like DayDreams, you can get the overview in a blog or something Jan 03 05:05:29 zhangxaochen : in your view, onKeyDown is what you want Jan 03 05:05:39 then just check for KeyCode.KEYCODE_BACK Jan 03 05:06:08 you don't get notifications of the IME closing/opening the virtual keyboard Jan 03 05:09:18 Pfhoenix, no, when IME is shown, onKeyDown is not called Jan 03 05:12:19 as I said, you don't get notifications for that Jan 03 05:12:28 wait Jan 03 05:12:50 have you tried using onKeyUp? Jan 03 05:13:16 you won't get notifications for when IME gets shown Jan 03 05:13:29 but onKeyUp should fire when the user presses keys on the IME Jan 03 05:34:32 interesting, Ubuntu Mobile is using Android's drivers Jan 03 05:38:59 it sure would be convenient if SimpleOnGestureListener handled two-finger tapping as well Jan 03 05:41:36 hey, I've got some code in a onDrawFrame that I'm having troubles understanding Jan 03 05:41:59 could anyone explain to me how this is working off of a ten second rotation? Jan 03 05:42:01 https://gist.github.com/4441086 Jan 03 05:42:31 simple math Jan 03 05:42:36 10000ms = 10s Jan 03 05:43:10 oh Jan 03 05:43:12 duh Jan 03 05:43:15 lol thanks, sorry Jan 03 05:52:13 Pfhoenix: You're making my brain overheat with such tricky stuff. Jan 03 05:52:22 tricky? =) Jan 03 05:52:43 000m just dissapearing like that.. Jan 03 05:52:50 ah. Jan 03 05:52:57 :) Jan 03 05:53:20 CommonWares has sample code that supposedly implements bidirectional communication via AIDL. Jan 03 05:53:29 oh yeah? Jan 03 05:53:31 Assuming that it works... time for me to get back to work. Jan 03 06:01:47 Pfhoenix, the onKeyDown is not called when the IME shown in the front Jan 03 06:04:19 oh no i tried it again, it could be called when press menu key or volume key , but just not when the back key being pressed Jan 03 06:06:08 Wow.... I literally have no idea why it's working perfectly now. Jan 03 06:06:12 But it is. Jan 03 06:07:48 And then I move it to a remote process.. and all hell breaks loose. Jan 03 06:09:01 after i enabled developer options on my phone, i keep getting these random intents that open up in gmail/evernote/some others and basically contain a screenshot and a dump Jan 03 06:09:05 how do i turn these off? Jan 03 06:18:11 can't find any tutorial on addStatesFromChildren Jan 03 06:23:50 OMG...... Jan 03 06:24:10 NPE was being raised because of a failed check between == "CONST STRING" :( Jan 03 06:33:11 hello Jan 03 06:33:17 i'm trying to build LatinIME by itself Jan 03 06:33:22 first up, is that even possible? Jan 03 06:33:29 second, do I need to use the Android build tools? Jan 03 06:33:39 or setup build files by myself? Jan 03 06:41:21 maslen, can't remember any language that supports that Jan 03 06:44:28 squ: Checking a variable versus a constant String was returning false when they both had the same contents. Switching to .equals fixed it. Jan 03 06:45:04 == in java compares objects not content. surprise! Jan 03 06:45:20 dragorn: I know that. But this is the first time it bit me :( Jan 03 06:45:36 maslen: probably won't again, tho Jan 03 06:45:57 dragorn: I had a comment to fix it. It wasn't my code :( Jan 03 06:46:14 maslen: put an orange in a sock, find the person who wrote it Jan 03 06:46:17 maslen: and educate them Jan 03 06:46:31 I wish... he's a phd student a few hundred miles away Jan 03 06:46:47 even easier. wire an undergrad $20 for pizza Jan 03 06:48:08 does anybody know what sort of voodoo is needed to give my application android.permission.INTERACT_ACROSS_USERS_FULL? when i put that in my manifest and install it, the package manager says it is not granting it Jan 03 06:49:17 dragorn : that person was probably used to a more intelligent language Jan 03 06:49:32 where operator overloading enables code to behave as expected Jan 03 06:49:45 instead of forcing verbosity on the programmer Jan 03 06:49:55 Pfhoenix: Java is very predictable. It's just long to code in. Jan 03 06:50:01 especially with String Jan 03 06:50:06 they're fucking immutable Jan 03 06:50:10 == should BE .equals Jan 03 06:50:18 Pfhoenix: You seem to have a lot of ... complaints about Java. Jan 03 06:50:28 maslen : yep, I'm not Java's biggest fan Jan 03 06:51:24 giantpune: is that a public permission? Jan 03 06:51:26 giantpune: there are several permissions which can only be given to code signed by the system key; ie generated alongside the rom Jan 03 06:51:34 Pfhoenix: you should take a look at why they made all those decisions that appear to be counter-intuitive to you. Jan 03 06:51:37 giantpune: I don't know if that one is one of them; i can't find it in the docs Jan 03 06:52:12 maslen : the Java designers should look at why nearly every other OOP language does things differently =) Jan 03 06:52:19 Pfhoenix: operator overloading can also make code perform very much not as expected; there's arguments either way Jan 03 06:52:23 here's another one : access modes Jan 03 06:52:30 im trying to launch an intent to open a file in another app. when i do, i get an error that i need that permission. but when i add that permission, the packagemanager complains Jan 03 06:52:40 between public, protected, and private Jan 03 06:53:12 there's something Java doesn't do - deny access to methods/members outside the class and subclasses Jan 03 06:53:17 Pfhoenix: honestly it comes down to "deal with the foibles" or "don't use the language". Railing against $FOOs inconsistencies is just a good way to make yourself miserable Jan 03 06:53:28 I'm not java fan either but it's what we've got to use Jan 03 06:53:32 dragorn : I know Jan 03 06:53:35 I like to vent Jan 03 06:53:53 Pfhoenix: The default of being package-private is ... not a good design. the rest of the scoping isn't all that bad. Jan 03 06:54:12 I rather like C#'s approach Jan 03 06:54:23 where protected limits access to class-internal Jan 03 06:54:56 but then, there's a lot of reasons to like C#'s design Jan 03 06:55:04 done by the guy who designed Pascal Jan 03 06:56:35 What's a good res for an AVD? Jan 03 06:56:57 whichever you want to test in? Jan 03 06:57:06 480x800 is a common resolution Jan 03 06:57:16 320x240 Jan 03 06:57:20 1280x720 Jan 03 06:57:42 yeah, 720p if you want to target the newer devices Jan 03 06:58:02 All I care about is functionality - I'm not working with UI's at all Jan 03 06:58:13 then avoid AVDs =) Jan 03 06:58:16 they're slow as hell Jan 03 06:58:46 what's the N10 res? Jan 03 06:58:58 24something by 19something Jan 03 06:59:18 it's rather obscene =) Jan 03 06:59:18 the x86 AVDs are faster than any real device you can find Jan 03 06:59:31 link? Jan 03 06:59:37 I'd love to have an emulator that wasn't shit Jan 03 06:59:40 http://google.com Jan 03 06:59:45 lovely. Jan 03 06:59:55 my dual-monitor desktop is only 2560x1024! Jan 03 07:00:23 considering I'd go to Google to find a link there's no reason you can't do the same Jan 03 07:02:27 yeah the n10 is what, around 300dpi? Very nice Jan 03 07:03:03 it's nearly iPad3 dpi Jan 03 07:03:09 a very nice display Jan 03 07:03:19 Hi Guys, I am trying to read strings from a bluethoth SPP server into my Android client. The server works fine, and sends the strings to the client as is evidenced in the Logcat.The LogCat indicates that bytes are read in from the btSocket. However, my attempt to read from the socket and display to the strings to the TextView has been futile. Here is the Android client (http://paste.ubuntu.com/1490814/) and here is the logcat (http://paste.ubuntu.com/1490 Jan 03 07:03:28 Why would AIDL not be able to import certain classes? Jan 03 07:03:34 a shame the hardware in the N10 is slower than the N7 hardware Jan 03 07:04:40 Pfhoenix: i'm... fairly sure that's not true? Jan 03 07:06:01 Someone kindly assist with the above problem. Jan 03 07:06:13 Pfhoenix: n7 is quad 1.2, n10 is quad 1.7, and twice the ram Jan 03 07:06:25 looks like I'm wrong (could have sworn it was the other way around) Jan 03 07:06:31 yeah Jan 03 07:06:41 nmvictor: you'll almost certainly want to implement your bluetooth interface in a service and pass messages to your UI layer Jan 03 07:06:41 n10 is dual core, quad GPU Jan 03 07:06:56 JakeWharton: so it is. Jan 03 07:07:03 JakeWharton: I can read all goods Jan 03 07:07:48 nmvictor: why is it futile? Jan 03 07:07:50 ah so Jan 03 07:08:59 nmvictor: I also don't see any attempt to set a textview in that link. I can tell you right off though you'll need to post it on your UI thread in that model Jan 03 07:09:32 and I definitely wouldn't run the bt code in the activity. arguably you could put it in a persistent fragment if you don't want to do a service. Jan 03 07:13:11 dragorn: thanks for that, but the reading from BT Socket, should I work with the same code? Jan 03 07:21:07 in button, image how to make the image and button react to state changes like pressed, focused? Jan 03 07:21:59 or at least set image to ignore click events and pass them to button Jan 03 07:25:06 hmm, now all I need is a way to auto-generate AIDL stubs for things :) Jan 03 07:25:13 wonderful, a new task at hand, (finally) Jan 03 07:25:22 good night everyone. Jan 03 07:35:14 does anyone know how to add a MultiChoiceModeListener to a listview to show a context menu using Action bar sherlock? Jan 03 07:40:59 ok I give up, 4 hours now, how is one supposed to inflate a layout resource into a custom view (relativeLayout, linear, viewgroup) ? Jan 03 07:41:27 nothing I have done, read or seen makes any difference, I get nothing :( Jan 03 07:42:35 JakeWharton: there? Jan 03 07:42:40 not for long Jan 03 07:44:17 I've been using MultiChoiceMode with my listview. I now need to support more android versions hence using ABS. How do I use multichoicemode is it possible? Jan 03 07:44:35 try this: https://snipt.net/tweakt/sherlocklistviewjava/ Jan 03 07:44:52 thank mrenouf when he comes back in here Jan 03 07:45:21 JakeWharton: SweetNESS thanks I ll try that Jan 03 07:54:56 What is the hest way to intercept and block calls from a specific number in android Jan 03 08:11:36 droidbuster: I use tasker and add the phone numbers to a contact named "-Blocked" Jan 03 08:12:52 dan2k3k4: if you already have a contact, why not use the built-in "all calls to voicemail" feature? Jan 03 08:13:25 appel1: but if you don't want them leaving voicemail messages? Jan 03 08:13:39 I think I have it set to forward somewhere though Jan 03 08:14:01 dan2k3k4: didn't know tasker could do something else Jan 03 08:18:51 appel1: hmm just checked, I had it set to block call function though I could do other things like divert call Jan 03 08:19:04 ok Jan 03 08:45:26 why the output of this code is still false? what does getRootView get on earth? http://codepad.org/NqRW8oBE Jan 03 08:46:24 Exception raised during rendering: addStateFromChildren cannot be enabled if a child has duplicateParentState set to true Jan 03 08:46:27 :( Jan 03 08:52:49 zhangxaochen: getRootView gets the root view that is currently visible Jan 03 08:53:16 that will be a PhoneWindow.DecorView commonly Jan 03 08:53:29 timroes, how to make a button which change state when parent is clicked? Jan 03 08:53:54 but the parent should change state too when user clicks a button Jan 03 08:54:09 timroes, so that means any view visible in the layout.xml is not root view? Jan 03 08:54:17 zhangxaochen: yeah Jan 03 08:55:38 you can btw use the monitor tool that has a great set of gui inspection tools in there including a tree view of the currently shown screen Jan 03 08:56:25 squ: inherit your parent view from any groupview (e.g. linear layout or whatever is closest to what you need) and add the button as a child and forward the clicks to all children Jan 03 08:56:29 in api demos views/layouts/linearLayout/10 when you click on textedit, button is not green, when click on button, both are green Jan 03 08:56:29 hey, can you tell me why i need different images for different DPIs ? http://stackoverflow.com/questions/14124727/android-layout-works-on-emulator-but-not-on-device Jan 03 08:56:37 where is the monitor tool timroes ? Jan 03 08:56:44 you mean "outline"? Jan 03 08:57:05 timroes, can you show sample? Jan 03 08:57:50 zhangxaochen: /tools/ Jan 03 08:58:38 squ: what class is your parent button? Jan 03 08:59:04 Where do I put a ".so" file so that this System.loadLibray('file.so') stops saying it cant find it? Jan 03 09:01:02 timroes, check that api demos file Jan 03 09:01:10 so this might be a simple question, but I haven't been able to get this to work... I have a LinearLayout containing some TextView's, i'd like to add dividers (a light grey color) between each element in the LinearLayout... but i don't know how... Jan 03 09:01:18 they have same issue as me Jan 03 09:01:24 or bug Jan 03 09:03:53 timroes, http://pastebin.com/KV10nAnG Jan 03 09:04:42 nevermind, I named it lib instead of libs. Jan 03 09:05:31 squ: whats the problem with that Jan 03 09:05:54 looks right, doing an addStatesFromChildren on the parent, to make it take the children's state Jan 03 09:05:58 if you click on parent, the button does not receive states Jan 03 09:06:24 if you click button, both parent and button are highlighted Jan 03 09:06:47 there is also the duplicateParentState, if you want it the other way round, but normally the container isn't clickable so that's normally not what you want Jan 03 09:07:03 I tried both duplicate and addstates Jan 03 09:07:06 yeah because the parent takes the state of its children.. Jan 03 09:07:16 so ofc only if you hit the children the parent get highlightet Jan 03 09:07:31 if you want to take the parents state use android:duplicateParentState on the children Jan 03 09:07:40 Exception raised during rendering: addStateFromChildren cannot be enabled if a child has duplicateParentState set to true Jan 03 09:07:45 but make sure the parent is an clickable view then (what linearlayout isn't) Jan 03 09:07:56 yeah what wonders you about that exception? Jan 03 09:08:06 :) Jan 03 09:08:07 it tells exactly what is wrong, i cannot tell it to you in any other words Jan 03 09:08:25 addStateFromChildren cannot be enabled if a child has duplicateParentState set to true Jan 03 09:08:38 can you try that api demos sample? Jan 03 09:08:49 so what do you hope for me to see? Jan 03 09:09:12 i guess clicking the button should highlight the whole linearlayout, but clicking in the linearlayout shouldn't highlight any button Jan 03 09:09:12 I want both, parent and child have same states Jan 03 09:09:18 (at least thats what i expect it to be) Jan 03 09:09:23 yes Jan 03 09:09:26 its wrong Jan 03 09:09:27 :) Jan 03 09:09:30 no its not... Jan 03 09:09:41 its excactly what the layout you pasted does Jan 03 09:09:43 timroes, do you mean that 'Hierarchy View Perspective'? Jan 03 09:09:49 zhangxaochen: yeah Jan 03 09:10:01 it's just a black screen when open it Jan 03 09:10:08 timroes, do you get my question ? :) Jan 03 09:10:09 zhangxaochen: it takes some time Jan 03 09:11:28 do i need to run or debug the project and wait? Jan 03 09:11:50 zhangxaochen: yeah running is enough Jan 03 09:12:03 i guess you can select your activity then from the left side from a list somewhere Jan 03 09:12:19 oh great, i see it~ Jan 03 09:12:22 ;P Jan 03 09:12:35 thx a lot timroes Jan 03 09:12:46 squ: i do, and i already gave you the answer several times: if you want all your children to have the state of its container, give them duplicateParentState="true" (but ofc don't give the parent the addchildrenstate, because you will get an exception, how should the program now knows, which state it should take, you created a cycle). if all children have duplicateParentState enabled they will all take the state from the parent Jan 03 09:14:52 Hi, is it possible to emulate an Samsung Galaxy S3? I got a bug in my app only showing on that device and I dont have any physical device. Jan 03 09:15:27 squ: to make your linearlayout cliockable set android:clickable="true" on it Jan 03 09:16:10 granden: you can try to create an avd that is as close to an galaxy S3 as possbile, but if the error is really special to that device, I doubt the emulator will have it, even if you try to get everything as close as possible Jan 03 09:17:00 ok, so only way to solve it is to go out and buy an s3. Nice :) Jan 03 09:18:07 are you sure it occurs always on that device? Jan 03 09:18:26 yes Jan 03 09:18:52 have you any idea to what that error could be related? Jan 03 09:19:08 But i will look around maybe some of my friends might have that specific phone. Jan 03 09:19:19 Could be resolution. Will check it. Jan 03 09:19:32 if its relted to resolution, emulator would show it Jan 03 09:20:16 yeah, googling resolution of that device right now Jan 03 09:20:30 but then its strange only samsung galaxy s3 shows it Jan 03 09:20:37 1280 x 720 Jan 03 09:20:41 4,8 inch Jan 03 09:21:16 havent got reports from any other users. But like 10 S3 users. Jan 03 09:21:28 Perhaps more popular phone with that res then any other. Jan 03 09:23:18 could i switch orientation of an avd? Jan 03 09:23:24 ctrl + f11 Jan 03 09:23:27 ctrl+f12? Jan 03 09:23:30 or f11 Jan 03 09:24:02 thanks :) Jan 03 09:24:26 Hello, when developing for android. is there any recomended list of devices that should be used when testing to cover the most used devices? Jan 03 09:25:49 something like a cheap gingerbread tablet and phone, and a nexus 7/4 would seem to be reasonable. Jan 03 09:26:06 timroes, in that case clicking on the button does not change its state Jan 03 09:26:26 only when you click on the parent does change button's state Jan 03 09:30:04 Nice, an emulator with the same res as the S3 shows the same errors. Jan 03 09:32:17 squ: try that https://groups.google.com/forum/?fromgroups=#!topic/android-developers/0V7cgWoLQ2w Jan 03 09:32:51 granden: "res" ? Jan 03 09:33:00 resolution Jan 03 09:33:25 Is there any way to get the Androdi Emulator working to a regular phone speed? Jan 03 09:33:37 I have to set my memory limit to 512 MB Jan 03 09:33:38 lighthazard: use the intel image Jan 03 09:33:49 * lighthazard checks Jan 03 09:33:49 and use and appropriate fast cpu Jan 03 09:34:44 But for many of the devices you can choose from there is only CPU ARM so it has to emulate. or how would you do it? Jan 03 09:35:04 emulator: device fd:776 Jan 03 09:35:04 HAX is working and emulator runs in fast virt mode Jan 03 09:35:04 Failed to allocate memory: 8 Jan 03 09:35:21 SpeedEvil: Gingerbread tablet? Jan 03 09:35:41 g00s: yes Jan 03 09:35:48 who has those ? Jan 03 09:35:56 many people. Jan 03 09:36:18 not everyone is able to throw away year old hardware Jan 03 09:36:30 even cheap Chinese tablets Jan 03 09:36:46 hence why gingerbread is still at 50% of market Jan 03 09:37:08 oh sure, i still have my froyo phone. but GB was never sanctioned by google on tablets, and i doubt its 50% share comes from tablets :| Jan 03 09:37:28 hmm Jan 03 09:37:42 plus, there is such a thing as the quality of a user Jan 03 09:37:52 I guess my first android device was one Jan 03 09:37:52 I'm still on froyo, too. the defy is just too good to throw away... Jan 03 09:38:47 http://www.wopadusa.com/2nd-gernation-wopad-wopad-i7/ Jan 03 09:38:52 one of these Jan 03 09:39:04 in some ways, I prefer it to my n7 Jan 03 09:39:36 limited ways, of course Jan 03 09:41:01 would anyone here happen to have any idea why file.delete() doesnt actually delete anything? Jan 03 09:42:24 uninformed guess. something else has it open? Jan 03 09:44:43 i was attempting to return a file path of a captured image via camera (which is a bigger hassle than it sohudlve been), but it creates an artefact Jan 03 09:45:11 if no file was captured an empty file is left in the gallery, and calling delete() on it does nothing :s Jan 03 09:50:21 ...it the delete() call also returns true... but its still in the gallery =/ Jan 03 09:53:29 Hello! Can i detect when my application started from "Recents"? i.e. I tap home button, activity goes to background and when i try to open application from recents i want to do some specific action. How i can detect this? I know about OnRestart, but i am trying to find solution which can handle this case for all activities. I dont want to implement onRestart in all activities and cant extend... Jan 03 09:53:30 ...all activities from base activity with implemented onRestart. Jan 03 09:55:48 I find flag Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY but dont know how i can use it Jan 03 09:57:30 those xda guys are pretty sharp; if true it seems google has sold 375k N4 s Jan 03 09:59:19 xgear: override the onNewIntent method, and check inside if((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) { // do your stuff } Jan 03 10:00:03 375k... could have sold double the amount IF... you know.. they actually had them. Jan 03 10:02:40 timroes: thanks, but i want implement this once for example in Applicaion class. I don't want implement it in every activity that i have and i cant add base activity with implemented onNewIntet :( Jan 03 10:02:46 ;( Jan 03 10:02:54 why? Jan 03 10:03:13 thats the solution you would need to go for if you don't want to implement it multiple times Jan 03 10:03:25 create a base activity class implementing that, and extend from that class Jan 03 10:03:36 HDroid: there were some sales figures on the Nexus 7s which seemed positive; but i wonder how the N 10s are doing Jan 03 10:03:46 i hear nothing about those Jan 03 10:04:07 Yeah, haven't heard anything about that either. Jan 03 10:05:10 Are there any known ways of developing Android applications in Python or is Java the only ticket? I understand that there are some Python implementations out there written in Java. Jan 03 10:05:42 i wonde if anyone uses Jython Jan 03 10:05:58 there is slf4a or whatever its called; seems like a kludge Jan 03 10:22:34 is there any way to write the onItemSelectedcallback in xml file just similar to android:onClick? Jan 03 10:23:13 zhangxaochen, for your custom view? Jan 03 10:24:26 Zharf, not a custom view, i mean sth like the android:onClick="xxx" way Jan 03 10:24:39 I'm not sure I follow... Jan 03 10:25:27 for what purpose is this if not a custom view? Jan 03 10:26:57 Zharf, oh i don't know if a custom view could achieve this, could you make a simple example? thx a lot Jan 03 10:28:52 http://developer.android.com/guide/topics/ui/custom-components.html ... it mostly points to API samples though Jan 03 10:29:09 there's the A Custom View Example part where it talks about app: namespace Jan 03 10:29:16 that's what you want Jan 03 10:41:31 which is the file from which power management calls are made in android Jan 03 10:56:47 Zharf, do you know where is such "app:text" defined? Jan 03 11:00:07 i read the article you mentioned, but not find the details about app:namespace... Jan 03 11:05:08 zhangxaochen, you define it yourself Jan 03 11:06:17 hey guys! anyone successfully using HoloEveryWhere and SlidingMenu (by jfeinstein) in combination? Jan 03 11:06:29 Zharf, yes i know , i'm reading the \samples\android-16\Notepad example, but cant find where it's defined Jan 03 11:07:01 zhangxaochen, I'll get back to you in a bit, I'm in the middle of changing my guitar strings :p Jan 03 11:07:28 thx in advance ;) Zharf Jan 03 11:13:21 hi all, how do u get the GIVEN_NAME and FAMILY_NAME of a contact using its id? Jan 03 11:13:39 For some reason, GIVEN_NAME returns the number 2 and FAMILY_NAME returns null for me :/ Jan 03 11:13:48 any ideas why this is so and how I can correct it? Jan 03 11:13:50 Zharf: my old 12 string needs to be restrung; its such a headache Jan 03 11:14:26 g00s, I bought a string winder Jan 03 11:14:30 it really made the job a lot easier Jan 03 11:14:39 oh yeah, i have one of those too Jan 03 11:14:50 but my tuning pegs are very close on the 12 string Jan 03 11:14:52 I changed strings for three years without one Jan 03 11:17:42 how to force activity slide from left/right and why this is changed from 2.2 on android 4.1 Jan 03 11:19:00 Anyone know how to get the GIVEN_NAME and FAMILY_NAME? Jan 03 11:26:00 Hey Jan 03 11:26:12 Anyone using .gitattributes and has a good one for Android Projects? Jan 03 11:29:24 if i want to design a small text based game between players Jan 03 11:29:38 must these players be contacts ? Jan 03 11:35:22 what type is 'this' in activity's onCreate ? Jan 03 11:35:29 is there a difference between the _ID column in the Contacts table and the CONTACT_ID column in the Data table or are they equivalent? Jan 03 11:43:55 zhangxaochen, in samples/android-16/ApiDemos/res/values/attrs.xml Jan 03 11:45:53 Zharf: For some reason, the _ID returned from querying the contacts table doesnt exist in the data table. in this case how do i get the GIVEN_NAME and FAMILY_NAME of a contact? Jan 03 11:46:01 zhangxaochen, http://developer.android.com/training/custom-views/create-view.html I guess explains it better Jan 03 11:46:48 ashiswin, not familiarized myself with the contacts api, sorry Jan 03 11:48:54 Zharf: oh ok XD thanks anyways :) Jan 03 11:49:05 Is anyone here familiar with the Contacts API? Jan 03 12:16:02 sup Jan 03 12:16:57 quick question - how would one go about tracking down a memory leak? Something isn't right in my view pager, whenever I change orientation it takes up a bit more memory, I am leaking stuff somewhere somehow. Jan 03 12:17:02 But I can't track it down Jan 03 12:17:03 Can I mount an NFS share as a luser on Android 4.0? Jan 03 12:17:54 fasta: no Jan 03 12:18:25 Leeds: why not? Jan 03 12:18:45 Or do I have to root the device first before I can do that? Jan 03 12:19:04 i guess you're lacking the kernel support and/or userspace utilities for it Jan 03 12:19:04 It sounds rather ... silly to release a device which cannot mount NFS shares to me. Jan 03 12:19:09 for a start, stock Android doesn't have NFS support Jan 03 12:19:25 I think it has Icecream Sandwich. Jan 03 12:19:38 Android is completely new for me. Jan 03 12:19:48 Linux is not. Jan 03 12:20:03 it'll help if you don't think of Android as being GNU/Linux - it's a Linux kernel with a mainly custom userspace Jan 03 12:20:03 fasta: it's not necessarily silly, NFS might not be the best choice on a device that's designed to disconnect a lot Jan 03 12:20:24 desaster: ok, is there any other protocol which is does support? Jan 03 12:20:36 desaster: I don't mind adapting, but there must be some useful solution. Jan 03 12:21:09 Is it possible, without modifying the source of my Activity, to register input event callbacks with it? Jan 03 12:21:30 for mounting remote storage? i really don't want to do that myself, but i do use file transfers with various protocols, and file syncing with rsync and dropbox Jan 03 12:22:03 desaster: the application is to be able to see all the pictures on a NAS on a tablet. Jan 03 12:22:09 but if you really want to do NFS, i'm sure there are kernels out there with NFS support Jan 03 12:22:14 i just don't think any stock device will have it Jan 03 12:22:19 desaster: that seems a rather basic requirement. Jan 03 12:22:38 NFS exists for 20 years+ now? Jan 03 12:22:43 try something like solidexplorer with SMB support Jan 03 12:22:53 notifyDataSetChanged doesnt work for CheckedTextView in a dialog box Jan 03 12:22:59 fasta: are you developing an app? Jan 03 12:23:22 Leeds: are you a Google marketing employee or something? Jan 03 12:23:34 how to notifyDataSetChanged and make it reflect in the Dialog UI ? Jan 03 12:23:41 ho hum Jan 03 12:23:55 fasta: or check out something like https://play.google.com/store/apps/details?id=ws.plattner.cifsmanager Jan 03 12:24:11 desaster: why would smb be better than NFS? Jan 03 12:24:23 desaster: cifs is much more complex and cannot possibly be faster. Jan 03 12:24:33 i'm not saying it's better Jan 03 12:24:47 my experiences with NFS are that i would want a permanent connectiong to it Jan 03 12:24:49 desaster: then why are you recommending it? Because nobody bothered to do NFS? Jan 03 12:24:55 but things may have improved on that regard Jan 03 12:24:57 desaster: not my experience. Jan 03 12:25:06 fasta: i suggested you check it out, i cannot recommend it because i haven't used it myself Jan 03 12:25:22 desaster: I am not interested in any reverse-engineered protocols. Jan 03 12:25:39 right, nobody bothered to do NFS on an OS designed for portable consumer use on intermittent network connections... blah Jan 03 12:25:43 fasta: i also suggested you check it out, because it seems to support NFS, and you specifically want NFS support Jan 03 12:26:33 Leeds: which solution is there for your hypothetical problem? Jan 03 12:26:42 Leeds: using web-apps? :) Jan 03 12:26:47 yes, HTTP Jan 03 12:27:06 anyone has worked on CheckedTextView in a Dialog box with a CheckAll button ? Jan 03 12:27:11 That's only 10 times slower. Jan 03 12:27:23 fasta: well... CIFS is better than NFS <4, IMO Jan 03 12:27:35 p_l: I have 4. Jan 03 12:27:40 NFSv4 and up is a completely different beast Jan 03 12:28:10 as for NFS... I know that stock ASUS Transformer Infinity comes with NFS in kernel o_O Jan 03 12:28:28 no, I still do not know where the stock firmware uses it Jan 03 12:31:53 Hello i have a question, i have an activity that uses a AsyncTask to download a xml file , how can i know in the main activity that download of file xpto.xml has been completed and start another async thread to process it? Jan 03 12:33:47 BrixSat: why not process it in the same thread? anyway, there's onPostExecute Jan 03 12:34:13 alankila: yes it can be but i still would need to update another class Jan 03 12:35:26 alankila: i download a file playlist.xml with names of files to play in mediaplayer, and i have a class playlist wich knows what file is being played and what will be next, but when download of playlist xml ocurs it must update the playlist class Jan 03 12:35:45 well yeah, onPostExecute, as alankila said Jan 03 12:36:16 and how do i pass the processed xml to the playlist class? so it is availiable in the activity Jan 03 12:36:52 you can have your doInBackground return a result Jan 03 12:37:00 http://developer.android.com/reference/android/os/AsyncTask.html Jan 03 12:37:10 see the example there Jan 03 12:37:10 I don't know anything about how to use the mediaplayer Jan 03 12:37:54 though if your playlist is your custom invention then you just ... process the xml to the instances of that class Jan 03 12:38:02 about the media player that is all done Jan 03 12:38:19 im now playing a few files that are harcoded in the playlist class Jan 03 12:39:09 also, if you want your mediaplayer to survive for more than a minute in the background I'd make it a service Jan 03 12:40:58 so SlidingDrawer is deprecated, what should I use instead? Jan 03 12:41:05 Maurits_: its playing non stop for 2 days :) no need for service Jan 03 12:41:27 BrixSat: until it runs out of memory, and you're still ignoring the right way to do it Jan 03 12:42:32 generally, 'oh it does work in this case!' isn't decent motivation to design your app wrong Jan 03 12:42:55 i want to have a "handle" below my actionbar which i can grab and drag down to get an overlay window Jan 03 12:42:58 how should i do this Jan 03 12:43:10 anyone know any examples or tutorials? Jan 03 12:43:21 Chilley: you can grab the source of the slidingdrawer and copy it into your class Jan 03 12:43:36 err in your project Jan 03 12:43:56 Chilley: which is what Google suggests you do Jan 03 12:44:30 i read that but didn't really understand that they meant that, why do they recommend that instead of using the built in API? Jan 03 12:44:53 Chilley: because the slidingdrawer is kind of flawed from a usability standpoint Jan 03 12:45:22 I've seen it used and there's always the problem where you accidentally grab the window shade when dragging down Jan 03 12:45:34 or mean to grab the window shade and grab the slidingdrawer Jan 03 12:46:34 and users associate 'swipe from the top of the screen' as checking notifications, usually not a great idea to overload that Jan 03 12:47:26 basically I wanted to slide down a tagcloud where you could pick tags which would then filter my gridview Jan 03 12:47:35 i also thought about a popup window Jan 03 12:47:51 playing with ideas Jan 03 12:48:13 couldn't you just expand the cloud on the first tap, then have a filter button that applies the filtering? Jan 03 12:48:25 and shrinks it back Jan 03 12:53:17 Maurits_: expand the cloud in what view? Jan 03 12:53:21 a popup window? Jan 03 12:53:33 well, inline could also be possible Jan 03 12:53:39 depending on how your layout is Jan 03 12:57:30 Hello. Is it possible to instantiate activity on "background"? I have an activity with OpenGL game and I'd like to pre-load all images when application is lauched (and some other activities are displayed to the user) but I can't load any images without OpenGL context from game activity. Jan 03 13:30:19 hi how to check that is OpenGL ES works on my Eclipse? Jan 03 13:31:26 mikeyMike: what do you mean? Jan 03 13:31:57 applications on my emulator are running but throw errors like ' 'The application has stopped unexpectedly. Please try again'. Jan 03 13:32:25 What is the kind of document called that describes all interaction with for example an app? Jan 03 13:32:32 Having all states described etc Jan 03 13:32:51 mikeyMike: see what's in logcat Jan 03 13:32:56 blackhex: in logcat: Jan 03 13:32:57 FATAL EXCEPTION: GLThread 8 Jan 03 13:33:15 and 4 lines like: at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916) Jan 03 13:33:33 java.lang.IllegalArgumentException: No configs match configSpec Jan 03 13:33:34 hmmm Jan 03 13:34:14 mikeyMike: yep that seems that your emulator does not support OpenGL, have you enabled hardware acceleration during emulator image creation? Jan 03 13:34:52 blackhex: in emulatr options i checked: Use Host GPU Jan 03 13:35:08 API Level is 8 Jan 03 13:35:11 mikeyMike: then try to disable it, it will be software emulated but it may work Jan 03 13:35:27 mikeyMike: and your host opengl works? Jan 03 13:35:37 how to check it? Jan 03 13:35:55 mikeyMike: what your os? Jan 03 13:36:00 windows 7 :( Jan 03 13:36:31 mikeyMike: then it probably does, if you can play any game Jan 03 13:36:49 yes, i think it does. Jan 03 13:37:15 Zharf, thx a lot, i'm reading now Jan 03 13:37:36 mikeyMike: then try software emulation or google the logcat message with windows 7 keword Jan 03 13:37:46 unchecking it didn't work either Jan 03 13:37:52 k Jan 03 13:38:19 thx reading too.:) Jan 03 13:38:25 and one more thing: Jan 03 13:38:36 mikeyMike: maybe you are initializing opengl context wrongly, hard to say without further knowledge or code Jan 03 13:38:50 i read somewhere that do not ever turn off emulator on windows. is that right? Jan 03 13:39:16 blackhex: it's kind of map Hello World. not sure if you wanna do that Jan 03 13:39:29 but there: Jan 03 13:39:33 hi Jan 03 13:39:49 anyone that can help me with a big question about google play? Jan 03 13:39:53 and how to sell app Jan 03 13:39:54 ? Jan 03 13:40:02 http://resources.arcgis.com/en/help/android-sdk/concepts/index.html#/Hello_World_Map/011900000005000000/ Jan 03 13:40:43 when i try to create google check out account it is asking me about company name and adress Jan 03 13:40:45 wrll Jan 03 13:40:47 well* Jan 03 13:40:53 i don't have a companyy Jan 03 13:41:01 what i have to do? Jan 03 13:41:23 mikeyMike: if your are using just that provided library, it should't be code problem Jan 03 13:42:01 mikeyMike: you can also try to run it on device to be sure Jan 03 13:43:56 i don't have a device :P Jan 03 13:45:43 Hey guys Jan 03 13:45:55 got an issue of sorts, need a bit of help if anyone has had similar experience Jan 03 13:46:01 could someone point me in the right direction on why i'm receiving the error "Unable to start receiver... java.lang.ArrayIndexOutOfBoundsException: length=2; index=3" http://pastie.org/5616012 Jan 03 13:46:30 So, my app creates a database, some shared preferences, all the good jazz... but when I push and update, and update it myself, all of that gets cleared, I get a fresh start, need to log in again. Jan 03 13:46:43 Due to the nature of this app, that is kind of bad... is there a way to work around that? Jan 03 13:47:16 str8uplinux: it is absolutly wrong Jan 03 13:47:33 Tee_Pee: not supposed to happen, how do you update? Jan 03 13:47:39 "for(int i : appWidgetIds){" this line iterate on appwidgetids's items Jan 03 13:47:47 Tee_Pee: I'm doing the exact same thing in my app, and it works well Jan 03 13:47:54 so in i variable you will have id values from array Jan 03 13:47:56 not index Jan 03 13:47:57 I run the store and hit Update, normally. Jan 03 13:48:50 ixc: okay, i see what you're saying. My intent was to have the for loop just incase they had more than one instance of the widget running. How would i go about that? Jan 03 13:49:02 Tee_Pee: well, I'm absolutely certain that the default behavior is to preserve the contents of the app's local storage Jan 03 13:49:08 for (int widgetId : appWidgetIds) Jan 03 13:49:17 Remove line 7 Jan 03 13:49:20 Tee_Pee: would be a bit weird if it cleaned that out on every upgrade Jan 03 13:50:13 well I only had one upgrade, and for all I know it might have been just a freak accident... but as I said, clearing the cache and logging people out is quite bad for this specific application.\ Jan 03 13:50:22 so I have to double check to make sure it doesn't happen anymore Jan 03 13:50:55 how bad of a practice is it to pass the owning activity into adapters? Jan 03 13:51:08 i don't mind the tight coupling Jan 03 13:51:13 Not bad at all Jan 03 13:51:24 shouldn't be an issue as long as the adapter instance adhere's the the activity's lifecycle Jan 03 13:51:26 funkbox: why would you need to pass that exact activity into it? Jan 03 13:51:26 Your adapters lifetime it tied to that of the activity Jan 03 13:51:27 you don't want any context leaks Jan 03 13:51:30 i plan to keep all the data in the activity Jan 03 13:51:35 funkbox: instead of just a generic context Jan 03 13:51:44 yeah this adapter is only used by a single activity Jan 03 13:52:29 I dunno, something I would still avoid, if you must design it this way why not keep a reference to a 'datastore' object in the activity Jan 03 13:52:34 and then pass that to the adapter Jan 03 13:52:53 but it's unlikely to have any serious consequences Jan 03 13:52:56 data can get out of sync easier that way Jan 03 13:53:12 if everything refers to the same instance then it's more better Jan 03 13:53:12 Not really Jan 03 13:53:32 That's how java works Jan 03 13:53:47 funkbox: well, you're going to have persistance issues anyway if you store everything in the activity Jan 03 13:53:52 or you could have them Jan 03 13:54:02 If you pass a List to your adapter, the adapter has a reference to that List.. If you change it in your activity, the adapter sees those changes as well Jan 03 13:54:13 funkbox - your activity has an instance of an adapter, and your adapter has an instance of the activity... that's bad practice right there. Jan 03 13:54:17 not if i set it to a new instance Jan 03 13:54:29 Tee_Pee: why Jan 03 13:54:45 Why would you give it a new instance Jan 03 13:55:08 if it gets synced etc Jan 03 13:55:29 What you should do is pass the context to the adapter so it can have access to context-related stuff... but any data that you want from the activity like lists or fragments or whatever should be passed directly as such. Jan 03 13:56:13 funkbox: I don't know what exactly you are trying to do, but if you're doing something not trivial it's usually better to do some extra work Jan 03 13:56:29 funkbox: also to futureproof your stuff for multiple fragments etc Jan 03 13:56:29 item renderer Jan 03 13:56:34 hey all, i have this strange thing stuck before my background, and behind the widgets (its not a widget). how do I get rid of it?: http://i.imgur.com/3ZrZe.png Jan 03 13:56:37 think like a facebook wall post Jan 03 13:56:46 any pictures, titles, descritpions, comments etc Jan 03 13:57:34 if you are caching those locally, then just pass the cursor? Jan 03 13:57:35 meh, you won't save that much time by cutting corners here Jan 03 13:57:48 inflate the view, populate it, stick a fork in it, it's done Jan 03 13:58:03 and you run the risk of hitting a brick wall later on once you want tablet support or something else that sounds trivial Jan 03 13:58:06 sure but if i don't have the image then i gotta not render that Jan 03 13:58:17 You should pass your list to the Adapter.. Jan 03 13:58:19 i find myself longing for MVVM Jan 03 13:58:58 tablet support will be almost an entirely new app Jan 03 13:59:14 funkbox... create a layout for the post that looks good with and without image... in your adapter just check if an image exists and if it doesn't, leave the view empty. Jan 03 13:59:20 It won't have any impact on the performance. Jan 03 13:59:38 there's also the unbounded collection of comments Jan 03 14:00:06 so say tehre's like author box (name, picture), description, links, images, likes etc, then the comments below Jan 03 14:00:18 my current thinking is to use a listview and render it that way Jan 03 14:00:29 a listview inside of your layout. Jan 03 14:00:32 yep Jan 03 14:00:57 funkbox: also, there's really no reason to not use fragments in a new app Jan 03 14:01:01 tablet support will be almost an entirely new app <- not really Jan 03 14:01:07 funkbox: even if you don't directly have plans for a tablet version Jan 03 14:01:51 my concerns about fragments is scrolling perf Jan 03 14:02:07 Fragments don't affect scrolling performance Jan 03 14:02:11 ^ Jan 03 14:02:21 i mean i'm going to have to stick them into a scrollable view right Jan 03 14:02:27 no Jan 03 14:02:43 okay i'm missing something big then Jan 03 14:02:48 in the most basic case you'll just have a one fullscreen fragment per activity Jan 03 14:02:56 Fragments can supply a view, which can be anything Jan 03 14:02:58 e.g. a ListView Jan 03 14:03:02 the fragment can then contain the scrolling view Jan 03 14:03:10 Fragment==Android UIViewController Jan 03 14:03:18 if you're familiar with iOS dev Jan 03 14:03:34 you essentially have a fragment that inflates a view containing the following: Jan 03 14:04:15 Jan 03 14:04:58 the two are bigger than can be presented Jan 03 14:05:15 so i'd need to stick all that into a scrollview, no? Jan 03 14:05:16 The post section should probably just be the listviews header Jan 03 14:05:34 If I want to send information from an activity to another activitiy, this is done by starting the new activita via intent and set data by .putExtra or is there more convenient way to do so? Jan 03 14:05:44 you can do that, yes... or you can stick it into a viewpager Jan 03 14:05:54 if you fancy that sort of navigation Jan 03 14:06:02 okay my next question is whether scrollview recycles containers Jan 03 14:06:13 It doesn't Jan 03 14:06:25 And you shouldn't put a listview in a scrollview Jan 03 14:06:30 so if it has to render everything wouldn't that be significantly slower ? Jan 03 14:06:43 It would Jan 03 14:06:57 okay then i'm seemingly back to the listview adapter :) Jan 03 14:07:25 i can make the adapter independent of the owning activity, just need to make sure to properly update it's properties Jan 03 14:07:59 What does scrollview vs listview have to do with whether or not you're using fragments ;/ Jan 03 14:08:22 If the adapter has a reference to your dataset, the adapter will see any changes to that dataset.. Jan 03 14:08:31 oh it doesn't that i consider a minor thing Jan 03 14:08:45 And no matter where you keep that dataset, you have to call notifyDataSetChanged on your Adapter when changes happen Jan 03 14:09:24 but i will prob use fragments since it would make the logic a lot cleaner and would have better separation of concerns Jan 03 14:09:36 fragments inside a listview it is then Jan 03 14:09:52 listview inside fragment.. Jan 03 14:10:04 Don't put fragments in a listview Jan 03 14:11:31 Semi related, what do Activities do, once you switch to Fragments? I see my own apps having basically empty Activities, doing not much besides some Actionbar settings and inflating fragments if needed. Jan 03 14:11:59 That's what they do Jan 03 14:12:24 hurray Jan 03 14:13:01 Sometimes I wonder when I should use 1-to-many with Fragments. As in, when to use one activity but many fragments, even on handheld. Jan 03 14:13:16 I usually end up having 1 activity per fragment on handheld so far. Jan 03 14:14:05 kakazza: but thats normally how it is. on smartphones you will often have for each fragment one activity holding it Jan 03 14:14:29 but on larger screens you normally arrange multiple fragments into one activity Jan 03 14:14:43 Depends, really Jan 03 14:15:06 It's a perfectly fine approach Jan 03 14:15:11 kakazza: I sometimes do a fragmenttransaction on a phone to push a new screen instead of starting a whole new activity Jan 03 14:15:31 But then you can do tabs, viewpager, etc, and switch out fragments in a single activity Jan 03 14:15:57 True. Jan 03 14:16:28 Maurits_: I tried that once, but faced problems because I declared the first fragment in XML and the other was only initialized in Java. Jan 03 14:16:34 ie, I had a product that should either show a listview or a webview on launch based on info in a configuration file and database Jan 03 14:16:49 I _think_ I read something about it on SO that I cannot really replace or remove a fragement that is declared in XML Jan 03 14:16:52 without fragments I would've had to code support for both in the activity Jan 03 14:16:58 Fragments added in xml aren't really meant to be removed Jan 03 14:18:29 It's useful for "static" fragments, like e.g. a navigation bar Jan 03 14:18:36 Where you just switch out a content area Jan 03 14:20:53 It's also an issue that your transactions aren't remembered once they're executed.. Just the new state.. So when you inflate your layout again, e.g. after an orientation change, the fragment would be readded Jan 03 14:26:17 wow its cold Jan 03 14:27:26 another question: i have a view that's expensive to render and inflate, is there a way to mark it as non-recycleable? Jan 03 14:27:40 so that when the user scrolls down and then up i don't have to rerender that view Jan 03 14:28:28 a list view? Jan 03 14:28:32 or just a regular view Jan 03 14:28:52 ITEM_VIEW_TYPE_IGNORE seems to be what i want but not sure Jan 03 14:29:09 heh how to downgrade Android SDK from 21 to v17? Jan 03 14:30:34 mikeyMike: change the api level and then fix the issues Jan 03 14:32:27 My widget isn't updated on the initial launch? If i wait a half hour (1800000 milliseconds) it will update. Any reason why it doesn't update on the initial launch? http://pastie.org/5616285 Jan 03 14:33:50 ron_frown: yeah winter has arrived Jan 03 14:34:17 winter should be on its way out Jan 03 14:45:58 http://i.imgur.com/xipSN.png Jan 03 14:46:02 hello.. Jan 03 14:46:15 if i want a custom list Jan 03 14:46:16 item Jan 03 14:46:45 i mean put numbers instead of radio / checkbox.. How can i ensure that height is the same as the other ? Jan 03 14:49:28 android:layout_height or android:minHeight Jan 03 14:50:41 where to put this ? Jan 03 14:52:28 Can I specify padding in terms of the widht of a character? Jan 03 14:53:21 Ok, I think I have a XY problem here. What I _actually_ want to do is: I have two TextViews next to each other, I want to have a padding between them that looks like it's exactly one space character wide. Jan 03 14:54:11 Example: |This is TextView1||This is TextView 2| but I want |This is TextView1| |This is TextView2| Jan 03 14:54:13 how to get single row from database by specific id? Jan 03 14:55:49 Hello guys! How can i run my code only when application was moved to foreground from recents. I tried to use Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY but it works only when i press home, call froce-close in my application and then restart it from recents. Jan 03 14:56:15 squ, SELECT * FROM table WHERE id=x Jan 03 14:56:35 This is basic sql stuff, you should probably look at some tutorials Jan 03 14:57:47 Some person contacted me by email and offered to get me 5 star ratings for money. I am worried that people willing to use such services get unfair advantage and I would like to report him to Google Play, but I could not find a place to do so. Any suggestions? Jan 03 14:59:06 sonOfRa, I'd like to go android's way Jan 03 14:59:40 http://www.vogella.com/articles/AndroidSQLite/article.html I rather like vogella's tutorials Jan 03 15:01:10 SQLiteDatabase.query(TABLE, COLUMNS, BaseColumns._ID + "=?", new String[] { String.valueOf(id) }, null, null, null, null); Jan 03 15:01:14 IndiumIndeed: there's not much you can or should do; look up "joe job" as a reason why this is problematic. Jan 03 15:01:54 squ: what SimonVT said. Take a look at https://developer.android.com/training/basics/data-storage/databases.html as well. Jan 03 15:02:33 Pop into #sql for SQL query questions as well. Jan 03 15:06:12 SimonVT, thanks Jan 03 15:08:34 eed> Some person contacted me by email and offered to get me 5 star ratings for money. I am-worried that people willing to use such services get unfair advantage and I would like to report him to Google Play, but I could not find a place to do so. Any suggestions? Jan 03 15:08:46 sorry, copied wrong thing Jan 03 15:09:07 After reinstallation of windows I seem to have almost all the-functions in Devices disabled. For example dump HPROF profile. Debugging is on and I have the device chosen in the- list. What could the reason? Jan 03 15:12:53 Hello guys! How can i run my code only when application was moved to foreground from recents. I tried to use Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY but it works only when i press home, call froce-close in my application and then restart it from recents. Jan 03 15:14:20 What do you mean you "tried to use Intent.Blah" Jan 03 15:14:22 xgear: why do you need to do something different depending on how the user returns to your activity? Jan 03 15:14:23 IndiumIndeed, how much? Jan 03 15:15:01 xgear: the activity wasnt launched from recents Jan 03 15:15:05 appel1: accroding specification Jan 03 15:15:06 it was just brought to front Jan 03 15:15:18 what goal are you trying to solve with these ballasticoonery? Jan 03 15:15:48 xgear: then perhaps the specification is bad :) Jan 03 15:15:56 bugs in the spec Jan 03 15:15:58 mikedg: I like that word Jan 03 15:16:41 thanks Jan 03 15:16:45 appel1: :) Jan 03 15:16:46 xgear: long-pressing home just exposes the task stack. There's no difference between tapping on a task there, and using "back" to return to it. Jan 03 15:16:50 i put more effort into that than i usually do for my fake words Jan 03 15:17:04 Launching from homescreen and from recents is basically the same thing Jan 03 15:17:16 Why do you need to differentiate between that Jan 03 15:17:27 seriously Jan 03 15:17:41 specifications require that Jan 03 15:17:46 Were you actually handed a spec that says "When the user long-presses home to select our app, this particular behavior shall occur"? Jan 03 15:17:59 there's also the case when the user returns from some other task started from a notification using the back key:) Jan 03 15:18:08 There are many ways to return to an app Jan 03 15:18:14 ^^ Jan 03 15:18:46 there's also the possibility that the activity is started up by a virus and is infecting people Jan 03 15:19:03 any of you guys use Shinobi Charts? Jan 03 15:21:14 Thanks guys! Jan 03 15:24:36 hi Jan 03 15:25:24 If anyone wants to contribute to intellij.. Make a pull request that changes their default android layout xml template to use match_parent instead of fill_parent :p Jan 03 15:39:11 Hey Guys, Jan 03 15:39:27 What's the recommended way for implementing section headers in android Jan 03 15:41:00 I'll stick with vim and ant, thanks. Jan 03 15:41:20 My app stores user account information using sharedpreferences atm, I noticed some apps are in the settings menu on my galaxy S3, where can I find some docs on doing that? Jan 03 15:41:44 you don't invade the settings menu. Jan 03 15:42:19 preds: please don't do this. Jan 03 15:42:42 lov, so Dropbox, Google, Samsung, Skype are all doing the wrong thing? Jan 03 15:42:46 I find that hard to believe Jan 03 15:42:50 Guys any help of listview sectionIndexers would be great Jan 03 15:42:53 Well, samsung is doing the wrong thing Jan 03 15:42:56 that should pretty much be a given Jan 03 15:43:02 I'm ASSUMING that these are all preloads? Jan 03 15:43:05 dropbox isn't doing it. it's samsung's touchwiz rom that is doing it. Jan 03 15:43:11 ^^ Jan 03 15:43:21 It's almost certainly samsung customizing their settings app to do this Jan 03 15:43:38 The S3 settings app is also the most convoluted, complicated, and byzantine settings I've ever seen Jan 03 15:43:42 what is the best method do read a xml file and get some elements? Jan 03 15:43:43 preds: I believe those are Contacts account Jan 03 15:43:44 Getting added to that isn't really a badge of honor. Jan 03 15:43:51 you can create your own account for storing contacts Jan 03 15:43:52 Oh, is he talking about accounts? Jan 03 15:43:53 lov, they're not all preloads Jan 03 15:43:59 I'm talking about the accounts section Jan 03 15:44:03 it even has an "add account" Jan 03 15:44:06 pro-tip: root your s3 and install something sane, like cyanogenmod 10. Jan 03 15:44:14 oh haha Jan 03 15:44:19 yeah, that's not S3 specific btw. Jan 03 15:44:30 cool. So how do I do it :) Jan 03 15:44:32 http://developer.android.com/reference/android/accounts/package-summary.html Jan 03 15:44:37 pragma-, cyanogenmod didn't seem to be compatible yet? Jan 03 15:44:41 * preds checks again Jan 03 15:44:42 http://developer.android.com/reference/android/accounts/AccountManager.html Jan 03 15:44:56 preds: I'm running CM on my T-mo S3 Jan 03 15:45:01 that said, the stable build has a few problems ._. Jan 03 15:45:04 but I simply can't use touchwiz Jan 03 15:45:09 I just can't. It hurts ._. Jan 03 15:45:09 apps with permission to manage accounts, look up known accounts, etc, tend to not get an install by me. Jan 03 15:45:24 What's a 'neutral' view that I can use to overlay a other view to catch clicks? Jan 03 15:45:27 pragma-: You must skip the google apps then :> Jan 03 15:45:53 pragma-: actually, http://developer.android.com/training/id-auth/custom_auth.html Jan 03 15:45:56 that might be reasonable Jan 03 15:46:26 Bear in mind that in-app settings is generally The Way To Go, because that's where your user will look for them. Jan 03 15:47:31 sure, I was just concerned about using sharedprefs for storing a password, which is why I'm not storing them at the moment.. Jan 03 15:47:38 but when the token expires, the users get pissed :P Jan 03 15:47:53 so I was looking to see if I could do it the way all these other "big players" are Jan 03 15:50:20 hopefully you're at least one-way encrypting the password Jan 03 15:50:50 I really hate websites that e-mail me my password in plain text when I click 'Forgot password' Jan 03 15:51:08 some websites even "helpfully" email my password to me in plaintext when I sign up for the first time Jan 03 15:51:23 good thing I use keepass with randomly generated 64 character passwords Jan 03 15:52:35 What is the best way to open a xml file in the sdcard and parse it? Jan 03 15:54:24 preds: you should be using token based auth no matter what. Jan 03 15:54:57 well, over storing the raw password anyway Jan 03 15:57:10 DOM, SAX and pull parser? Jan 03 15:59:03 ^^ Jan 03 15:59:21 Use whatever kind of XML parser makes sense for the file (DOM vs pull parser) Jan 03 15:59:31 for files larger than a breadbasket, I'd recommend a pull parser. Jan 03 16:08:19 ok pulparser it is Jan 03 16:09:27 anyone here familiar with Eclipse + NDK? Jan 03 16:09:56 I'm trying to automate my builds with javah, but Eclipse keeps on throwing errors ""not a valid class name: -classpath" Jan 03 16:10:09 I just do it manually Jan 03 16:11:23 yeah, but I'm following along with a book, so if anyone knows what's wrong with the arguments I'm passing Jan 03 16:11:33 -d ${workspace_loc:/MyProject/jni} com.myproject.MyActivity -classpath ${workspace_loc:/MyProject/bin/classes} com.myproject.MyActivity Jan 03 16:11:43 found that on SO, but that doesn't work Jan 03 16:13:16 #Usability: Do you think it's okay to display warnings like "Unauthorized resquest, check authentication data" on a TextView? I have the feel neither Toast nor Dialog seems appropriate Jan 03 16:13:49 belgianguy: that doesn't seem correct because -d only takes one argument and that line has two. Jan 03 16:13:53 It's really important, so Toast seems not fitting, but I don't want to annoy the user every time with a dialog box he/she has to confirm Jan 03 16:14:00 belgianguy: can you see your actual commandline command? Jan 03 16:14:21 platzhirsch: Toast is for something that you're OK with the user missing. Jan 03 16:14:35 This doesn't seem like it fits the bill Jan 03 16:14:41 Maybe a notification? Jan 03 16:14:42 HDroid: correct, but when I just add the -d flag, I get an error that it cannot find the class Jan 03 16:14:46 platzhirsch: you mean the inline error style that's in a lot of (if not most) webforms? Jan 03 16:14:48 lov: got any simple example to understand the pulparser? Jan 03 16:14:59 HDroid: exactly I display it above a button Jan 03 16:15:04 BrixSat: there's nothing android specific here. Do a search for java xml pull parser Jan 03 16:15:12 we use ksoap, but that doesn't mean you should. Jan 03 16:15:22 platzhirsch: nothing wrong with that, IMO. Jan 03 16:15:25 lov thanks Jan 03 16:15:25 ^^ Jan 03 16:15:54 HDroid: running this: -d ${workspace_loc:/MyProject/jni} com.flagella.myproject.MyActivity Jan 03 16:16:08 belgianguy: oh... javah [options] Jan 03 16:16:10 interesting, I use a toast display a message on the SettingsActivity telling the user all settings have to be set before the application can be used. This message shouldn't be missed, maybe a Dialog box is more fitting in this case Jan 03 16:16:15 I.e. options need to go before classes. Jan 03 16:16:50 HDroid: so classpath has to go first? Jan 03 16:17:01 belgianguy: before com.flagella.myproject.MyActivity anyway Jan 03 16:17:53 Assuming that's the only class... but if it's not... the whole list should be after all - options. Jan 03 16:18:38 Hi folks, i'm looking for an implementation of the sliding drawer that seems to no longer be supported on api 17. Any hints? Jan 03 16:20:51 HDroid: it is the only class Jan 03 16:20:56 it just says it's not supported anymore Jan 03 16:21:02 As in, no longer under active development Jan 03 16:21:23 And that if you need to use it, base your own class on the aosp code Jan 03 16:21:30 So do just that Jan 03 16:21:36 ^SlidingDrawer Jan 03 16:22:17 hello guys.. i want to have a custom list item Jan 03 16:22:25 SimonVT: ok, but doesn't it means that they might remove it from the futur sdks ? Jan 03 16:22:28 that has text at left and at right a box with quantity Jan 03 16:22:33 i need one mentor some hours, can help me? Jan 03 16:22:51 They might, they might not Jan 03 16:23:01 It doesn't matter, since you copied it to your own project Jan 03 16:23:32 ok, i'll do this then. Thx for the advice Jan 03 16:38:04 I'm having spinner simple spinner issues, I have 3 drop downs next to each other on a linear layout and on apk11+ it looks fine, on 2.3 the text is so big the 3rd spinner goes off the screen Jan 03 16:38:58 Is there a way I can specify the type of spinner used (inherit from one or the other) in a values-vXX folder? Jan 03 16:42:27 so i'm having a bunch of todo's for my app, regarding activities, with maybe priorities. what would be a good system to keep track of this? Trying to keep hassle to a minimum Jan 03 16:42:53 platzhirsch: you might want to use a dialog here, but that might be overkill. As long as the user can't progress without addressing what you're toasting, you're probably OK. Jan 03 16:43:06 Here's the 2.3 version http://tinypic.com/view.php?pic=10f7xis&s=6 Jan 03 16:43:09 platzhirsch: you MIGHT want to have some other non-blocking location to display this information (a textview at the top fo the screen, etc) Jan 03 16:43:36 and here's the 4.0 http://tinypic.com/r/33okyoo/6 Jan 03 16:44:26 porten: you can always have different styles in your values-vXX folders Jan 03 16:46:46 lov: but I believe I cannot add a TextView to a settings activity? It is built from the preference types I have defined Jan 03 16:47:26 Well, as long as your message in the toast isn't very long, it's probably fine. You should CONSIDER a dialog here, at least, or having a custom preference that you use as an ersatz text view. Jan 03 16:48:32 lov: ok, I have this xml config http://pastebin.com/3wZrpqiz Jan 03 16:48:40 ouh ersatz, fancy Jan 03 16:49:54 lov: is it possible to inherit the style from a simple_spinner item? Jan 03 16:50:11 lov: from one of these? http://developer.android.com/reference/android/R.layout.html Jan 03 16:52:17 lov: I've tried the styles thing and the text does fit, the dropdown text is really small Jan 03 16:52:42 lov: I'm trying not to specify textsize for each also, because that seems like a guess and check sort of thing Jan 03 16:56:35 lov: here's the screenshot by changing to the styles i showed in the pastebin http://tinypic.com/view.php?pic=2urmkuq&s=6 Jan 03 16:56:49 lov: and the text is super small, lol Jan 03 17:17:47 ....Oh eclipse how I hate you Jan 03 17:19:36 netbeans and nbandroid :D Jan 03 17:19:47 terminal and vim! Jan 03 17:21:22 http://bit.ly/vYIWaQ !!! Jan 03 17:26:50 hi Jan 03 17:27:08 Q: I want to learn Java, so I can learn Android. I've been thinking about buying a book. Something with small exercices practicing at most 1 hour a day would be ideal, but didn't find nothing like that. Any tips ? I found this site http://javabeginnerstutorial.com/core-java/ Jan 03 17:29:07 IntelliJ Jan 03 17:29:08 ! Jan 03 17:30:16 shwaiil if you have programming experience, just dive right into android, i did the same learning java as i went along Jan 03 17:30:23 it's really not that complex Jan 03 17:30:48 xorgate: oh great : ) so yeah, it actually looks familiar Jan 03 17:31:01 then again i've been coding for 25 years Jan 03 17:31:07 ahh lol Jan 03 17:31:08 not here Jan 03 17:31:32 yeah, you need a book. Jan 03 17:32:30 * AmandaC drags a box of books over to shwaiil Jan 03 17:33:01 I don't have much time for "books"... a book would be nice or a site with daily exercices Jan 03 17:33:03 or something Jan 03 17:33:21 i'd say just do the android notepad tutorial Jan 03 17:35:16 work day done, I'm outta here. Jan 03 17:36:04 shwaiil : you have timem for books. Jan 03 17:36:21 because if you have time to sit and learn Java from a website, you have time to do so from a book Jan 03 17:37:06 Pfhoenix: yes, what I mean is practice from a good source for a beginner would be nice Jan 03 17:37:14 Books are overrated Jan 03 17:41:18 can I change the spinner item depending on android version via xml? Jan 03 17:42:10 Q: Anyone using Sublime Text with Java ? :T Jan 03 17:42:42 shwaiil: I do Jan 03 17:43:01 Hello, Can anyone tell me if there is an error in this line of code? Jan 03 17:43:02 textView.setText(String.valueOf((cToFahrenheit(inputValue))) + " Fahrenheit"); Jan 03 17:43:14 now, the cToFahrenheit function returns a Float Jan 03 17:43:25 when clicking the button, the text does not change at all. Jan 03 17:43:25 dysoco: javac could probably tell you that Jan 03 17:43:30 AmandaC: are you using a plugin or something ? Jan 03 17:43:33 but there is no compile error Jan 03 17:43:37 shwaiil: yes Jan 03 17:43:51 AmandaC: can u share the name of that plugin ? Jan 03 17:43:54 any clues why context.getResources().getIdentifier("map_tiles", "raw", context.getPackageName()); won't work on my system? :\ Jan 03 17:44:00 shwaiil: "SublimeJava" Jan 03 17:44:05 Thanks : D Jan 03 17:44:29 svearike: "won't work" provides us with zero information Jan 03 17:44:51 evanc returns the error code 0 Jan 03 17:44:56 AmandaC: for a beginner is it ok to start with Sublime or should I stick with horrible and slow Eclipe or Netbeans ?! Jan 03 17:45:12 shwaiil: depends on your previous programming experience Jan 03 17:45:22 web development Jan 03 17:45:43 shwaiil: if you have none, in any language, yoiu're better off usign an IDE to start, just to learn the ropes Jan 03 17:46:39 AmandaC: I disagree. When you're first learning a language, I think it's better to use a basic text editor, so you learn all the ropes. Once you have them down, then use an IDE to speed things up Jan 03 17:47:14 why is android used with IDE like netbeans or eclipse, and not with a text editor like sublime ? Jan 03 17:47:27 One is realistic, the other idealistic Jan 03 17:47:36 :) Jan 03 17:47:49 ;p Jan 03 17:48:04 n/m build clean cleared it all up Jan 03 17:52:08 * AmandaC uses Sublime for her development just fine Jan 03 17:52:37 I'm wondering why ppl recomend eclipse or netbeans Jan 03 17:52:41 doens't make sense Jan 03 17:53:05 Look into the functionality an IDE offers, versus a text editor. Jan 03 17:53:14 it makes a _lot_ of sense. Jan 03 17:53:41 Then figure out what you're most comfortable with Jan 03 17:53:43 Then use that Jan 03 17:53:45 dysoco: I'd sooner suspect a non-assigned onclicklistener or sometbing. Jan 03 17:53:51 And disregard what everyone else uses Jan 03 17:54:01 right Jan 03 17:54:15 TheTrash, it's not: If I do: textView.setText("Foobar"); it DOES work. Jan 03 17:54:27 so I'm guessing I might be casting to String wrongly or something related. Jan 03 17:59:50 Aide is so boss i still cant get over it Jan 03 18:01:00 Aide? The Android IDE? Jan 03 18:01:14 shwaiil: Once you get based the really, really simple "hello world" programs, a fully-fledged IDE is indespensible. Jan 03 18:01:44 I usually run Emacs for writing code: But I realized writing Java code without a proper IDE is impossible, let aside Android development. Jan 03 18:01:47 IDEs will actually understand your class layouts, and your program structure, and will do things like "show me everyone that calls this function" and "who extends this class?" Jan 03 18:02:10 Yes dysoco , it rawks hard Jan 03 18:02:20 doing serious development on a simple text editor is technically possible but masochistic. Jan 03 18:02:32 I have a ListView with very complex items. Custom Views to be exact. They have a getView() method which do an inflate(). Should I cache the resulting View or call inflate() each and every time? Jan 03 18:02:34 brx_, I've a small phone and it's impossible to use it in there, but I guess it might be nice for a tablet. Jan 03 18:02:58 I dont have to take my laptop out all the time. Oh, its good on nexus Jan 03 18:03:10 shwaiil: as far as introductions to java, you might want to ask in #java for recommendations. If you have experience with other programming languages, there might be books like "Java for XYZ programmers" which won't rehash the absolute basics Jan 03 18:03:39 lov: thanks : ) Jan 03 18:03:53 I'm going home and I'll setup the environment to start dev Jan 03 18:03:55 tks guys : ) Jan 03 18:04:17 Thinking in Java is awesome. Jan 03 18:04:30 A bit dull thouh. Jan 03 18:10:54 lov: Sublime is far from a simple text editor, I get complete code completion, and it even, admittadly through a bug, reminds me when I forget an import ( the completion doesn't work. ) Jan 03 18:11:23 and as for "Everything that calls this" - grep. :P Jan 03 18:12:17 But in the end, it really does all come down to taste Jan 03 18:13:37 I'd rather do a right and a left mouse click, and then get a nice list I can double click to go straight to where it's used ;d Jan 03 18:13:40 I have a listview. I used listSelector and choiceMode set to single choice. But when I touch an item on the listview all the list gets selected. What could be the problem? Jan 03 18:17:49 AmandaC: Sublime is neat, I use it too, but I don't think it's the same as something like eclipse. Jan 03 18:18:11 hello all Jan 03 18:18:27 lov: it has to bve for me, Eclipse is too huge for my poor little netbook. :P Jan 03 18:18:41 but I honestly don't miss IDEs that much Jan 03 18:18:42 I'm getting an error report from a user on a Samsung GT-I9003 phone where it's trying to load Google Maps: http://pastebin.com/GNwthgz8 Jan 03 18:18:49 is that error because Maps is not installed on their phone? Jan 03 18:19:01 QubeZ: pretty much. Jan 03 18:19:30 let that be a lesson to check for the existence of other applications if you plan on using explicit intents for something you down't own. Jan 03 18:19:33 *don't Jan 03 18:19:57 *nod* guess I was naive in thinking Maps will be on any Android phone (even with custom roms) Jan 03 18:20:18 AmandaC, exuberant ctags + vim works wonderfully Jan 03 18:20:19 it will be on 99.9% of them, but not 100% Jan 03 18:20:35 QubeZ: ive often seen helper libs, that will check to see if the target app exists, and offer to open the market to get it Jan 03 18:20:44 QubeZ: and if it can be found, the lib will deliver the intent Jan 03 18:20:47 Will play store even let the user install if their device doesn't have the maps library Jan 03 18:20:58 dunno anything about sublime Jan 03 18:21:12 a coworker mentioned sublime to me once a long while ago Jan 03 18:21:24 this phone, based on the ACRA report is location-aware, has GPS, navigation etc.. Jan 03 18:21:33 not sure why Maps is not on their phone but I'll use PackageManager to check Jan 03 18:22:48 SimonVT: yeah, i have had trouble just trying to side-load my online banking app, due to the 'find local ATM' feature, it needs the maps lib Jan 03 18:22:54 so the entire app fails to even install! Jan 03 18:22:59 great idea!..... Jan 03 18:23:10 pfn: I grew tyired of vim awhile ago Jan 03 18:23:40 * pfn shrugs Jan 03 18:23:50 unless a text editor has vi-like keybindings, I won't use it Jan 03 18:23:55 hello. I'm writing a widget. Can I trust the update time in the widget xml file? Or should I use alarm manager? Jan 03 18:24:15 * AmandaC still uses it for remote editing, but that's just because she's too lazy to spin up a sshfs every time Jan 03 18:24:34 then again, you run a hackintosh, so your taste is questionable ;-) Jan 03 18:25:22 nothing wrong with a hackintish Jan 03 18:25:29 pfn: no I don't? Jan 03 18:25:35 I have 2, also have a few macs too Jan 03 18:25:39 AmandaC, you said eclipse is too heavy for your netbook Jan 03 18:25:48 pfn: so? Jan 03 18:26:10 so you use sublime instead, no mac netbooks, so it must be a hackintosh Jan 03 18:26:11 pfn: it's code window is too small because of all the fucking UI elements they stuff into the IDE Jan 03 18:26:13 Ghiottone: the xml way works for me, i think minimum interval is 30 mins though Jan 03 18:26:26 pfn: Sublime is Win-Mac-Linux these days Jan 03 18:26:29 QubeZ: location aware != google apps Jan 03 18:26:35 AmandaC, you can maximize the code windows Jan 03 18:26:52 AmandaC: while still quite heavy on memory, IntelliJ does feel more responsive Jan 03 18:26:52 QubeZ: bear in mind that manufacturers need to be given permission from google to use the google apps. There are devices that ship without google apps, even though they could technically run them. Jan 03 18:26:57 and has less UI clutter Jan 03 18:27:03 This is also why you need to install custom roms w/o the google apps, and then install them afterward. Jan 03 18:27:11 Eclipse is driving me mad with all its hidden menus Jan 03 18:27:16 lov: ok Jan 03 18:27:20 hidden? Jan 03 18:27:38 yes, seems it can have its own variables defined in it Jan 03 18:27:52 which are complementary to environment vars Jan 03 18:28:21 (I'm doing NDK atm, and it's been quite the frustrating experience so far) Jan 03 18:28:42 clever: It sounds perfectly reasonable that it fails at install, instead of runtime Jan 03 18:29:00 SimonVT: and what if i never plan to use the 'find ATM' feature, i simply want to do actual online banking? Jan 03 18:29:10 i'm forced to root the device just to do that :P Jan 03 18:29:14 belgianguy: I used that for awhile, but I get antsy when I type a word and it takes 40 seconds for it to appear Jan 03 18:29:27 You're forced to get a proper device ;d Jan 03 18:29:39 SimonVT: that also works Jan 03 18:29:50 AmandaC: then you'd need a more lightweight IDE, or a more potent device :) Jan 03 18:30:04 SimonVT: as it is right now, the app store it came with wont even install free apps, says my billing address is wrong Jan 03 18:30:23 Sounds trustworthy :p Jan 03 18:30:25 I'm on 1600 x 1050 and still Eclipse manages to slurp up quite a bit of screen estate Jan 03 18:30:36 brx_, I know. 30 mins for a widget are reasonable for me. thanks Jan 03 18:30:39 SimonVT: the problem is that i'm not in usa Jan 03 18:30:44 belgianguy: I went for the former, I don't need a shiny button to launch a program, esp since I've converted all my personal code over to the new build system they cameout with, not tied to any IDE, yet Jan 03 18:31:04 SimonVT: its the same as the netflix 'free' trial needing a credit card, they are expecting you to forget, and get dinged Jan 03 18:31:06 * pfn just does sbt ~android:install Jan 03 18:31:13 and code just automatically runs with every edit Jan 03 18:31:20 if I need that Jan 03 18:31:24 er, sbt ~android:run Jan 03 18:32:16 AmandaC: what IDE are you using then atm? Jan 03 18:32:36 i had to sideload a bank app because i have a canadian bank account, but i live in the US, and they filter out other countries from the play store ~_~ Jan 03 18:33:37 canadiancow: in my case, its an american kindle (they refused to even ship to canada), and my bank has never put it on the amazon app store Jan 03 18:34:09 canadiancow: so how would a non-techie do/know that? Jan 03 18:34:53 Learn a new programming language https://github.com/munificent/vigil Jan 03 18:35:13 A non-techie would probably have a canadian sim card in their device, and not have an issue Jan 03 18:36:32 belgianguy, what? Jan 03 18:36:40 SimonVT, not really Jan 03 18:36:59 if you move to a new country, you're probably going to switch providers Jan 03 18:37:15 canadiancow: people living close to a border might run into these issues Jan 03 18:37:24 unlikely Jan 03 18:37:33 ok i still have the same question from (my) yesterday, I'm having trouble inflating a layout to a custom view, and have tried everything over the course of a couple of hours, nothing really works for me, the view shows, but not with the inflated stuff...anyone done this before ? Jan 03 18:37:57 couple = +5 hours Jan 03 18:38:03 so not really a couple Jan 03 18:38:16 2 couples and a half Jan 03 18:38:24 yeah thats more like it Jan 03 18:39:51 belgianguy: none, anyway, I've got to go, bbl Jan 03 18:43:57 StingRay_, paste all your code/layouts/etc Jan 03 18:43:59 pastebin* Jan 03 18:44:12 k Jan 03 18:45:38 http://pastebin.com/rfpU4vuA Jan 03 18:45:42 http://pastebin.com/DS2rwpnn Jan 03 18:46:05 tried many different suggested ways to inflate associate the layout Jan 03 18:46:21 lots of stackO and they dont seem to work for me Jan 03 18:46:35 tried extending VG RL LL Jan 03 18:47:14 I set the bg col of the view and it shows in eclipse ui editor, and my app Jan 03 18:47:17 ok Jan 03 18:47:18 so Jan 03 18:48:21 Protip: Instead of duplicating code in two constructors, have the first simply call this(context, null) Jan 03 18:48:31 replace everything from "View view = inflater.inflate(R.layout.element_switch, this);" to "this.addView(view);" with "inflater.inflate(R.layout.element_switch, this);" Jan 03 18:48:47 Protip #2: Follow naming conventions Jan 03 18:49:09 remove onMeasure() Jan 03 18:49:21 i dont trust that you know what you're doing there Jan 03 18:49:35 if you want to specify a width/height, do it in the xml Jan 03 18:52:14 Hi. Can someone help me? I want to have a listview to work within a swipe tabs fragment. How do I do that? I have started out with http://www.sourcetricks.com/index.php/category/android-fragments-example/ and it works just fine. I have now tried to add a swipe tabs view without knowing how, have tried. It does works, I can se the listview, but I can not click on a list item and get that detailed view. Can someone pleas help me? Jan 03 18:53:45 sure i did this b4 but now it seems to work Jan 03 18:54:10 out of interest what supplies the inflated viewGroup with layoutParams ? Jan 03 18:54:11 mhmm Jan 03 18:54:34 it would take default params from the parent Jan 03 18:55:04 is that always the case on any inflate and attach or only when extending a view ? Jan 03 18:58:50 When you supply the layoutinflater with a container, it can create the right layoutparams for your view based on what you set in xml.. if you don't, default layoutparams are generated when it's added Jan 03 19:06:05 mooo Jan 03 19:10:24 birbeck, you're not a cow Jan 03 19:11:05 you're uscow Jan 03 19:11:09 mikedg is americancow Jan 03 19:11:11 sigh Jan 03 19:11:45 you should be flattered, everyone wants to impersonate you Jan 03 19:11:50 i suppose Jan 03 19:22:20 has anyone seen ldpi devices pull xhdpi resources rather than mdpi? i'm seeing crash reports from ldpi (120dpi) devices on loading a nine patch from res/drawable-sw720dp-xhdpi, when there is a drawable-sw720dp-mdpi that probably would scale down better (1 pixel nine patch at xhdpi causes IllegalArgumentException width and height must be > 0 at ldpi it seems) Jan 03 19:23:24 I like to eat cows. Jan 03 19:23:32 And drink cows. Jan 03 19:23:33 all reports seem to be from 4.0, I only target 4.0+ but it means it seems to have been fixed in jellybean. Jan 03 19:23:46 Are there any things in Android that are singletons ? Jan 03 19:23:46 I even wear cows sometimes. Jan 03 19:24:08 (on a per-application basis) Jan 03 19:31:30 maslen: why ? Jan 03 19:41:22 just wondering Jan 03 19:49:47 maslen: yes Jan 03 19:52:05 any reason why my widget layout is being forced to 4x2 instead of the intended 4x1? http://pastie.org/5617575 Jan 03 19:52:25 kevinb, i just make sure everything's at least 2 pixels :P Jan 03 19:52:34 pragma-, you want to do WHAT to me? Jan 03 19:52:53 canadiancow: pragma-'s real name is ed gene Jan 03 19:52:59 Huh, what do you know.. If you don't set minSdkVersion/targetSdkVersion to at least 4, View#getWidth() will return 320 on a gnexus Jan 03 19:53:00 gein* Jan 03 19:53:15 yes Jan 03 19:53:19 maslen : yes Jan 03 19:53:26 because prior to 4, all devices were 480x320 mdpi Jan 03 19:53:28 any class you have that has only static methods and members is a singleton Jan 03 19:53:39 not really Jan 03 19:54:04 with a private constructor, sure Jan 03 19:55:00 canadiancow: I only just found out because I forgot the uses-sdk tag Jan 03 19:55:00 that's not a singleton Jan 03 19:55:06 my touch handling was acting very weird Jan 03 19:55:06 that means no instances exist, Pfhoenix Jan 03 19:55:11 +1 Jan 03 19:55:15 one sure as heck does, though Jan 03 19:55:20 Pfhoenix: no it doesn Jan 03 19:55:24 the members exist Jan 03 19:55:26 has to if you're saving to the members Jan 03 19:55:29 doesn't mean that there's an instance of a clas Jan 03 19:55:30 LOL Jan 03 19:55:30 the object exists Jan 03 19:55:32 class* Jan 03 19:55:37 no it doesn't Jan 03 19:55:40 go look up what static means Jan 03 19:55:41 the class object exists Jan 03 19:55:50 then where do the members reside? Jan 03 19:55:56 in what memory space? Jan 03 19:56:02 I have a ListView with custom views as items. They contain an EditText. I want that even if I click on the EditText, that the ListView.OnItemClickListener's onItemClick() is called. Jan 03 19:56:04 the class object Jan 03 19:56:15 But it appears that the EditText, even when not focusable, steals the click even. Jan 03 19:56:17 public class LOL { private LOL() {}; public static LOL new() { return new LOL(); } } Jan 03 19:56:21 guess what, not a singleton! Jan 03 19:56:28 only static members! private constructor! Jan 03 19:56:46 ok but in that case you have multiple instances Jan 03 19:57:02 and im not sure you can name a method new() :P Jan 03 19:57:15 whatever Jan 03 19:57:33 i think hes talking about a class like that without the new() method Jan 03 19:57:37 nothing every instantiates it Jan 03 19:57:50 s/every/ever/ Jan 03 19:57:54 yeah, but a private constructor doesn't mean that nothing can ever instantiate it Jan 03 19:57:57 You're welcome Jan 03 19:58:02 I know what he thinks he's talking about, but he's still wrong Jan 03 19:58:28 hey canadiancow, SimonVT Jan 03 19:58:30 long time Jan 03 19:58:38 you sound familiar Jan 03 19:58:41 are you the montreal guy Jan 03 19:58:50 nope, UK Jan 03 19:58:55 but thanks for trying ;) Jan 03 19:58:57 :P Jan 03 19:59:05 hah Jan 03 19:59:09 Hello Jan 03 19:59:13 Why does the EditText still consume the click? Jan 03 20:00:10 just thought i'd shove this in the channel, quite nice implementation of the sticky list headers idea. The contacts app sould use this, way simple in comparison. https://github.com/emilsjolander/StickyListHeaders Jan 03 20:00:35 found it by accident while browsing jakes github feed Jan 03 20:01:17 is the contacts implementation not simple? :\ Jan 03 20:01:28 not that i remember Jan 03 20:01:37 very overcomplicated Jan 03 20:01:41 No, it's horrible Jan 03 20:01:45 lol Jan 03 20:01:51 i have a ContentProvider, and I always call notifyChange on the Uri after insert, update, & delete. If I'm applying a batch in a transaction, is there a way to postpone the change notifications until after the transaction succeeds? Jan 03 20:01:53 thats one way of putting it Jan 03 20:02:45 it's open source, right? Jan 03 20:02:55 you could go and submit a fix :P Jan 03 20:02:57 yup part of the AOSP repo Jan 03 20:03:54 well, this isnt my code, just located it, but ive already fixed a few things, so will submit a pull request to this emilsjolander chap Jan 03 20:04:03 Hmm, is the EditText not bubbling up the Touch event? Could that be? Jan 03 20:04:52 i see another problem, that im working to fix, you cant have transparent headers with this method, but i see a workaround Jan 03 20:05:50 You either act on a touch event and consume it, or do nothing and let someone else handle it Jan 03 20:06:53 canadiancow, SimonVT, would be nice to get your opinions on an app I was the lead on Jan 03 20:06:55 https://play.google.com/store/apps/details?id=com.tdameritrade.mobile3 Jan 03 20:07:02 just got into the play store Jan 03 20:07:26 People always think I'm mean when I give my opinion on apps Jan 03 20:07:53 it looks better than the td canada app Jan 03 20:07:55 :( Jan 03 20:08:26 hopefully they will add more features and finally get rid of the old apps Jan 03 20:08:40 https://play.google.com/store/apps/details?id=com.td Jan 03 20:08:46 it already got 3.1 / 5 reviews Jan 03 20:08:53 Napalm, did you go see the ny fireworks in london? Jan 03 20:09:02 hey pfn Jan 03 20:09:05 I saw them on bbcone, they looked great Jan 03 20:09:14 (the youtube vid) Jan 03 20:09:16 nope Jan 03 20:09:19 link me :D Jan 03 20:10:02 http://www.youtube.com/watch?v=4e8vfRTsFU4 Jan 03 20:10:15 so, apparently class object storage is handled differently per JVM Jan 03 20:10:28 class object storage? Jan 03 20:10:41 pfn : older conversation on singletons Jan 03 20:10:51 so, having a static class isn't a singleton Jan 03 20:12:54 evanc : I stand corrected, so thanks Jan 03 20:13:12 pfn: i was in a club when all those fireworks went off, looks like it was good though Jan 03 20:13:14 that being said, is there a downside to using a static-only class over a singleton? Jan 03 20:13:38 #pedant remember also that the DVM is not a JVM :) Jan 03 20:14:01 Pfhoenix: what do you mean by 'static only class'? Jan 03 20:14:28 how is static only comparable to what a singleton does Jan 03 20:14:38 if you don't need member variables.. go static? Jan 03 20:14:42 a singleton is an instance Jan 03 20:14:45 that enforces only one instance Jan 03 20:14:53 I know what a singleton is. Jan 03 20:14:57 a static-only class isn't an instance Jan 03 20:14:59 ohh, you want only static methods, variables Jan 03 20:15:44 well, with a singleton you still have normal constructor behavior etc Jan 03 20:16:00 and you can, if you want, also allow destruction of the singleton instance Jan 03 20:16:05 Napalm: Swiping in the activity that opens up when you click a stock is really strange Jan 03 20:16:31 SimonVT: nope, its not the activity, its just the "chart" view Jan 03 20:16:36 It doesn't work when the touch event starts in the chart Jan 03 20:16:38 I still don't see the point of creating an instance without state requirements Jan 03 20:16:41 But sometimes it does Jan 03 20:16:49 SimonVT: thats not my fault, something that wasnt in my control Jan 03 20:16:53 :( Jan 03 20:16:56 pfft Jan 03 20:17:03 Excuses Jan 03 20:17:04 i tried Jan 03 20:17:07 honest :'( Jan 03 20:17:25 Why does it happen? Jan 03 20:17:25 hello. I have a widget with a listview that is not supported on android < 3.0 Jan 03 20:17:37 ;D Jan 03 20:17:40 Is there a way to support android 2.x ? Jan 03 20:17:42 SimonVT: you dont want to know Jan 03 20:17:53 Ghiottone: no Jan 03 20:17:55 I mean, it would be enough if the widget did not show in 2.x Jan 03 20:18:12 Ghiottone: android:enabled="@bool/showThisWidget" Jan 03 20:18:22 Put a bool in values/ and values-v11/ Jan 03 20:18:34 megahax Jan 03 20:18:48 SimonVT, looks a simple and fast way! gonna try it right now, thanks! Jan 03 20:19:09 SimonVT: nice solution Jan 03 20:19:10 * preds puts "size" in values-large/string / values-xlarge/string Jan 03 20:21:57 one day I'll type minsdk 15 into a manifest Jan 03 20:22:01 and it will be a sweet day indeed Jan 03 20:22:43 Hi there, on one of my startActivity(…), I want to disable fullscreen mode (with statusbar) when that activity starts up. "addFlags(FLAG_FORCE_NOT_FULLSCREEN); & clearFlags(FLAG_FULLSCREEN);" seems to do the job, but does it animated. This causes the activity to be displayed in fullscreen-mode, and then moved down to make space for the statusbar. Any way I can disable this animation? Jan 03 20:22:52 And that day, your current target will be 20 and api15 will be missing tons of stuff Jan 03 20:23:17 are there any docs on writing an app that requests and uses root permissions? or even just the shell user permissions? Jan 03 20:23:32 still, doubt it will be as bad as the difference between 8 and 15 Jan 03 20:23:35 SimonVT, it won't be missing sw800dp :) Jan 03 20:24:03 which is the source of a lot of fucking around for me at the moment Jan 03 20:24:42 I'm still not sure what to make of square displays, my app doesn't work properly in them.. and I don't give a shit, are they even still being made Jan 03 20:24:53 seems like all the crazy devices are <2.3 Jan 03 20:25:40 lawltoad: root is not supported by the platform, on rooted devices you spawn a process for the "su" command and the super user app will present the user with the permission request Jan 03 20:25:43 Meh, just don't support <3.2 tablets Jan 03 20:25:49 They're crap anyway Jan 03 20:26:40 SimonVT, I ended up having to remove the xlarge for <3.2 tablets, they get a 7" optimised and can thank primarily Samsung for that Jan 03 20:27:03 i need to move to fragments and optimize for tablets Jan 03 20:27:07 Nook devices also report as xlarge on a 7" Jan 03 20:27:07 so far behind Jan 03 20:27:34 learn to love sw600 Jan 03 20:28:02 SimonVT, doesn't work. Widget shows up in android 2.2 Jan 03 20:28:23 Ghiottone, it does work, you haven't implemented correctly Jan 03 20:28:43 Ghiottone: Then you're not doing it right :p Jan 03 20:29:05 preds, Do I need to name the xml files in a specific way? I used defines.xml for the boolean resource Jan 03 20:30:01 No, xml filenames in values/ doesn't matter Jan 03 20:30:23 Ghiottone, http://developer.android.com/guide/topics/resources/more-resources.html Jan 03 20:30:28 see the bool example Jan 03 20:31:02 preds, yes I used that one Jan 03 20:31:30 You of course have to set the bool in values/ to false, and the one in values-v11/ to true Jan 03 20:32:04 Napalm, so my program has to IPC its work over to a SUd process? what would that look like? you cant exactly call suid for a java thread Jan 03 20:32:44 SimonVT, yes, double and triple checked again Jan 03 20:32:56 I'm going to try to restart eclipse Jan 03 20:33:00 is your device 2.2? Jan 03 20:33:06 preds, yes Jan 03 20:33:09 don't restart eclipse, run clean Jan 03 20:33:18 preds, already tried Jan 03 20:34:22 and now I will try' Jan 03 20:35:34 still no luck Jan 03 20:35:58 is it possible to use an xml-v11 folder ? Jan 03 20:36:09 let me test this myself Jan 03 20:36:34 Try and uninstall your app first Jan 03 20:36:43 Android might cache or something Jan 03 20:36:45 I don't know Jan 03 20:36:47 It definitely works Jan 03 20:38:50 tried uninstalling too. I'll now try to uninstall and reboot Jan 03 20:39:37 lawltoad: not exactly, its simply issuing commands as root, your java process itself never "becomes" root as-in what setuid would do Jan 03 20:41:53 hrmm, didn't work for me actually Jan 03 20:42:28 did not work even after uninstal - reboot - install Jan 03 20:43:22 So I'm working on a Service that can be used by two things: Notification OR a Fragment. Do I have to pass the class before calling the Intent if I need to? Jan 03 20:43:49 or should I set up a "displayNotification" function in the Fragment class and call that if the Fragment isn't viewable? Jan 03 20:46:20 Ghiottone, actually.. what are you trying to achieve? Jan 03 20:46:35 hiding the widget entirely? Jan 03 20:46:54 preds, I have two widgets in my app, a small one with a single item and a big one with a listview Jan 03 20:47:23 the listview is supported only from Honeycomb. What I need is to prevent the big widget from showing up in the widget list Jan 03 20:47:54 so.. you want to hide it right, not actually change its enabled state Jan 03 20:48:29 preds, I don't know the difference, actually Jan 03 20:48:33 so, same advice, but use ints instead of bools Jan 03 20:48:47 Ghiottone: you were already told how to do that Jan 03 20:49:10 and use android:visibility="@integer/show_big_list" Jan 03 20:49:20 Don't do that, no Jan 03 20:49:28 Well, answered my own question: Get the Activity or Notification and write it inside the Activity itself. Jan 03 20:49:38 First off, the receiver tag doesn't have a visibility attribute Jan 03 20:50:40 is he putting this on a view or a receiver? Jan 03 20:50:52 His receiver, in the manifest Jan 03 20:51:02 bleh, I missed that part Jan 03 20:51:11 got it Jan 03 20:51:15 * preds walks away Jan 03 20:51:16 At least I hope so Jan 03 20:51:33 SimonVT, actually I put android:enabled in the widget xml file Jan 03 20:51:43 * AmandaC facepaw Jan 03 20:51:58 After moving it to the manifest it worked. I'm about to double check on an android 4 device Jan 03 20:53:34 great, it works now Jan 03 20:53:51 SimonVT, preds thanks a lot for your help! Jan 03 21:00:03 Also, what do I do if the user doesn't have an SDCard? Should I bother storing data in the internal storage? The later devices don't come with externalStorage and my Xoom (even though it has a lot of internal storage) won't save an image to getExternalFilesDir(). How would I know if it's a viable option to store into internal storage? Jan 03 21:00:24 is it a lot of data? Jan 03 21:00:30 If so, please don't store it to internal storage. Jan 03 21:00:45 Let's assume it is. It'll be images from Camera and Audio messages recorded (and text). Jan 03 21:00:49 You could always take a look at how much storage space is available and make the determination for yourself. Jan 03 21:00:54 yeah Jan 03 21:02:37 I'm worried it'll affect my app negatively. I shouldn't need to require an sdcard to use a chat app. Perhaps I should just disable functionalities that use the sdcard when the sdcard is not present? Will getExternalFilesDir() ever update itself in later APIs? Jan 03 21:03:35 http://developer.android.com/reference/android/os/Environment.html Jan 03 21:03:44 try some of those apis Jan 03 21:03:49 oo thanks Jan 03 21:04:24 http://developer.android.com/guide/topics/data/data-storage.html#filesExternal Jan 03 21:04:29 Check if external storage is available Jan 03 21:04:33 ^^ Jan 03 21:04:45 and yeah, you can disable functionality for lack of space. Jan 03 21:07:42 on devices like hte Xoom / Galaxy Nexus / etc getExternalFilesDir() points to the internal large disk Jan 03 21:07:50 hello, what method do you guys recommend for storing my public key, for in-app billing? Jan 03 21:07:55 (and remember that storage state can change from one minute to the next) Jan 03 21:07:58 via a FAT-filesystem FUSE layer that lets them coexist on the same physical volume Jan 03 21:08:43 And yeah, external storage doesn't necessarily mean sd card Jan 03 21:08:47 beastmanrage, I personally have put a bks encoded public key in /raw Jan 03 21:09:18 Is there a way to have a transparent overlay view that does not allow clickthroughs? Jan 03 21:10:07 ctate: So on devices that have a useful (large enough) storage space, getExternalFilesDir() will handle it automatically? Jan 03 21:10:09 kakazza, have the overlay capture the click and not pass it on Jan 03 21:11:13 beastmanrage: It's a public key so it's not something you need to be worried about in the wrong hands (much). You can store it any way you'd like. I personally use the sharedPrefs() to store the public key for an app. However, if you're talkin certifications, I think you should look into the KeyStore Jan 03 21:11:44 preds: Thanks. I should elaborate more. Jan 03 21:12:10 I have a ListView and its items contain EditTexts. I can click wherever I want and onItemClick gets called, but not when I click inside the EditText. Jan 03 21:12:35 beastmanrage, KeyStore ks = KeyStore.getInstance("BKS"); InputStream in = context.getResources().openRawResource(R.raw.bks_truststore); ks.load(in, "mypassword".toCharArray()); Jan 03 21:12:38 I did not find a way to not 'steal' the click event from the ListView item, so now I'm trying to overlay it. Jan 03 21:12:57 Another problem I am facing is, that I cannot call onItemClick myself :\ Jan 03 21:13:23 lighthazard: yes Jan 03 21:13:34 kakazza: dont' do that :) Jan 03 21:13:57 Do what? Jan 03 21:14:01 also hm, the click shouldn't be stolen if you return the right thing from your click listener, to claim that you didn't handle it Jan 03 21:14:07 dont' call on*() callbacks yourself, in general Jan 03 21:14:25 The EditText does not have click listeners at that point. Jan 03 21:15:27 totally cbf thinking about your problem kakazza, but stealing a click event is easy by implementing an ontouchlistener that returns true for anything Jan 03 21:17:24 ? Jan 03 21:17:41 So the EditText inside the custom view should override that? Jan 03 21:17:56 what's the behavior you want, exactly? touching inside the edittext should *sometimes* let you manipulate the list, but other times should let you manipulate the edittext? Jan 03 21:18:33 Never manipulate the EditText, always manipulate the list. Jan 03 21:19:27 I found this https://code.google.com/p/android/issues/detail?id=3414#c33 and I am not sure if what I want can be done. Jan 03 21:19:33 And how do you manipulate the edittext? Jan 03 21:19:36 #27 and #31 suggested solutions. Jan 03 21:20:22 sonOfRa: Not at all. Let me try to explain, this is only a dialog which lists all possible list items (all custom views). Once you click on such an item, it gets added to the actual list. Jan 03 21:20:31 Any idea why my EditText:Hint wouldn't go away? Jan 03 21:20:51 So of course the layout of both should look the same, but the EditTexts consume the touch event (or so it seems). Jan 03 21:20:54 http://stackoverflow.com/questions/14098597/edittext-fails-to-resize-and-hint-does-not-go-away - screenshot included Jan 03 21:20:58 lighthazard, it stays there after you typed something? Jan 03 21:21:05 yup Jan 03 21:21:09 that looks bad, wtf Jan 03 21:21:15 RIGHT?! Jan 03 21:21:16 No idea why. Jan 03 21:21:18 why use an EditText then instead of a non-editable TextView? Jan 03 21:21:39 That's not to me, that's for kakazza Jan 03 21:22:21 In the actual ListView where I add that item to, it's an EditText. The idea is to have both look the same instead of having one layout with a TextView and white background and one EditText that looks completely different. Jan 03 21:22:36 sonOfRa: It's odd.. it works fine in the Galaxy Note emulator and also works fine on a Motorola XOOM. However, when it's a a Droid RAZR or Nexus 7, it gives that error. Jan 03 21:23:51 Maybe because I use my RelativeLayout as a Fragment? Jan 03 21:24:00 It looks like you have two edittexts and two buttons Jan 03 21:24:24 nah, that's only because i was stupid and made the button layout to top of the textedit and the bottom Jan 03 21:24:29 So redrawing no the fly messed it up Jan 03 21:25:07 ctate: I know I could use a TextView in that list and an EditText in the other. But if possible, I'd like to use an EditText in both. Jan 03 21:25:31 I know tried with an onTouchListener returning true all the time. Still no reaction. Jan 03 21:26:24 kakazza: you could simply call setEnable() to false on the EditText? Jan 03 21:26:58 Did, doesn't work either. Still not called. Jan 03 21:27:20 kakazza: and setRawInputType()? Jan 03 21:27:44 I don't know that function. What is that going to do? Jan 03 21:27:56 read the docs and see Jan 03 21:27:58 I see in logcat, even on the disabled EditText the onTouchEvents Jan 03 21:29:24 I'm not sure how the input type is going to help me with the events? Jan 03 21:29:57 Try android:focusable="false" Jan 03 21:30:21 I have focusable false, clickable false, focusableInTouchMode false. Jan 03 21:30:40 SimonVT: i wonder if he's simply trying to get the selector to work on a per item, without the touch event being eaten by the editext Jan 03 21:31:38 Yes. If I click inside the EditText I don't want ANYTHING to happen. Not manipulate it at all. It's just supposed to be a 'Preview' of the item that is going to be added to the actual list. Jan 03 21:32:20 you want nothing to happen? Jan 03 21:32:22 Instead in this Preview&Add mode, I - no matter where I click on the list item or its children - to always have ListView events be called. In this case onItemClicked Jan 03 21:33:42 canadiancow: Good point. I do want SOMETHING to happen. Namely, not have the EditText eat the event but let the ListView handle the event. Jan 03 21:34:13 kakazza: is each of your listview item's simply a edittext:? Jan 03 21:34:28 TextViews and EditTexts Jan 03 21:34:35 kakazza: if so, wrap them in FrameLayout and call setDescendantFocusability programmically depending on your edit state Jan 03 21:34:51 sonOfRa: Updated a picture: http://stackoverflow.com/questions/14098597/edittext-hint-doesnt-go-away Jan 03 21:35:07 so I can't use your EditTexts to copy/paste or move the cursor around? rated 1 star and uninstalled. Jan 03 21:35:11 Sometimes Spinners (which works just nicely, I press on the Spinner, the ListView.OnItemClickListener::onItemClick is called. Jan 03 21:35:16 The only problem is with EditTexts Jan 03 21:35:46 Call setDescendantFocusability on what? Jan 03 21:35:57 the Frame Jan 03 21:36:07 the FrameLayout Jan 03 21:36:22 so the FrameLayout steals the focus and the EditText never recevies it Jan 03 21:36:28 or even simplar Jan 03 21:36:29 pragma-: Preview mode. Once you added it (which you can't, because the click is not registered), you can edit, copy, move cursors all you want. Jan 03 21:37:06 extend the EditText class with one that has another state that changes the getDefaultEditable Jan 03 21:37:19 I'm not sure it's about focus. Even if I disable the focus, make it clickable:false, disable the EditText alltogether, it doesn't work. Jan 03 21:38:31 See the Issue on the Android Bugtracker. I'll try again with the FrameLayout. Jan 03 21:38:40 lighthazard: i had a similar problem, the key is to wrap the EditText and Button in their own layout Jan 03 21:38:41 tofi9: you try setting the theme for that activity to Theme.Holo.NoActionBar.FullScreen in the manifest Jan 03 21:38:57 Napalm: REALLY?! That's so silly. Jan 03 21:39:03 Oh well, OK, I will test that out. Jan 03 21:39:14 If it doesn't work. Is there a way to overlay the EditText with something that will just act the same as TextView, Spinner, etc and let the ListView handle the event? Jan 03 21:39:43 is there a way to check if a device supports more than two touches at once? Jan 03 21:39:47 kakazza: i think your problem stems from another issue Jan 03 21:39:51 I know some older devices only support up to two Jan 03 21:39:56 while newer ones three or four Jan 03 21:40:11 Hi, can anyone tell me if it is possible to make signal search less agressive on adnroid smartphones, programmically, when there's no signal available, to save battery life? Jan 03 21:40:15 karakuri: yes, that's exactly what I've done on my camera view. My next view is a preview view that needs to have the statusbar. That next view does not have "Theme.Holo.NoActionBar.FullScreen" in the manifest Jan 03 21:40:53 lighthazard: when i said layout i ment ViewGroup.. ie wrap the EditText and Button in another RelativeLayout Jan 03 21:41:10 That's what I figured Jan 03 21:41:13 What issue, Napalm? Jan 03 21:41:17 I'm going to put it into a linear layout since that's what it really is Jan 03 21:41:20 lighthazard: its all to do with the order in which RelativeLayout applies its rules Jan 03 21:41:27 Ah Jan 03 21:41:31 That makes sense. Jan 03 21:41:36 lighthazard: and perhaps the child order Jan 03 21:41:38 i forget Jan 03 21:42:42 tofi9: there are some window flags for stable layout/fullscreen layout, maybe those will help? Jan 03 21:43:07 Can anyone tell me if it is possible to make signal search less agressive on adnroid smartphones programmically, when there's no signal available, to save battery life? Jan 03 21:43:36 Why do all applications ask for the complete contact list even if the application doesn't need to do anything with the contact list? Jan 03 21:43:38 Karakuri, I've done this, and it seems to work not jerky. Is this correct? Are these the flags you mean? Am I doing too much? Jan 03 21:43:40 requestWindowFeature(com.actionbarsherlock.view.Window.FEATURE_ACTION_BAR_OVERLAY); Jan 03 21:43:41 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); Jan 03 21:43:42 getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN); Jan 03 21:43:42 getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); Jan 03 21:43:48 Troman: Android has nothing to do with that. Signal search is handled entirely by the manufacturer's radio stack, which runs on a separate cpu that Android has no control ovrer. Jan 03 21:44:01 tofi9: pastebin or similar; please dont' spam the channel with code Jan 03 21:44:03 Pfhoenix: well MotionEvent.getPointerCount() gives you the number of points Jan 03 21:44:10 tofi9: no, i think these are flags on Views Jan 03 21:44:11 !ops tofi9 pasting like crazy Jan 03 21:44:26 ctate/fasta: I only found out when it was too late. Sorry Jan 03 21:44:36 Put the EditText in a FrameLayout with blockDecendants. EditText still receives events. Jan 03 21:44:46 if you have API Demos sample app, look at OverscanActivity in views package Jan 03 21:45:02 ctate: ok, but is there a workaround? E.g.: is it possible tu turn on airplane mode programmically, whenever it is needed? Jan 03 21:45:03 Is there a way to select applications by least amount of permissions needed? Jan 03 21:45:15 Or some way to block all permissions and have the apps still working? Jan 03 21:45:53 kakazza: call setFocusable() and setFocusableInTouchMode() also on the FrameLayout Jan 03 21:46:11 All programatically and not in the XML? Jan 03 21:46:18 if you like Jan 03 21:46:30 kakazza: you were talking about not doing multiple layouts Jan 03 21:46:35 kakazza: make up your mind Jan 03 21:46:35 lol Jan 03 21:46:52 kakazza: if your going to use layouts you might well just use TextView with the EditText style Jan 03 21:46:54 karakuri: which flags would you suggest? As copied before, these are the ones I use now: http://pastebin.com/5MFzzHxE Jan 03 21:47:17 Napalm: If that's possible, sure. Jan 03 21:47:32 But I am not sure how to get the Style. Can you point me to it? Jan 03 21:50:26 style="?android:attr/EditText" Jan 03 21:50:31 or something similar Jan 03 21:50:40 kakazza: ^ Jan 03 21:52:37 style="?android:attr/editTextStyle" Jan 03 21:54:12 Napalm : yes, but that doesn't tell you the maximum the hardware supports Jan 03 21:54:22 Is there anything I can do programmatically when there's no signal, to prevent the phone from losing too much battery life during signal search? Like turning on Airplane Mode, turning off the smartphone after certain time or something else? Jan 03 21:54:38 trying to get three when you only ever get two points won't tell you programmatically that the system only supports two Jan 03 21:56:16 Pfhoenix: what level of compatibility are you aiming for? Jan 03 21:57:35 Why does Android lint complain about ids already being defined where you use the tag which defines some id and then you have the same id in your layout even though the id in your layout is unique in its parent? Jan 03 21:57:36 noone? Jan 03 21:57:37 Pfhoenix: since Jb you can call http://developer.android.com/reference/android/hardware/input/InputManager.html#getInputDeviceIds%28%29 Jan 03 21:58:13 Troman: there probably is. Jan 03 21:58:22 luxurymode: because that's a problem. ids have to be unique across everything that is included. Jan 03 21:58:22 luxurymode: are you using the @+id/name syntax? Jan 03 21:58:28 there's no canonical answer, and it's generally not an app developer problem Jan 03 21:58:29 (actually, across your entire resource set) Jan 03 21:58:34 (unless the developer is the one draining the battery!) Jan 03 21:58:46 (that gets referenced in a given configuration) Jan 03 21:58:56 ctate, thats news to me. across the entire resource set? Jan 03 21:59:07 i dont believe thats correct Jan 03 21:59:41 they dont need to be unique across completely separate layouts, for instance Jan 03 21:59:47 within a given layout existence Jan 03 21:59:49 luxurymode: he means in the currently loaded configuration (for ex. view hierarchy) Jan 03 21:59:49 yeah, that's what i meant Jan 03 21:59:53 unless you meant something different by "resource set"? Jan 03 21:59:58 gotcha Jan 03 22:00:01 makes sense Jan 03 22:00:04 lov: I know my question is specific. Can you think of something? Do we have any access to signal data at all? Jan 03 22:00:18 but if you have an include that does +id/foo and you use +id/foo elsewhere in the same layout, you're gonna have a bad time Jan 03 22:00:19 Sure, I think that Networkmanager has that or telephonymanager Jan 03 22:00:34 you may not have permissions to enable airplane mode, etc, however. Jan 03 22:00:52 really, unless you're coming at this as a preloaded app, you probably can't do anything. Jan 03 22:00:57 lov: i expected that, how about turning off the phone? Jan 03 22:00:58 luxurymode: if you add an id to your values resources you can then use it as @id/name Jan 03 22:01:08 luxurymode: at your own peril Jan 03 22:01:09 yeah, I'm pretty sure that's system only. Jan 03 22:01:28 lov: ok thanks a lot Jan 03 22:01:47 boas Jan 03 22:01:59 Napalm : I need to target sdk 10 Jan 03 22:02:04 Troman: https://developer.android.com/reference/android/telephony/CellSignalStrength.html ? Jan 03 22:02:24 and I don't know if getting all the inputmethod IDs will actually do what I want Jan 03 22:02:27 re airplane mode, as of 4.2 that is not manipulable by applications, only by the system Jan 03 22:03:26 i think what happened is people were using the auto-generated crap from eclipse Jan 03 22:03:42 so it never actually made a difference in these layouts because nothing was referencing those ids in code or in xml Jan 03 22:03:50 so my point was: if you dont need an id, then dont use one Jan 03 22:03:56 just delete it or turn off auto-generation Jan 03 22:04:02 Napalm: that helps, but looks like there's no was to react to absense of signal anyway, which is disappointing Jan 03 22:04:16 bc there were duplicate ids in the form of linearlayout1, linearlayout1 just bs ids Jan 03 22:08:18 Pfhoenix: one moment, i have an idea for you Jan 03 22:13:26 Pfhoenix: (belated, re: singletons) no worries :) Jan 03 22:26:03 is it possible to hook the audio stream? say, I want to catch the audio from a music app and reroute it into my app before it is passed to the speakers Jan 03 22:29:29 Pfhoenix: sorry, no luck Jan 03 22:33:50 Napalm: thanks! Jan 03 22:33:59 ? Jan 03 22:35:25 In the end, I went with restyliung the TextView ;[ Jan 03 22:36:58 hey guys, anybody using SlidingMenu from jfeinstein10? Jan 03 22:42:12 meetoman: didn't SimonVT do one also? whats the difference ? Jan 03 23:02:59 Pfhoenix, oh, static scope isn't a singleton, per se, and it's stored on the class object, effectively Jan 03 23:03:29 Pfhoenix, and static scope can't be programmed to any interface Jan 03 23:04:12 * pfn responds a bit late Jan 03 23:11:29 LinearLayout or RelativeLayout if every View is on a single line? Jan 03 23:15:12 linear Jan 03 23:27:40 kakazza, "line" => linear Jan 03 23:30:44 anybody measure the difference? you could use both. if it was in a LV it would probably matter Jan 03 23:31:16 i thought LV layout was more computationally expensive Jan 03 23:31:25 RL should be more expensive Jan 03 23:31:37 heh, romain was wrong then Jan 03 23:32:08 I think he's the one who told me RL was more expensive than LL Jan 03 23:32:25 i'll have to ask again; i thought he said the opposite Jan 03 23:32:34 or i could just measure it Jan 03 23:33:05 LL is cheap without weights Jan 03 23:33:15 if i remember correctly, but expensive with them Jan 03 23:33:28 because weights mean double measuring Jan 03 23:36:15 RL is cheaper when the alternative is NESTED LL Jan 03 23:38:04 don't nest if you can help it Jan 03 23:38:19 http://www.youtube.com/watch?v=NMiY1kSTHZw < Android Vs iOS The Truth about Apple and Google's OS Part 1 of 5 Jan 03 23:38:31 RL can be a little more expensive than a single LL Jan 03 23:38:40 but is MUCH cheaper than using nested LLs Jan 03 23:38:46 Napalm, that's part 1, and 13 minutes long??? Jan 03 23:38:49 hi android dev, i've got an application which uses specialized fonts (because the system fonts don't support the glyphs I need for this language), my issue regards setting the typeface on TextViews that are populated by an adapter. Jan 03 23:39:00 yea, but its pretty interesting Jan 03 23:39:38 jcrowgey: whats the problem? Jan 03 23:39:51 this guy is talking too much Jan 03 23:40:02 "i didnt need to root my phone" - then why is your bootloader unlocked? Jan 03 23:40:03 in my onCreate I can call a method to go through the views in the layout and load a TypeFace from assets then use view.setTypeface(tf) to set the typeface on the view. my problem is that when onCreate is called, the GridView which is populated by the adapter has 0 children, there are no views yet to setTypeface on. Jan 03 23:40:32 time to coin a new term Jan 03 23:40:35 i guess i'm wondering if there's some other part of the lifecycle i should be using to access the layout after the Adapter has populated the GridView's children. Jan 03 23:40:35 "jailbrick" Jan 03 23:40:38 lol Jan 03 23:41:07 jcrowgey, why arent you doing it in getView() ? Jan 03 23:41:08 jcrowgey: override onCreateView Jan 03 23:41:12 of your activity Jan 03 23:41:34 Napalm, this is stupid Jan 03 23:41:44 he's going through a list of android features that dont exist on ios Jan 03 23:41:48 and therefore android's better Jan 03 23:41:51 wait wait Jan 03 23:41:53 canadiancow did you help me earlier with my view question ? Jan 03 23:41:58 maybe? Jan 03 23:42:00 candiancow, i guess that may be the solution, I hadn't customized the adapter at all. Jan 03 23:42:10 thanks! (if you did) Jan 03 23:42:15 how do you not customize an adapter :\ Jan 03 23:42:28 i was using a standard adapter, but i could extend the adapter and customize it's getView. Jan 03 23:42:44 alright, thanks for the suggestion, i'll let you know if i run into problems. many thanks. Jan 03 23:42:55 jcrowgey: if its just the gridview you want to change the font on then then change it in the adapters getView if you are trying to set this font application wide override onCreateView in your activity Jan 03 23:44:22 Napalm, i gave up Jan 03 23:44:25 that's stupid Jan 03 23:44:38 i dont want to watch an android fanboy tell me why android is better Jan 03 23:44:46 jcrowgey: you test if name parameter is TextView and then instantiate a new TextView this the context and attrs parameters set the typeface and return the view Jan 03 23:45:52 anyone here dev android on osx ? Jan 03 23:46:05 AND use standard adt pack ? Jan 03 23:46:56 Experiencing any problems with it? Jan 03 23:47:11 me? Jan 03 23:47:45 omg how is it so early Jan 03 23:50:58 srsly Jan 03 23:51:01 feels like it should be 5 already Jan 03 23:51:15 but thanks for the reminder that i should get coffee Jan 03 23:55:34 lol Jan 03 23:57:08 okay, canadiancow was right, customizing the adapter and setting typeface in the getView method works! Jan 03 23:57:11 thanks! Jan 04 00:01:17 It's almost 19:00 here Jan 04 00:06:27 hi, I am trying to make an app that is supposed to send a simple message to a php script on my local server but the text is not getting to the script by some reason, the php script works fine if used from browser, the java class can be seen here http://pastebin.com/3Cy17j8k Jan 04 00:06:36 can anyone see any error there? Jan 04 00:07:55 supaman: yeah, I think you're not setting the right content-type Jan 04 00:08:45 supaman: should be "application/x-www-form-urlencoded" Jan 04 00:08:48 not text/plain Jan 04 00:09:02 Maurits_: ok .. thanks will try that :-) Jan 04 00:11:06 Maurits_: your a genius, thanks a million works like a charm :-) Jan 04 00:11:12 np :) Jan 04 00:11:27 hey android-dev, i guess i've got one more question since you guys helped me so quickly with my last one. this one regards setting a preference in an activity started by a main activity and wanting to access any changes to that preferece when the main activity restarts. Jan 04 00:12:44 more specifically, i save a preference for font (several are available) and when i start a sub activity, the sub activity can access this info through shared preferences. i've been using the 'putExtra' method of the intent to pass this info to the sub activity. Jan 04 00:13:07 why not simply request it twice? Jan 04 00:13:22 if a user changes the preference during the sub activity, how can i get the info back to the main activity when the sub activity quits, especially if the sub activity quits because the user pressed the back button. Jan 04 00:13:27 ie, there's no reason why the subactivity can't fetch the value itself Jan 04 00:14:31 I mean, fetching a single preference value onStart isn't such a performance hit Jan 04 00:14:45 and guarantees you'll always have a fresh value Jan 04 00:14:49 Maurits_, i guess i don't understand. instead of having the subactivity use extras.getString() I should use something else. Jan 04 00:15:24 jcrowgey: simply put, the main activity queries the sharedpreferences for the value right? Jan 04 00:15:35 right now, my subactivity's onCreate checks extras.getString("font"). Jan 04 00:15:46 jcrowgey: this is what you probably want to be using: http://developer.android.com/guide/topics/data/data-storage.html#pref Jan 04 00:16:37 Maurits_, that is right, the main activity queries prefs.getString. Jan 04 00:16:38 jcrowgey: how do you store/recall the font settings? Jan 04 00:16:57 jcrowgey: right, so why not have the subactivity also query prefs.getString? Jan 04 00:17:07 jcrowgey: instead of passing it through intent extras Jan 04 00:17:30 hmm, maurits_, now i see, you have a good point. i suppose this was just oversight. let me rework the code as you suggest and see if there are any problems Jan 04 00:18:00 I guess you're doing getPreferences() now Jan 04 00:18:22 which should become getSharedPreferences("SOME_SHARED_FILENAME_BETWEEN_MAIN_AND_SUB_ACTIVITY") Jan 04 00:19:06 yes, the main activity does getPreferences(), but the subactivity used getExtras() Jan 04 00:19:28 Marits_, yes I see, I will try that now. thank you very much! Jan 04 00:19:49 np Jan 04 00:32:42 when extending a view the attrib set are all the xml values (if present) that includes width height, but where in my custom view class would be the best way to get width and height provided by these attribs ? Jan 04 00:33:25 actually taking it from the attrib set ? oh wait, they could change and maybe of match_parent etc Jan 04 00:33:59 Marits_, as you suggested, i reworked my code so that the main activity and the subactivity both use getSharedPreferences(PREFS_FILE,0); and it seems to be working in so far as the subactivity correctly sets the font when it is created. Jan 04 00:34:28 however, i seem to have the same issue as before in that when the subactivity quits, any changes to the prefs during the subactivity don't seem to show up in the main activity. Jan 04 00:34:56 i defined an onResume method in the main activity and set it to access the shared prefs at that point, however, it seems like that's not actually being called. Jan 04 00:36:54 jcrowgey what lifecycle methods are called ? any ? Jan 04 00:36:55 so i guess my question is, how can i tell when the main activity is restarted when the subactivity finishes? Jan 04 00:37:39 stingray_, well, the subactivity can finish by a user simply pressing the back button, that takes you back to the main activity, exactly what life cycle methods are called when that happens is sorta the answer to my question. Jan 04 00:38:43 well if you start the subact with startActivityWithResult Jan 04 00:39:15 stingray, that may be just what i was looking for. Jan 04 00:39:19 does it trigger onActivityResult Jan 04 00:39:36 i had been only using startActivity Jan 04 00:39:51 well that should do it Jan 04 00:39:59 but when you say subact Jan 04 00:40:19 i take it you mean a private activity class within an activity ? Jan 04 00:40:32 or just another activity ? Jan 04 00:43:01 stingray_, i guess it's just another activity, my application helps to study vocabulary in a given language, the main activity displays a menu where you can choose one of the vocab sets and either 'test' or 'study', the 'subactivities' i was talking about are the 'study' and 'test' activities. Users finish the test and finish() get's called in test. Study just goes on and on until a user presses the back button, which brings th Jan 04 00:43:38 but, the Study and Test classes just extend Activity. I haven't made them private. Jan 04 00:43:52 stingray_, does that answer the question you were asking Jan 04 00:43:57 ya Jan 04 00:44:17 So yeah, weird issue I'm having.. I tried to get someone else to run my APK file and they get this error: http://pastebin.com/raw.php?i=MNF329W5 Jan 04 00:44:19 stingray_, does that seem problematic or is it normal? i'm new to android programming. Jan 04 00:45:28 jcrowgey m8 I'm new to programming period .... although ask me a 3d graphics question and I can speak with authority ;) Jan 04 00:46:43 stingray_, fair enough, thanks for the advice, i'm going to try calling the activity with startActivityWithResult and using the onActivityResult method Jan 04 00:46:58 jcrowgey : I would see if onPause() is being called when you switch activity though Jan 04 00:47:20 cause if onPause() is called, cant see how going back to it would not call onResume() Jan 04 00:47:22 :) Jan 04 00:48:09 if it's totally hidden onStop() should be called also Jan 04 00:48:14 as is my understanding Jan 04 00:48:44 there are cases when you get onPause() but not onStop() Jan 04 00:48:58 is it leagal to use a college football team logo in an android application? Jan 04 00:49:13 sure, if you have written permission from the team Jan 04 00:49:26 also, it's a safe bet that nobody here is a lawyer qualified to render an opinion on that :) Jan 04 00:49:28 ctate always onStop() if hidden/not vis thought right ? Jan 04 00:49:48 StingRay_: no. there are cases when your activitiy is no longer visible, is paused, but is not stopped. Jan 04 00:49:51 str8uplinux worst that can happen is you being told you cant use it Jan 04 00:50:26 ctate interesting, never knew that ...any example ? Jan 04 00:50:42 Alright, i didn't figure it is a huge deal, because i highly doubt everyone that has made an app that has a team logo in it has gotten permission Jan 04 00:50:43 the most common case was pre-JB (or maybe pre-ICS?) behind the lock screen Jan 04 00:50:57 when the device went to sleep the foreground activity would be paused but not stopped Jan 04 00:51:08 and still be paused when the device was awakened wiht the lock screen showing Jan 04 00:51:09 oh, wow Jan 04 00:51:12 but not stopped Jan 04 00:51:35 but if you get onPause() then on returning to it you would always get onResume() correct ? Jan 04 00:51:39 at some point relatively recently we chnaged that to fully stop activities on device sleep Jan 04 00:51:40 yes Jan 04 00:51:47 stop/start and pause/resume are always matched pairs Jan 04 00:51:57 then jcrowgey has an interesting one :) Jan 04 00:52:24 yawn Jan 04 00:52:47 turns out, webkit's tiling system is complex ;) Jan 04 00:52:57 also, the sun is bright Jan 04 00:53:28 pretty smartly designed though Jan 04 00:53:49 i'm logically porting it to a more general purpose drawing layer in my app Jan 04 00:55:11 StingRay_ I was reading the docs on startActivityForResult and I'm not sure it's exactly what i want. on one hand, it might work, but it seems like a bit of kludge. startActivityForResult expects that you are wanting to do something with some data passed back to the main activity through an intent. in fact, all i want to do is to check if the user's font preference has changed and if so, reset the font on the main view. maybe i Jan 04 00:57:06 jcrowgey i suggested that to see if onActivityResult was called, but I suggest you see if onPause() is triggered when you start your sub activity Jan 04 00:57:37 cause if it is, there is no reason that onResume() would not on returning as ctate said Jan 04 01:00:17 jcrowgey: just re-read the contents of hte underlying shared pref or whatever when your activity is resumed Jan 04 01:00:31 or hell, just keep that particular bit of state in a global object that is shared across all of your activities Jan 04 01:01:07 ctate but onResume() was not called when he called finish Jan 04 01:01:12 thats the odd bit Jan 04 01:01:30 err, why odd? he quit the activity by calling finish() Jan 04 01:01:35 so there's nohting there to resume Jan 04 01:02:08 on the activity that he's going back to (the calling activity) Jan 04 01:02:19 the one that is in the background Jan 04 01:03:34 i think i'd need more details about what exactly is observed, but alas i have to scoot. :( Jan 04 01:04:14 okay, i found my error, in fact, the problem was that I had defined an onResume() method but hadn't indicated @Override and I wasn't calling super.onResume() inside it. Jan 04 01:04:39 now that i've fixed that, the main activity properly reads the shared prefs when the sub activity finishes. many thanks guys! Jan 04 01:05:04 jcrowgey: Random fact but @Override is a compiler check - it doesn't actually change the behavior of the method in any way. Jan 04 01:05:47 maslen, interesting, well perhaps it was the fact that i wasn't calling the super.onResume() method. in any case, all seems to be working now. Jan 04 01:05:50 ^ @Override just makes the compiler check that you're overriding something Jan 04 01:06:13 right, well now i'm overriding something and i'm a happier programmaer for it. Jan 04 01:06:19 huh, you didn't crash / get a warning in the log about fialing to call the superclass onResume()? Jan 04 01:06:40 @Override is a way to make the compiler tell you when you've mangled the method signature. learn it, love it. ;) Jan 04 01:07:29 ooo ubuntu phone os image available soon for gnex :) Jan 04 01:10:06 they haven't even got ubuntu working properly on desktop yet Jan 04 01:10:51 not sure I've come across software that when released works properly Jan 04 01:10:55 but I get your point :) Jan 04 01:11:26 I'm sure the world needs another mobile OS ;) Jan 04 01:16:31 http://www.youtube.com/watch?v=6ECR65w5hFE Jan 04 01:16:38 wow, that's so clever... my solution for that level is... scary Jan 04 01:21:33 https://lh3.googleusercontent.com/-DEkndS5g6HE/UOYt8Utie8I/AAAAAAAAEHg/L0Mw4lAtwoA/s902/13+-+1 Jan 04 01:21:37 my solution, heh Jan 04 01:22:54 I have a method which is invoked on a certain intent, what it does is, it creates a notifcation with a PendingIntent to open the main activity if the notification is seletected, now I have the problem, that the main activity might already be running and the notification is selected in this case the main activity is launched two times, how can I prevent this? Jan 04 01:23:36 as in, don't start the activity again, but just perform onResume or something similar Jan 04 01:25:22 platzhirsch: set FLAG_ACTIVITY_REORDER_TO_FRONT on the PendingIntent Jan 04 01:26:25 Maurits_: ahh, great Jan 04 01:26:42 platzhirsch: err, or another one of those flags, I'm assuming this will launch a new task Jan 04 01:27:12 one of FLAG_ACTIVITY_* flags will do what you want though Jan 04 01:27:59 I believe it's clear top Jan 04 01:29:10 yeah, that's the one Jan 04 01:29:47 Maurits_: thanks for pointing me into the right direction Jan 04 01:30:01 np Jan 04 01:30:33 My App is so small, I thought some things are finished in now time, but everything takes a lot of care Jan 04 01:35:54 Stumped. I have a web view in Android 2.3 (mdpi) and Android 4.0 (hdpi). The default font size is different between the two. Scaling and zooming is turned off in every way I can imagine. I tried using metrics.scaleDensity to scale my font size but there is still a great disparity between the rendered font sizes. Specifying font sizes in the CSS is useless -- the webviews interpret them different. Am I missing something completely obvio Jan 04 01:38:58 wow, gingerbread below 50% Jan 04 01:40:29 imagine what it would be at if they could supply the N4 demand ;) Jan 04 01:43:47 hm. I'm trying to load a texture using opengl v1. It works on my samsung galaxy s3 but it fails miserably on my samsung galaxy tab 2. Jan 04 01:43:59 01-04 02:41:36.633: V/GLSurfaceView(18811): glGenTextures(1, [0], 0) returns { [0] = 100271 } Jan 04 01:44:19 When you open the xml layout editor in ADT plugin, and you get the controls panel on the left side, and the 'properties' panel (not the eclipse Properties view, but same stuff) on the right....how do you make that show up if it isn't there already? Jan 04 01:44:47 :-) Jan 04 01:45:05 window > showview > whatever view you want Jan 04 01:45:53 StingRay_, the thing is what I want is not an eclipse view. It's a subpanel of the xml layout editor Jan 04 01:46:00 like the Palette on the left side Jan 04 01:46:18 wooo, Cupcake retired from the stats! Jan 04 01:46:42 down to <= 0.1% Jan 04 01:47:01 RIP cupcake Jan 04 01:47:10 fun trivia of the day: that 0.1% still on Cupcake is still more devices that OpenMoko ever sold. Jan 04 01:47:24 casvah you have the outline view ? Jan 04 01:47:25 *more devices than Jan 04 01:47:37 casvah there is a little down arrow on that Jan 04 01:47:39 StingRay_, I have nothing on the right side of the editor. Jan 04 01:47:45 > show properties Jan 04 01:47:46 oh Jan 04 01:48:00 well then outline view needed Jan 04 01:48:18 I have eclipse views, but I don't want eclipse views, I want the panel that the editor contains on its own Jan 04 01:48:22 they're two different things Jan 04 01:48:43 it's all contained inside one tab, the xml layout's tab Jan 04 01:49:04 ui editor - main xml view + pallet && outline and properties ? Jan 04 01:49:09 what are you missing ? Jan 04 01:49:24 outline and properties Jan 04 01:49:49 window > show view > outline Jan 04 01:50:02 and if props are not there, the outline has a down arrow Jan 04 01:50:04 as i said Jan 04 01:50:30 Yes, but those open new tab views in eclipse Jan 04 01:50:36 which i don't want Jan 04 01:50:39 yes Jan 04 01:51:02 it's never been docked to xml + pallet though ? Jan 04 01:51:04 has it ? Jan 04 01:51:12 if it has I've never had it there Jan 04 01:51:21 casvah: it would be simpler if you could find a screenshot of what you want Jan 04 01:51:28 it has been docked, and usually is. Jan 04 01:51:31 supaman, good idea hang on Jan 04 01:52:02 http://tools.android.com/recent/layoutwindows Jan 04 01:52:16 notice the 'structure' panel? I don' thave that Jan 04 01:52:16 I want it Jan 04 01:52:18 yeah that aint docked Jan 04 01:52:25 that is as i have it Jan 04 01:52:29 just placed at the side Jan 04 01:52:31 :) Jan 04 01:52:39 It looks docked to me Jan 04 01:52:59 note how it's inside the blue outline of the tab? Jan 04 01:53:05 and doesn't have its own tab Jan 04 01:53:30 anyone knows if 100271 is a defined opengl errno? Jan 04 01:53:53 oh yeah Jan 04 01:53:58 funky Jan 04 01:55:15 i dont even have the ability to have that I dont think Jan 04 01:55:17 omg wtf now its back Jan 04 01:55:39 I accidentally dragged another tab to a non-optimal location and when putting it back it made eclipse redraw everything Jan 04 01:56:00 heh whatver, adt! Thanks anyways StingRay_ and supaman Jan 04 01:56:00 :D Jan 04 02:15:16 anyone notice that android treats radial gradients weird? I have a gradientdrawable setup as a radial i xml, but it wont scale properly! My code is http://pastebin.mozilla.org/2037049 Jan 04 02:16:26 I have it as the background of a frame layout at the root of my layout. The border scales, but the gradient is clipped for some odd reason. If i set it to linear, it scale properly Jan 04 02:23:16 Anyone around :D Jan 04 02:25:42 a bit Jan 04 02:25:46 which is odd Jan 04 02:25:54 cause in the UK it's 2:25am Jan 04 02:27:24 i use radial gradients Jan 04 02:27:37 when you say scale.. Jan 04 02:27:52 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); anyone knows a reason this would throw an invalid value? Jan 04 02:28:16 you mean scale the drawable that has a fixed radius for the gradient ? Jan 04 02:28:29 @ GMDynamics Jan 04 02:29:17 Sorry! Yeah Jan 04 02:29:32 you mean the radius is not scaling ? Jan 04 02:30:05 Yup.I want a scalable radius but the gradientRadius is allowed to be dimensional Jan 04 02:30:15 svearike GL10 ? Jan 04 02:30:50 xorgate yes Jan 04 02:31:01 GMDynamics i would never imagine a the radius to scale though, if I needed it to I would have to work it out and set it Jan 04 02:31:06 I tried setting the shapes size to be fixed, but it didnt change anything Jan 04 02:31:17 xorgate would that be wrong? Jan 04 02:31:30 xorgate it works on samsung galaxy s3, fails on samsung galaxy tab 2 Jan 04 02:31:32 GMDynamics that 500 is pixels right ? Jan 04 02:32:43 svearike hm i just use GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, width, height, 0, GLES20.GL_RGB, GLES20.GL_UNSIGNED_SHORT_5_6_5, texBuffer ); Jan 04 02:32:51 the thing is, if the radius doesnt scale it has no use. If a linear gradient dint scale, on small objects it would appear as on color, and on bigger ones only part of the image would have a gradient Jan 04 02:32:54 500 is what i was messing with Jan 04 02:33:15 svearike but im sure you noticed that opengl is very picky ;0 Jan 04 02:33:29 GMDynamics I think your would have to look at a code solution Jan 04 02:34:44 The problem is I'm using the gradient in a custom view that will change size often. I get this kind of laggy responce when using animations Jan 04 02:35:33 xorgate I take it that would fail miserably for my app? :) considering I'm not using GLES20 ;) Jan 04 02:36:12 I take it my bitmap could be in the wrong format or something' Jan 04 02:36:37 I just loaded it from the resources with a inputstream, nothing fancy. it's from a png with an alpha channel Jan 04 02:37:47 svearike if you know the exact line the problem stems from (check glError every line) then it shouldn't be too hard to find Jan 04 02:38:07 xorgate I did. it is that function. Jan 04 02:38:07 svearike pallet based alpha or an actual alpha channel? Jan 04 02:38:35 StingRay_ actual alpha Jan 04 02:38:53 hmmm, was not aware that android supported that Jan 04 02:39:00 :O perhaps not then Jan 04 02:39:01 funky Jan 04 02:39:07 S3 does atleast ;) Jan 04 02:39:20 try pallet based alpha Jan 04 02:39:58 if the S3 does, then all Androids running 4.0/4.1 up should Jan 04 02:40:03 ( at least ) Jan 04 02:40:09 in games the whole reason an artist used png besides format support is cause of pallet based alpha and performance Jan 04 02:40:36 my tablet, which fails, has 4.0.4 Jan 04 02:41:10 svearike: what version is the S3 running? Jan 04 02:41:14 hello all Jan 04 02:42:36 AmandaC 4.1.2 Jan 04 02:42:49 svearike: then maybe it was added in JB Jan 04 02:42:59 I tried to upgrade my tablet... but samsung kies is worse than death, seriously. Jan 04 02:43:04 i dont think you want to use it though Jan 04 02:43:12 as in 8,8,8,8 Jan 04 02:43:26 is that not a bit....well.... massive ? Jan 04 02:44:29 StingRay_: PNG does compression, and the Android build steps crunch it before hand, probably changing it into a minimal-possile pallet Jan 04 02:44:29 8,8,8,8? Jan 04 02:44:58 you wouldnt know how to do alpha pallet in gimp? Jan 04 02:45:21 well yeah, I would think it's easy Jan 04 02:45:40 will be in color/mode/pallet menu I would think Jan 04 02:45:52 I would have to fire up gimp Jan 04 02:45:53 :) Jan 04 02:46:01 not used that in ...well years Jan 04 02:46:30 actually I would think the default gimp png support would do it Jan 04 02:46:34 by default Jan 04 02:46:57 unless you create an alpha channel specifically Jan 04 02:47:02 there is a "Color to alpha" but that's only a shorthand for creating alpha Jan 04 02:47:15 ok do this, have one layer in color Jan 04 02:47:26 make it an layer and not a background Jan 04 02:47:39 go to alpha channel and make a selection of it Jan 04 02:47:39 there is a "save transparent pixels color value" tickbox when exporting to png, that one is actually pre-ticked Jan 04 02:48:05 go to you color layer and with that selection still there press delete Jan 04 02:48:11 then remove alpha Jan 04 02:48:22 then default save should result in pallet based Jan 04 02:48:28 but I'm guessing Jan 04 02:48:41 using common sense while on solphadine Jan 04 02:48:46 cause of a headache Jan 04 02:48:47 :) Jan 04 02:49:08 or dcc me it and let me do it in photoshop for a test Jan 04 02:49:10 hehe, I'll try, is there a way to verify? Jan 04 02:50:23 hang on off for a cig and make a coffee Jan 04 02:50:30 back in 5 Jan 04 02:50:34 sure thing Jan 04 02:54:43 I removed the alpha channel all together as a test, still does not work :\ Jan 04 02:55:02 maybe the bitmap is too large? o_O 41x41 doesn't seem too large though, but who knows Jan 04 02:55:47 shouldn't be too large Jan 04 02:55:52 what's the symptom, again? Jan 04 02:56:12 send file again Jan 04 02:56:14 bk now Jan 04 02:56:15 :) Jan 04 02:56:21 StingRay_ ah ok :) Jan 04 02:56:28 if i have a hashmap who's key is an object of a custom class, how can I use another instance of that same class, set up exactly the same way, to get the value for the original key? Jan 04 02:56:34 * AmandaC uses alpha channels fine Jan 04 02:56:36 AmandaC well glTexImage2d fails with invalid value Jan 04 02:56:54 svearike: does the device have the extension you're using? Jan 04 02:58:30 AmandaC .. putting textures on squares? I sure hope so :) what extension would that be? GL_TEXTURE_2D , not sure what's an extension and not Jan 04 02:58:36 I'm checking glxinfo on the tablet now **** ENDING LOGGING AT Fri Jan 04 02:59:58 2013