**** BEGIN LOGGING AT Thu Jul 04 02:59:59 2013 Jul 04 03:04:24 How can I make the software keyboard appear when my EditText gets focus? Jul 04 03:07:47 I installed app "command line" and now I can run it and use command "./1.sh" to run some script, but I don't want to laung it and write "./1.sh" every time I need to run script, is it possible to make some shortcut or something and place it on main screen as button and next time just press it and script will run ? Jul 04 03:08:10 TacticalJoke: normal behaviour is to do that, btw, nice specific question ;) Jul 04 03:08:24 StingRay_: lol Jul 04 03:08:33 btw if it doesnt do that, then odds are your stopping it somehow Jul 04 03:08:36 StingRay_: I am using an EditText in an AlertDialog and it's not doing that Jul 04 03:08:36 . Jul 04 03:08:50 shouldn't matter where it is Jul 04 03:09:11 otiose not much any more, it used to just be efficiency, and its a bit easier to Bundle/Parcel them Jul 04 03:09:14 how do you set focus on the editText ? Jul 04 03:09:49 StingRay_: I don't. Jul 04 03:09:55 then thats probably it Jul 04 03:09:57 :) Jul 04 03:09:57 It's focused by default. Jul 04 03:10:09 it can be active "blinking" Jul 04 03:10:23 but if a focus "change" didnt occur Jul 04 03:10:31 then no kb I would think Jul 04 03:10:48 either use xml tags or code to get the view focus Jul 04 03:11:10 x.requestFocust() Jul 04 03:11:16 ugh Jul 04 03:11:19 *Focus Jul 04 03:14:23 Thanks. Jul 04 03:29:50 what's the best library for drag & drop reordering nowadays? dragsortlistview? Jul 04 03:40:13 man, everytime they make me do android, i feel like you guys must be sadists... Jul 04 03:40:43 all I've really known to date Jul 04 03:40:57 wish I could complain :) Jul 04 03:41:26 do some iOS or server programming and then you'll see how rough you have it Jul 04 03:41:33 well, server can be a bitch too, but... Jul 04 03:41:46 iOS is a bit….well....fixed Jul 04 03:41:57 and since I'm more arty/designery Jul 04 03:42:05 that fix = same old Jul 04 03:42:24 oh you can definitely be artsy designy with ios if you want Jul 04 03:42:26 granted android has guides that try and make you do the same old Jul 04 03:42:33 but you dont have to use them Jul 04 03:42:49 on iOS are you not more…well…. restricted Jul 04 03:43:19 otiose i too find the ios dev experience more pleasurable minus device provisioning and submitting the app for approval Jul 04 03:43:37 i dont like c, but like obj-c more than c++ and java Jul 04 03:43:48 yeah, their gates are annoying, but the development is a lot more enjoyable Jul 04 03:43:49 i like obj-c is so easy to call into c libraries Jul 04 03:44:39 if people get over the fact that -omg- obj-c uses brackets! and -wtf- long, descriptive method names, they generally tend to like it Jul 04 03:44:46 java has some nice libs of course, but there is so much c stuff out there just easy for the picking in ios; its harder to get autotools stuff working with ndk / jni Jul 04 03:45:10 otiose i like the self describing names Jul 04 03:45:23 *param names) Jul 04 03:45:35 i do too, its super helpful Jul 04 03:45:36 but yeah, its just syntax that goes away after time Jul 04 03:47:12 i'd also like a hacker friendly linux mobile os not in control of any particular company at all Jul 04 03:47:30 I'd like a pony Jul 04 03:47:35 i have one Jul 04 03:47:42 but its an Arabian Jul 04 03:47:49 her name is Patrice ;) Jul 04 03:48:07 at the moment, im not too concerned about freedom of my devices :/ Jul 04 03:48:50 right now, im just trying to sell a product and yeah, dont really care about the platform much Jul 04 03:49:21 Is Google still stuck in the 90s and does not support 64 bit java usage? Jul 04 03:53:59 how does one stop logcat in mid flow, as in turn of autoscoll Jul 04 03:54:10 am I blind in not seeing the option ? Jul 04 03:54:25 or my lack of sleep taking it's toll ? Jul 04 03:57:23 or they left it out? Jul 04 03:57:24 :) Jul 04 03:57:43 see, you're still awake, and now you're talking to yourself Jul 04 03:58:01 the button that looks like a down arrow in the topright corner of the logcat window Jul 04 03:58:09 no thats not Jul 04 03:58:23 thats horrid, skip to source of error ? Jul 04 03:58:48 its never acted like that way for me...? Jul 04 03:59:01 Eclipse in a VM did that to me... Jul 04 03:59:09 hmmm….then wtf have I done to mine Jul 04 04:00:42 well yeah the down and up are stack trace nav Jul 04 04:00:50 not stop autoscroll Jul 04 04:01:03 when i hover over it it says 'scroll lock' Jul 04 04:01:12 and i have no up button Jul 04 04:01:15 or "good luck" Jul 04 04:01:19 balls Jul 04 05:05:59 50% off "gradle in action" from Manning Jul 04 05:06:25 problem is, gradle seems to be evolving very quickly and manning isn't very good at keeping things up to date Jul 04 05:14:28 any list of built in system sounds? https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/raw seems pretty sparse Jul 04 05:27:08 Anything major change in the world of android development the last few days? Jul 04 05:27:18 Hello guys, is posible for an android email intent to attach files combination of images and some other extensions? Jul 04 05:27:31 is it*? Jul 04 05:27:45 file extentions? Jul 04 05:28:18 72 hours long gone Jul 04 05:28:33 it was extended Jul 04 05:28:43 please anyone know this? Jul 04 05:29:03 i have .jpg's and .html's to be attached? Jul 04 05:29:30 Hi! I have one question. Jul 04 05:29:40 Shoot Jul 04 05:29:58 androidnewb: Jul 04 05:30:22 I have two classes. First slass extends SherlockFragment. Second extends SherlockFragmentActivity. Jul 04 05:30:40 lasserix? Jul 04 05:30:40 http://lmgtfy.com/?q=how+to+attach+jpg+to+email+intent&l=1 Jul 04 05:30:43 Whay I cannot cast first class to Fragment? Jul 04 05:31:17 I use follow code FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(R.id.content_frame, new LoginFragment()); Jul 04 05:31:38 Osanve: that's probably a bad way to instantiate LoginFragment Jul 04 05:32:03 lasseri: but I can already attach images, if I attach .html files it will faile to attach the html files. Jul 04 05:32:27 lasserix: And what can I do? Jul 04 05:33:36 Osanave: try this ... LoginFragment mFragment = getSupportFragmentManager.findFragmentbyTag("mytag"); if (mFragment == null) { mFragment = new LoginFragment(); } FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(R.id.content_frame, new LoginFragment(), "mytag"); Jul 04 05:33:46 hi Jul 04 05:33:59 CocoStorm: too early Jul 04 05:34:02 piss off Jul 04 05:34:06 :) Jul 04 05:34:10 StingRay_, why are you up ? :P Jul 04 05:34:17 androidnewb are you embedding html in email or are you trying to attach html file to email? Jul 04 05:34:19 cause I'm a vampire!!! Jul 04 05:34:22 : Jul 04 05:34:30 StingRay_, you're crazy that's what you are :P Jul 04 05:34:33 i'm drunk as fuck Jul 04 05:34:47 StingRay_: You're from the UK, right? Jul 04 05:34:50 too make matters worse my battery is about to run out Jul 04 05:35:01 indeed kakazza Jul 04 05:35:14 well, I reside in what could be called the UK Jul 04 05:35:21 I'm from my mothers private bits Jul 04 05:35:23 Because I wondererd who always wants to bum a fag in here. Jul 04 05:35:31 Is there a way, in eclipse, to enable the standard mac osx keybindings for navigation? Sort of emacs-esque Jul 04 05:35:42 For some reason, I dream in IRC conversations... Jul 04 05:35:54 you mentioned cigs :( Jul 04 05:35:57 cruel Jul 04 05:36:06 I should've stayed home programming tbh Jul 04 05:36:12 ctrl+a = go to the beginning of the line, etc...? Jul 04 05:36:14 used to love my "sunrise" morning ciggy Jul 04 05:36:18 shoulda coulda woulda Jul 04 05:36:28 fo sho lasserix Jul 04 05:36:28 lasserix: Shouldn't you use mFragment instead of new LoginFragment() in the ft.replace? Jul 04 05:36:38 oh yeah! osanve Jul 04 05:36:59 sorry this line should go ft.replace(R.id.content_frame, new LoginFragment(), "mytag"); --> ft.replace(R.id.content_frame, mFragment, "mytag"); Jul 04 05:37:31 StingRay_, what time do you wake up Jul 04 05:37:44 erm, 1pm ish Jul 04 05:37:49 lol Jul 04 05:37:50 I think Jul 04 05:38:08 time, days, all just meaningless imaginations of the mind ;) Jul 04 05:38:16 osanve: the reason for this is that the fragment life cycle is not identical to the activity life cycle, and so you want to verify the fragment (for whatever reason) is not floating somewhere around in the process space (ie was already instanced, but activity was set to background during a phone call or something, when the activity is recreated the original fragment instance can still exist) Jul 04 05:38:22 I could not tell you the day/date/ or month Jul 04 05:38:33 hmmm, nope, really cant Jul 04 05:38:41 osanve: however you actually had a question too Jul 04 05:39:02 lasserix: But who points to the Fragment instance when the ACtivity is collected? Jul 04 05:39:37 kakazza: tbh i dont know, i assume whatever holds the out_bundle from the destroyed fragment Jul 04 05:39:52 *destroyed activity Jul 04 05:40:07 StingRay_, nice Jul 04 05:40:08 :P Jul 04 05:40:14 StingRay_, we are in synch with each other Jul 04 05:40:19 *sync Jul 04 05:40:54 then we can count orselfs among a few hundered million others and feel special Jul 04 05:41:08 ourselves* Jul 04 05:41:29 StingRay_: i wonder if you could wire up and occulus rift with a nicopatch to smoke a cig in VR while simaltaneousily having the patch release into the (real) blood stream and i wonder if that would satisify the expectation of the expierience ;p Jul 04 05:41:38 lasserix: I have error in first line ... LoginFragment mFragment = (LoginFragment)getSupportFragmentManager().findFragmentByTag("login"); ... Jul 04 05:41:52 Cannot cast Fragment to LoginFragment Jul 04 05:42:04 lasserix: the experience cant really be simulated Jul 04 05:42:26 if you have a weak enough mind to let that happen, you could just replace smoking with like baking or something Jul 04 05:42:28 :) Jul 04 05:42:40 hehe Jul 04 05:42:58 i just thought it'd be an interesting pyscho experiement, i've heard they can treat fear of heights that way Jul 04 05:43:17 thats cause a fear is made up Jul 04 05:43:43 a ciggy and endorphines are real !! Jul 04 05:43:52 and really real nice :) Jul 04 05:43:56 Osanve i've had a similar problem and it was due because ... Jul 04 05:44:25 osanve can you past some code? Jul 04 05:44:42 i've had that problem too and it was due to something trivial thing i cant rem off top my head Jul 04 05:45:25 androidnewb: you solve your email html intent probleM? Jul 04 05:46:29 Osanve: make sure your login things extends fragment from the support lib Jul 04 05:46:30 StingRay_ i know, but i am curious if it's possible to induce the fix with simple pyschosomatism, cause that would be crazy will power :) Jul 04 05:46:51 lasserix: for some it may work Jul 04 05:47:08 lasserix: but I know it's the combined collection of experiences that I miss Jul 04 05:47:15 Osanve: ^^ what stingray said is i think what i was doing wrong Jul 04 05:47:16 not just the chemical stuff Jul 04 05:47:19 lasserix: code http://pastebin.com/zF4Xq9K9 Jul 04 05:47:23 oh yeah totally Jul 04 05:48:09 osanve: can you check your imports? Jul 04 05:48:18 StingRay_: yes, my fragment extends from support lib Jul 04 05:48:21 make sure you are importing "import com.actionbarsherlock.app.SherlockFragment;" Jul 04 05:49:38 lasserix: in LoginFragment module I have this import Jul 04 05:50:14 hmm Jul 04 05:50:59 if you use intellisense does methods from your fragment show up or the stock methods? Jul 04 05:51:06 to further verify stingrays idea Jul 04 05:51:07 brb Jul 04 05:51:59 lasserix android world has been pretty boring Jul 04 05:52:16 i guess AS 0.1.9 is out Jul 04 05:52:24 StingRay_, bed timeee Jul 04 05:52:29 night Jul 04 05:52:43 lasserix: I'm sorry but I don't understand you Jul 04 05:53:11 Osanve odds are your imports dont match what your using and how your setup Jul 04 05:53:32 but I dont use abs, so no idea Jul 04 05:53:56 i would think that your supportFragMan needs to be abs specific or something Jul 04 05:54:00 dunno Jul 04 05:56:13 StingRay_: I use Eclipse IDE and all imports add auto then I don't think than problem in imports Jul 04 05:56:28 not a great assumption Jul 04 05:56:30 :) Jul 04 06:12:25 osanve: delete all your imports Jul 04 06:12:41 then add them again making sure they are correct Jul 04 06:19:13 lasserix: it does not help Jul 04 06:32:07 lasserix: I'm stupid. I had two classes with name LoginFragment in different packages. :) Jul 04 06:32:15 yeah exactly Jul 04 06:52:29 i have never seen more tightly-coupled code in my life.... Jul 04 06:58:15 otiose where ? Jul 04 06:58:22 in this project Jul 04 06:59:08 im not really sure on the terminology, maybe its not tightly coupled, but its super brittle and resistent to change Jul 04 07:00:14 otiose: that's often the case for tightly-coupled Jul 04 07:00:44 its a weirdly put together framework to mimic UINavigationControllers on iOS Jul 04 07:01:19 and so you have ActivityViewElementxxxx everything; and so much mParent.getParent().getParent() and wtf Jul 04 07:01:35 Any idea how I might go about building this project? https://github.com/wsot/pdroid-manager. I've forked and cloned, but I'm not sure what environment I'm going to need to build it. Jul 04 07:18:13 I hate it when people try to mimic iOS APIs in their own code Jul 04 07:20:26 How do I enable USB tethering permanently? I'm setting up a reverse USB tethering for an SMS gateway on wildfire but every time I reboot the USB tethering option is turned off... Jul 04 07:20:45 does anyone know how to read input from the barometer in my nexus 4? Jul 04 07:21:24 I have found documentation and examples and such on how to read from light sensors and such, but seeing as a baromter is a rare feature im assuming im not coming up with much Jul 04 07:21:33 the4ndy: have you read http://developer.android.com/guide/topics/sensors/sensors_overview.html Jul 04 07:22:29 dokma, don't reboot Jul 04 07:22:31 ;) Jul 04 07:23:12 ...hmmm that mentions barometers several times but its not listed in any of the tables...i searched the developers page and it didnt come up with this page. Thanks alot Jul 04 07:23:20 I don't plan to. It will be a permanently powered SMS gateway. But still I'd like everything to work when I reboot the server and the wildfire Jul 04 07:23:52 I don't think you can, without rooting and modifying bootscripts and whatnot anyway Jul 04 07:23:59 the4ndy: it was the 3rd result when I searched for 'barometer' on the developer site :P Jul 04 07:24:52 hmmm i see that now. i dont know how i missed it. I did spend a lot of time reading the first one Jul 04 07:24:58 Leeds, you should know by now that google chooses who gets the information they actually want! ;) Jul 04 07:25:35 im still a bit confused on it, but im guessing when the examples say "android.hardware.sensor.accelerometer" that i can just replace the sensor they mention (accelerometer) with barometer and it should work i guess Jul 04 07:26:25 sorry im also fairly sure my inexperience with android development is playing a large role in my confusion. thanks for the assistance, i shall go see what i cant figure out Jul 04 07:28:03 I think that's pretty much how it works - I've never played with the sensors myself Jul 04 07:55:35 Have you sensed playing with yourself, though? Jul 04 07:59:15 o.O Jul 04 08:02:01 I think that's pretty much how it works - I've never played with the sensors myself Jul 04 08:02:16 btw, anyone doing much with Open Accessory stuff? Jul 04 08:02:39 pragma-, I noticed, how clever of you Jul 04 08:02:46 hiho. Ive a question.. Ive a LinkedHashMap LinkedHashMap, String>() myLinkedHashMap; Now i want to get the stored HashMap y using myLinked....get(index). But how do i get the Value (String) of the LinkedHashMap? Jul 04 08:03:41 what? Jul 04 08:05:06 Or what is the proper way of using this? Sure, i may use an ArrayList but it can store only one type Jul 04 08:06:01 misterli: I'd suggest re-phrasing the question. It's not very well written :-) Jul 04 08:06:20 what do you want to do? Jul 04 08:07:31 Okay. I want to store a HashMap AND a String (or File, whatever) in a List/Map. What is the proper way to do that? ArrayList can store only 1 type. (Hash)Map can store more then 1 type Jul 04 08:08:19 So for each String, a Map? Jul 04 08:08:42 for each (HashMap and String) in a Map, yes Jul 04 08:08:54 There may be 1000 or more HashMaps and similar Strings Jul 04 08:09:00 which one do you want to use as index Jul 04 08:09:07 Map> ? Jul 04 08:09:27 Map, String, String, Map, String, String. Ooom pa pa. Jul 04 08:09:30 Both. I need to access both everytime Jul 04 08:10:42 index by both? :E Jul 04 08:11:18 I need a numbered-(position)index. Which means that i need to grab both items within a position in the map Jul 04 08:12:11 ok how about List>> Jul 04 08:12:13 :) Jul 04 08:12:22 sounds great ;-} Jul 04 08:12:51 how 'bout the performance between List and ArrayList? Jul 04 08:13:00 List is only an interface Jul 04 08:13:05 ArrayList is an implementation of it Jul 04 08:13:06 Ah, i c. Jul 04 08:13:15 thank you ;-} Jul 04 08:13:16 like Map is only an interface and HashMap is an implementation Jul 04 08:38:00 uh guys where do I learn android programming? since I already knows the basic of Java? Jul 04 08:38:34 topic ;) Jul 04 08:39:22 I mean learn how the android os works etc Jul 04 08:39:57 d.android.com doesn't tell you that ? Jul 04 08:40:34 nope Jul 04 08:44:19 what exactly are you looking to do then? Jul 04 08:45:06 helping in the android development Jul 04 08:45:19 hi, i create a Service and i use BluetoothSocket connection. to avoid stop service i use PowerManager.FULL_WAKE_LOCK but it's deprecated, what can i use to avoid any stop or other problems? Jul 04 08:51:30 does anyone know of a good tutorial for opengl2 on android? Jul 04 08:56:07 Znoosey: http://www.arcsynthesis.org/gltut/ <--- not android specific, but can be a good start as it covers only "modern" OpenGL, which is what OpenGL ES2 is based around Jul 04 08:56:36 Znoosey: check out http://www.learnopengles.com/ and the book he wrote Jul 04 09:03:44 thank you p_l and bankai_ Jul 04 09:04:03 damn the emulator is freaking slow here Jul 04 09:04:46 like everywhere Jul 04 09:05:08 how can i extract frames from a video (for processing) ? MediaMetadataRetriever only gives me one, but i need all of them Jul 04 09:05:14 mhm.. is there any way to block a request until AsyncHttpResponseHandler has been finished? Jul 04 09:07:56 hey guys, anybody with a fresh opensource project that needs devs? i'm looking for something to do Jul 04 09:08:20 github.com/z0lope0z/ Jul 04 09:25:24 Question: My eclipse Mac OS X) can't find any android devices - what I have done so far: 1. ensured that debug mode is enabled 2. restarted ADB 3. ensured that I don't have to install drivers on Mac OSX ("it just works") - Divces test: Sony Xperia & lenovo ThinkPad Jul 04 09:44:19 http://goo.gl/MUR1b - er... Jul 04 09:49:08 $16k!? Jul 04 10:02:42 Hi, Currently i'm developing with a REST service, i can ask one object with ...&code=abc , how can i ask for multiple objects (id = abc or def) Jul 04 10:13:51 hmm.. is there any cool "multi-threaded" Http Client library? Tried loopJ but it's not multithreaded. Jul 04 10:14:54 Have you tried *your own code*? Jul 04 10:15:38 http isn't that complex, is it Jul 04 10:16:00 ihave builded up several httpclients but i was very happy finding loopj yet. But it still does not support multiconnection, does it? Jul 04 10:17:51 No idea :P Jul 04 10:18:15 I'm not a fan of reusing simple code Jul 04 10:31:37 hi Jul 04 10:31:59 how is the structure called that for example gmail uses, with the sidebar on the left that updates stuff on the right? Jul 04 10:34:17 is there an option in eclipse to not move ALL the windows when you move the main one? Jul 04 10:35:06 like this: http://static.androidnext.de/gmail-google-mail-app-4-5-screenshots.png Jul 04 10:36:52 Or even just have them behave lke normal windows, coming to the foreground and background as you click on them? Jul 04 10:37:17 is Device ID unique? Jul 04 10:38:03 (the one you get by dialing *#*#8255#*#*) Jul 04 10:39:04 I think it was OS instance unique (i.e. a full wipe might change it) Jul 04 10:40:44 maaan eclipse gets really stupid with multiple windows Jul 04 10:40:52 i can only paste into the main window?? Jul 04 10:43:12 Zharf, my wildfire is rooted and I don't mind modifying boot scripts to get usb tethering enabled at boot Jul 04 10:43:26 Zharf, do you have any clues for me where to look in order to get it done? Jul 04 10:46:52 dokma, no, sorry :( - I think xda-developers forum might be able to help, they seem to do that sort of stuff Jul 04 10:49:42 so apparently it works OK if i actually go window --> New Window... go figure Jul 04 11:02:34 what actually happens behind the scene when I tick "USB tethering" ? Jul 04 11:04:16 dokma: upon connection to computer, the presented USB device also includes a USB Ethernet (actually MS RNDIS, iirc) device endpoint Jul 04 11:04:46 this works as, let's say, "virtual ethernet cable" to the phone Jul 04 11:04:53 p_l, I'm asking because I'd like to script it Jul 04 11:04:57 any good ways to do it Jul 04 11:05:18 anyone has experience with getting the view object of the tabs in the ViewPager ( support library )? need to get their position for a overlay with instructions Jul 04 11:16:18 Im using sherlock and a contextual floating menu… I'm using the android.view.MenuItem instead of the sherlock menu item for this menu.. http://paste2.org/OGpZcf8t Jul 04 11:16:23 I'm getting error on selectio Jul 04 11:16:32 when i touch the button, it crashes Jul 04 11:17:13 when i use the sherlock menuItem for this menu.. the buttons don't log any thing on click Jul 04 11:17:21 any ideas? Jul 04 11:17:37 i installed eclipse, installed the adt plugin and set the android-sdk path. Also created an Avd. But after creating a new project and clicking on run an external tools configuration window opens up. I am not able to test the application in a avd. Jul 04 11:17:54 how do I setup the android dev environment from here on? Jul 04 11:18:29 Hi all Jul 04 11:18:52 in my app I have a ListView, and sometimes I have an unwanted parallax effect. Jul 04 11:18:58 anyone know why this is happening? Jul 04 11:19:02 and how to prevent this? Jul 04 11:38:51 "For documentation, the best resources out there are design.android.com for how it should look, developer.google.com for how it should work, and stackoverflow for why it doesn't." Jul 04 11:39:43 Im using sherlock and a contextual floating menu… I'm using the android.view.MenuItem instead of the sherlock menu item for this menu.. http://paste2.org/OGpZcf8t … when i touch a button it crashes, any ideas? Jul 04 11:50:20 rved, you're using wrong AdapterContextMenuInfo Jul 04 11:50:28 delete import android.view.ContextMenu.ContextMenuInfo; Jul 04 11:50:29 ? Jul 04 11:50:35 the other one Jul 04 11:50:37 err Jul 04 11:50:47 import com.actionbarsherlock.internal.widget.IcsAdapterView.AdapterContextMenuInfo; Jul 04 11:51:19 but i already have that too Jul 04 11:51:25 when i only delete the default android one Jul 04 11:51:29 i still see error in my code Jul 04 11:51:38 ContextMenuInfo cannot be resolved to a Jul 04 11:51:39 type Jul 04 11:52:37 must i rewrite "ContextMenuInfo" ? Jul 04 11:52:38 when using android.view.MenuItem, you need to use android.widget.AdapterView.AdapterContextMenuInfo, I believe Jul 04 11:53:32 there's another alternative but I don't think you're using expandablelist Jul 04 11:55:02 Zharf, i've deleted "import android.view.ContextMenu.ContextMenuInfo;" Jul 04 11:55:16 but now " public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {" Jul 04 11:55:20 ContextMenuInfo Jul 04 11:55:23 has a red line Jul 04 11:55:23 error Jul 04 11:55:29 "ContextMenuInfo cannot be resolved to a Jul 04 11:55:30 type" Jul 04 11:55:44 "import com.actionbarsherlock.internal.widget.IcsAdapterView.AdapterContextMenuInfo;" is already in the code Jul 04 11:55:53 so what do i need to do :s Jul 04 11:55:59 -.- Jul 04 11:56:12 can you read what I said again Jul 04 11:56:21 when using android.view.MenuItem, you need to use android.widget.AdapterView.AdapterContextMenuInfo Jul 04 11:56:24 hmmm interesting... I've found I can get usb0 up with netcfg usb0 up and it does the same thing as ticking "USB tethering" BUT it does not create a usb0 interface on the connected linux box which ticking "USB tethering" does Jul 04 11:56:27 not com.actionbarsherlock.internal.widget.IcsAdapterView.AdapterContextMenuInfo Jul 04 11:56:53 Zharf, maybee you have an idea what exactly causes the connected linux box to create a usb0 interface when "USB tethering" is ticked? Jul 04 11:57:19 dokma, sorry, I don't really, I never looked any closer to that Jul 04 11:57:21 like this? http://paste2.org/ZZVYh6Uh Jul 04 11:57:38 yeah Jul 04 11:58:03 but then i still see: error " public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {" Jul 04 11:58:13 hello Jul 04 11:58:14 "import android.view.ContextMenu.ContextMenuInfo;" Jul 04 11:58:17 Zharf, you got any idea how to dig out what creates the usb0 on the box when "USB tethering" is ticked on the phone? Jul 04 11:58:18 (suggestion) Jul 04 11:58:47 http://paste2.org/U4AdGU84 Jul 04 11:59:10 how can i use the host internet on android emulator? i run it, so i connect to it woth adb shell, but i see there are no interfaces up. can you help me? Jul 04 11:59:26 rved, use ContextMenu.ContextMenuInfo to not confuse between other ContextMenuInfos Jul 04 12:01:05 Zharf, http://paste2.org/XX9DJPVX Jul 04 12:01:07 like this? Jul 04 12:01:35 is there some problem with that? :) Jul 04 12:01:43 http://paste2.org/8960PHHj Jul 04 12:01:48 im gonna test now Jul 04 12:01:49 moment Jul 04 12:02:26 wo it worked Jul 04 12:02:31 thanks man :) Jul 04 12:02:36 no problem Jul 04 12:10:37 uhm.. Jul 04 12:14:18 is it possible to attach a fragment to another container? i.e. after and orientation change (multi-pane layout -> single-pane layout) reuse the fragments i had before Jul 04 12:15:00 virtx: it normally just works... Jul 04 12:15:06 why if i connect to emulator with adb doesn't see any interface up, but the emulator works on internet? Jul 04 12:15:17 but i can't see any iface .. Jul 04 12:15:36 how are you looking for interfaces? Jul 04 12:15:46 *why* are you looking for interfaces, if the network is working? Jul 04 12:16:14 In Developer Console > My App > Services & APIs there is a "License key for this application" - and it seems the same for all our 80 apps. In which case can it be different? Will it always be the same? Jul 04 12:17:00 Leeds: just run ifconfig in shell Jul 04 12:17:15 and what does ifconfig return? Jul 04 12:17:21 nothing Jul 04 12:17:39 can someone here help me out my emulator is like freaking slow ! Jul 04 12:18:04 iKillCypher: If possible, install HAXM and use the x86 emulator + GPU Acceleration Jul 04 12:18:15 QL? Jul 04 12:18:18 does not seems to work on my PC Jul 04 12:18:27 Zharf: do you also know how i can delete something from my database using: http://paste2.org/y4tZApUP Jul 04 12:18:30 What exactly? Jul 04 12:18:36 Zharf: line 19 Jul 04 12:19:19 Leeds: i think the 'ifconfig' binary is not so good, i strace it and doesn't read nothing from /proc or other.. Jul 04 12:19:21 virtx: here's a hint - the Android command-line tools *aren't* the standard GNU/Linux tools Jul 04 12:19:29 eheh Jul 04 12:19:38 so i need to install busybox? Jul 04 12:19:44 does not seems to work on my PC ? hello Jul 04 12:19:46 what are you actually trying to do? Jul 04 12:20:01 Leeds, interact with the system from shell Jul 04 12:20:07 why? Jul 04 12:20:19 just for fun.. Jul 04 12:20:28 and learn Jul 04 12:20:28 trying to run android emulator on my PC Jul 04 12:20:31 it is slow like hell Jul 04 12:20:54 rved, so what you're asking is how to pass info on which item is selected to that context menu handler? Jul 04 12:21:05 Android's shell environment is pretty limited - it's not really meant for interactive use Jul 04 12:21:08 yes Jul 04 12:21:12 <[A3G1S]> try using a androVM virtualbox iKillCypher Jul 04 12:21:20 and how i call my getProfile function Jul 04 12:21:22 [A3G1S], any clue how Jul 04 12:21:27 it's mostly there to support system scripts, and the odd bit of debugging Jul 04 12:21:27 <[A3G1S]> use google Jul 04 12:21:33 [A3G1S]: I prefer Bing Jul 04 12:21:43 <[A3G1S]> ah Jul 04 12:21:45 who was speaking about the lawnmower yesterday? Jul 04 12:21:48 <[A3G1S]> i prefer duckduckgo Jul 04 12:21:51 rved, info.id will have the ID returned by your adapter Jul 04 12:21:53 Leeds: i'm learning something on android kernel, and i need a shell on it for debug Jul 04 12:22:01 because I assume that any time you have to tell someone to use Google, it's because they're unable to for some reason Jul 04 12:22:07 Leeds: do you suggesst other way to do? Jul 04 12:22:21 virtx: firstly, this channel is for app development, not kernel/platform Jul 04 12:22:30 oh, sorry. Jul 04 12:22:42 secondly, if you'd actually answered my question about what it is you're trying to do, you might have got an answer Jul 04 12:22:51 [A3G1S], can you guide me I seems rather new to this Jul 04 12:22:53 <[A3G1S]> can u guys help me with animations, i am trying to animate an item(image) from listview, the thing is it stays behind the layout Jul 04 12:22:59 <[A3G1S]> well yes iKillCypher Jul 04 12:23:00 <[A3G1S]> i can Jul 04 12:23:07 [A3G1S]: I prefer http://bit.ly/v8vx4A Jul 04 12:23:22 <[A3G1S]> lol Jul 04 12:23:28 <[A3G1S]> thepoosh i like that thing Jul 04 12:23:29 Leeds, i said to you. i just want a running kernel for debug it Jul 04 12:23:35 <[A3G1S]> i used to fool people around with that Jul 04 12:23:37 <[A3G1S]> :D Jul 04 12:23:39 [A3G1S]: it's good against noobs Jul 04 12:23:43 <[A3G1S]> yeah i know Jul 04 12:23:59 virtx: no you didn't, you said your goal was to play with the shell... good luck with that Jul 04 12:24:00 <[A3G1S]> iKillCypher u know abt oracle vmbox ? Jul 04 12:24:03 [A3G1S], http://androvm.org/blog/ ? Jul 04 12:24:06 <[A3G1S]> if not install it Jul 04 12:24:09 yes I know about that Jul 04 12:24:12 it is possible to use checkbox and switch's in remoteviews ?? Jul 04 12:24:17 it is where you can install linux,windows etc Jul 04 12:24:20 what about it Jul 04 12:24:28 Gents, if I want to make a UI that looks a lot like the Preferences screens, would you suggest a listview or a linearlayout with custom-made little gray borders? Jul 04 12:24:35 Leeds, can you suggest to me other better way? Jul 04 12:24:36 [A3G1S]: have you read this? Jul 04 12:24:36 whathaveyoutried.com Jul 04 12:24:39 <[A3G1S]> yes iKillCypher Jul 04 12:24:48 <[A3G1S]> o_O Jul 04 12:24:51 <[A3G1S]> http://androvm.org/Download/androVM_vbox86p_4.1.1_r6.1-20130222-gapps-houdini-flash.ova Jul 04 12:24:53 <[A3G1S]> iKillCypher ^^ Jul 04 12:24:56 <[A3G1S]> download this too Jul 04 12:24:57 virtx: nope, not really Jul 04 12:25:00 <[A3G1S]> with androvm Jul 04 12:25:06 ok, thanks anyway Jul 04 12:25:10 <[A3G1S]> not yet thepoosh Jul 04 12:25:13 wont I need virtualBox Installed Jul 04 12:25:18 I dont have it at all o.O Jul 04 12:25:22 <[A3G1S]> lol Jul 04 12:25:22 [A3G1S]: you should totally read it Jul 04 12:25:26 iKillCypher: so install the fucking thing? Jul 04 12:25:27 <[A3G1S]> i will thepoosh Jul 04 12:25:38 <[A3G1S]> but rite now android animations are driving me crazy Jul 04 12:25:40 Leeds: lol Jul 04 12:25:41 <[A3G1S]> z index issues Jul 04 12:25:44 you dont need to be so rude Jul 04 12:26:04 <[A3G1S]> iKillCypher u should know basic stuff Jul 04 12:26:17 well I do :( Jul 04 12:26:18 brb Jul 04 12:26:34 <[A3G1S]> or u should google/bing/duckduckgo before saying/asking anything Jul 04 12:27:06 there is no requirement to know stuff... there is a requirement to make an effort rather than asking for help with everything Jul 04 12:27:12 <[A3G1S]> o_O Jul 04 12:27:25 <[A3G1S]> true that Jul 04 12:27:49 <[A3G1S]> but u can't teach coding to any1 Jul 04 12:27:56 <[A3G1S]> or basic computer stuff Jul 04 12:27:58 iKillCypher: you should read this too: whathaveyoutried.com Jul 04 12:28:08 Zharf: do you also know how to use the deleteContact function from the mainActvity? Jul 04 12:28:28 [A3G1S]: since you're working on animations in a listview Jul 04 12:28:39 do you know what will cause parallax in a listview? Jul 04 12:28:46 it's messing with my mind Jul 04 12:28:50 <[A3G1S]> layout Jul 04 12:28:51 and I don't get it Jul 04 12:28:52 <[A3G1S]> params Jul 04 12:28:57 hmmm Jul 04 12:29:01 explain? Jul 04 12:29:12 Zharf: i believe i have to do: db.deleteContact(contact) .. but how do i get the contact from the contextual menu>? Jul 04 12:29:15 <[A3G1S]> actually imageview is not able to scale to full screen Jul 04 12:29:17 it's a bug that happens sometime and I can't reproduce it Jul 04 12:29:21 or know why Jul 04 12:29:31 <[A3G1S]> its not a bug, i can reproduce it everytime Jul 04 12:29:44 <[A3G1S]> lol Jul 04 12:29:48 <[A3G1S]> man Jul 04 12:29:56 <[A3G1S]> i tried things in gridview, gridlayout Jul 04 12:30:01 can you explain to me how to reproduce this? Jul 04 12:30:01 <[A3G1S]> they were fine Jul 04 12:30:47 do you think it happens when I have an image view that "scales" to full screen and then back to smaller size? Jul 04 12:30:56 rved, get it somehow based on the id Jul 04 12:31:13 rved, don't really know how since I don't know all about your app, figure it out ;) Jul 04 12:31:15 db.deleteContact(db.getContact(info.id)); Jul 04 12:31:32 says "The method getProfile(int) in the type DatabaseHandler is not applicable for the arguments (long)" Jul 04 12:31:48 <[A3G1S]> yes thepoosh Jul 04 12:31:50 cast it to long :) Jul 04 12:31:51 <[A3G1S]> thats the issue Jul 04 12:31:59 hmmm Jul 04 12:32:01 shit Jul 04 12:32:03 ok moment Jul 04 12:32:03 <[A3G1S]> lemme show u my code, thats just a basic demo app Jul 04 12:32:24 <[A3G1S]> and i thing there is a bug in android gridview... i will explain it later... Jul 04 12:32:33 ok Jul 04 12:33:47 <[A3G1S]> please check pm thepoosh Jul 04 12:34:00 downloading Jul 04 12:34:08 <[A3G1S]> cool Jul 04 12:34:28 <[A3G1S]> coding standard sucks, because of experiments :P Jul 04 12:35:07 [A3G1S], I cant seem to import Jul 04 12:35:15 [A3G1S]: k, imported this into my eclipse Jul 04 12:35:19 <[A3G1S]> cool Jul 04 12:35:26 <[A3G1S]> http://i.imgur.com/wQ3LIG1.png Jul 04 12:35:42 <[A3G1S]> iKillCypher try little bit more Jul 04 12:35:49 <[A3G1S]> i can't help if u can't import Jul 04 12:36:05 <[A3G1S]> thepoosh click on the top right card... Jul 04 12:36:21 <[A3G1S]> i am trying to zoom it Jul 04 12:36:35 <[A3G1S]> but it doesn't seems like to get out of its own layout.. Jul 04 12:37:12 you are trying to animate the card to change the layout size? Jul 04 12:37:30 <[A3G1S]> no Jul 04 12:37:35 <[A3G1S]> i just wanna scale it Jul 04 12:37:39 <[A3G1S]> to full screen Jul 04 12:37:43 oh Jul 04 12:37:53 Is there a way to give each menu item the same ID as the records ID in the database? Jul 04 12:37:59 well, it's an issue 'cause you need to change the parent Jul 04 12:38:08 <[A3G1S]> yeah thats the issue Jul 04 12:38:20 <[A3G1S]> but Jul 04 12:38:29 maybe create a duplicate right on top of the card Jul 04 12:38:36 and it'll be in the root layour Jul 04 12:38:39 *layout Jul 04 12:38:46 <[A3G1S]> i tried that... Jul 04 12:38:46 rved, the adaptercontextmenuinfo has the id that your adapter in your list returns, it can be anything you want Jul 04 12:38:47 and THAT will animate to full screen Jul 04 12:38:49 ? Jul 04 12:39:11 <[A3G1S]> well that will animate to full screen but i wont be able to duplicate on top of the card Jul 04 12:39:12 rved, I guess cursoradapter returns database id but I'm not sure since I've almost never used it ;) Jul 04 12:39:15 <[A3G1S]> as Jul 04 12:39:20 ok, cause at the moment, the records id = 4 and the adapter info = 3 Jul 04 12:39:37 [A3G1S]: of course you can Jul 04 12:39:45 <[A3G1S]> view.getX() and view.getY() always returns the same value , because i was calling them in getview Jul 04 12:39:46 you have the x and y for the item clicked Jul 04 12:39:47 so i would like to set it Jul 04 12:40:26 rved, you could try adapter.getItemId(info.position) too and see what happens.. Jul 04 12:40:31 <[A3G1S]> i need to work on that, i can do that, but i was just wondering whether i can scale from its current layout or not... Jul 04 12:41:04 hi, wondering what's the "common" method to get a callback for when the whole activity layout / view is done? onResume() actually doesn't wait for that so I'm getting some 0,0 when getting positions Jul 04 12:41:10 ( and nullpointers ) Jul 04 12:41:26 <[A3G1S]> thepoosh, x and y was always same Jul 04 12:41:27 <[A3G1S]> so Jul 04 12:41:36 wtf?! Jul 04 12:41:59 [A3G1S]: in onClick you should get the view that was clicked Jul 04 12:42:06 <[A3G1S]> well Jul 04 12:42:07 and that has the points Jul 04 12:42:12 dzan, by "done" you mean, what? Jul 04 12:42:15 for (x,y) Jul 04 12:42:17 <[A3G1S]> try to uncomment 149 and 150 Jul 04 12:42:21 <[A3G1S]> and check the log Jul 04 12:42:30 <[A3G1S]> click on the items to check log Jul 04 12:42:31 <[A3G1S]> :P Jul 04 12:42:40 skrebbel, i'm using reflection to get the position of the navigation tabs in the actionbar, doing it in onResume gets me a nullpointer Jul 04 12:42:45 <[A3G1S]> u will see what i am trying to say Jul 04 12:42:49 skrebbel, it does work when I rotate the device Jul 04 12:42:56 so my code is fine, it's just not initialized at that moment yet Jul 04 12:43:16 rved, http://stackoverflow.com/a/10891343 might help Jul 04 12:43:55 thx ill look into ti Jul 04 12:45:10 [A3G1S]: I'a an idiot Jul 04 12:45:15 <[A3G1S]> lol Jul 04 12:45:20 of course you're getting the same info Jul 04 12:45:23 <[A3G1S]> yeah Jul 04 12:45:25 it's from the screen Jul 04 12:45:28 <[A3G1S]> yup Jul 04 12:45:29 <[A3G1S]> :\ Jul 04 12:45:37 <[A3G1S]> any work around ? Jul 04 12:45:38 but you can get the position of the scrollview Jul 04 12:45:48 and then getItem(int position) Jul 04 12:45:54 will give you the data info Jul 04 12:45:58 <[A3G1S]> yeah i can calculate that Jul 04 12:46:02 while getX and getY Jul 04 12:46:11 will give you the visual info Jul 04 12:46:16 <[A3G1S]> ah Jul 04 12:46:35 seems normal? Jul 04 12:46:40 <[A3G1S]> yeah Jul 04 12:46:42 <[A3G1S]> got it Jul 04 12:46:49 k Jul 04 12:46:57 let me know how this works out for you Jul 04 12:47:06 if you're trying to do 3d flip animations Jul 04 12:47:12 <[A3G1S]> ok ok thanks for the help man, i will let u know.. Jul 04 12:47:22 I found back in the day a cool code that does that Jul 04 12:47:32 <[A3G1S]> can u show me the code ? Jul 04 12:47:38 yes Jul 04 12:47:41 found it in a blog Jul 04 12:47:44 just a minute Jul 04 12:47:47 I'll find it Jul 04 12:49:19 <[A3G1S]> btw this 3d flip works properly, just comment 145-171 and uncomment 172 line, also open flipanimation.java and change scale_default to 0.75f Jul 04 12:49:21 <[A3G1S]> try this ^^ Jul 04 12:49:31 [A3G1S]: this is for starter: http://developer.android.com/training/animation/cardflip.html Jul 04 12:49:40 <[A3G1S]> yeah i read that ^^ Jul 04 12:49:51 <[A3G1S]> this works perfectly... Jul 04 12:50:20 [A3G1S]: this is what I used: http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html Jul 04 12:50:28 <[A3G1S]> if i am able to get imageview over another with proper positions i will defo go with the above 1... Jul 04 12:50:29 it worked like a charm Jul 04 12:51:38 I published a card trick app back in the day Jul 04 12:51:41 that used that Jul 04 12:51:47 it was very nice Jul 04 12:51:56 <[A3G1S]> k k Jul 04 12:51:59 <[A3G1S]> i will defo try it Jul 04 12:52:27 gl Jul 04 12:53:06 [A3G1S], I keep getting fail to open application ? Jul 04 12:55:53 <[A3G1S]> thanks man.. Jul 04 12:56:11 <[A3G1S]> iKillCypher can u tell me the error ? Jul 04 12:56:20 nvm sloved it Jul 04 12:56:24 <[A3G1S]> cool Jul 04 12:56:49 rved, I have to go, I'll be on in 1.5h or so, maybe Jul 04 12:57:00 ok thx alot zharf Jul 04 12:57:11 bye Jul 04 13:14:17 on a contextual float menu: how do you make the row id's from AdapterContextMenuInfo match your row_id of the sqlite database? Jul 04 13:14:25 so you can delete them by id Jul 04 13:15:54 rved: i don't know the context (har) but shouldn't they already be the same? Jul 04 13:16:17 no, contextual floating menu starts at 0 Jul 04 13:16:21 database starts at 1 Jul 04 13:16:26 so it's just a new count Jul 04 13:16:34 now i can't delete by id :( Jul 04 13:16:47 are you looking at the id or the position? Jul 04 13:17:44 id Jul 04 13:18:03 i want the item.id be the same as the record's row id in the sqllite datbase Jul 04 13:18:10 so i can simply delete by id Jul 04 13:18:16 I've finally managed to get USB tethering from adb shell but now nslookup does not resolve hostnames even though 8.8.8.8 is reachable and specified in /etc/resolv.conf Jul 04 13:18:31 it should already be the same, if you're querying and displaying the same table you're intending to delete from Jul 04 13:18:47 why would nslookup use an ip of 0.0.0.0 when /etc/resolv.conf contains 8.8.8.8 and 8.8.4.4 ??? Jul 04 13:19:06 so even when my records id are : 55, 56, 59 .. at the moment i would return item.id's 0, 1, 2 Jul 04 13:19:10 when I try nslookup google.com 8.8.8.8 that works Jul 04 13:19:17 but nslookup google.com does not Jul 04 13:20:15 Question: Whats the best practice to use a formatted string for R.string strings? just getResources().getString(*) with %s ? Jul 04 13:21:26 or how do i get my object from a contextual menu? Jul 04 13:23:03 so i can use a custom function which i already have on the class to get the ID Jul 04 13:27:13 rved: what loader are you using? Jul 04 13:27:16 CursorLoader? Jul 04 13:27:31 if the ids are different, something else is happening Jul 04 13:31:29 pjdelport: http://paste2.org/fBV3wUct Jul 04 13:33:54 hey fellers Jul 04 13:34:10 using GCM... If I set time to live to something like 2 seconds... Will I always receive the message? Jul 04 13:34:26 After my device going to sleep for a couple of minutes, it no longer receives messages (time to live set to 2 weeks) Jul 04 13:34:36 and then after 5 minutes of phone usage Jul 04 13:34:38 rved: ah, if you're not using something like CursorLoader / CursorAdapter, then the ids you'll see are whatever your adapter gives Jul 04 13:34:41 it starts receiving them again Jul 04 13:34:48 so you'll have to look at ContactImageAdapter Jul 04 13:35:06 zhulikas, if you set TTL to 2 seconds Jul 04 13:35:13 what do i need to add Jul 04 13:35:21 and it's not delivered in 2 seconds, you won't get it. Isn't it obvious? :) Jul 04 13:35:28 rved: if you're backing something from an array, instead of a cursor/loader, the ids will probably be the array indexes Jul 04 13:35:34 powered down devices tend to power down radios as well :) Jul 04 13:35:34 what about prioritizing messages with smaller TTL? Jul 04 13:35:47 no prioritization helps if wifi/data is off. Jul 04 13:35:51 true. Jul 04 13:35:56 but let's say wifi is on Jul 04 13:36:06 do messages with smaller TTL get received faster? Jul 04 13:36:20 nope. Jul 04 13:36:29 if so, I'm thinking of sending two messages, one with TTL 2 seconds, one with TTL 2 weeks, both having some coupling key Jul 04 13:36:30 messages are always delivered ASAP. Jul 04 13:36:37 and in the device I would know if I already handled the message Jul 04 13:36:39 why would you do that? Jul 04 13:36:39 ok Jul 04 13:36:45 Leeds: do you know what is the default ip address of android emulator ? i want to comunicate from emulator to host system and viceversa Jul 04 13:36:47 that's silly. Jul 04 13:36:56 I assumed message with TTL 2 would have higher priority Jul 04 13:37:06 wrong assumption then Jul 04 13:38:18 pushes are always delivered ASAP, there's no sense in having priorities Jul 04 13:38:29 if you need to overwrite them, collapse them. Jul 04 13:39:18 hmm, true Jul 04 13:39:18 :) Jul 04 13:41:52 pjdelport: http://paste2.org/EL8wmZ22 what do i need to add/change? Jul 04 13:44:31 rved: it depends entirely on how you get from the DB cursor to your actual data array there Jul 04 13:44:43 if you want to use an intermediate array, you'll need to relay the _ID column Jul 04 13:45:06 in whatever item representation you use Jul 04 13:45:18 and the end code will look at that id Jul 04 13:46:20 CursorLoader/CursorAdapter implement things so that the ListView stable id is the same as the row _ID, but if you roll your own adapter, you need to take care of that yourself Jul 04 13:47:14 hmm Jul 04 13:51:34 pjdelport: i've used this tutorial http://www.androidhub4you.com/2012/09/hello-friends-today-i-am-going-to-share.html Jul 04 13:51:53 do you know what is the quickest way to make the contextual menu item.id work? Jul 04 13:52:32 stupid client Jul 04 14:13:52 Maybe a Studip Question: will passing the baseContext() to an other Activity leak the Activity thats Context is passed? Jul 04 14:16:48 i guess I should use applicationContext() Jul 04 14:22:14 Could someone help me out: using a custom adapter: ContactImageAdapter to display my database records in a list view… all works, but when i use a contextual floating menu, the id's from info (adapter context menu info) don;t match with the database records id's Jul 04 14:22:15 http://paste2.org/EL8wmZ22 Jul 04 14:22:23 http://paste2.org/fBV3wUct Jul 04 14:22:26 how do i make them match? Jul 04 14:33:02 Well no, nowhere do you return the database id as the item id Jul 04 14:36:04 Hi all Jul 04 14:36:27 I'm trying to parse a bit of JSON with the following format: Jul 04 14:38:13 [{'random name string' : [ { 'id': 1, 'image': 'somepic.jpg'}, { 'id': 2, 'image': 'somepic2.jpg'} ] } ] Jul 04 14:39:02 I'm finding it difficult to know how to start as to get it to read in I'm having to set JSONReader to lenient Jul 04 14:39:16 what's the outer array for? Jul 04 14:39:45 I dont know but its from an existing feed that someone else created , (always the way lol) Jul 04 14:40:09 so I can't ask for it to change Jul 04 14:41:39 all I want to do is get the inner objects into a ArrayList or something like that Jul 04 14:42:13 and also access that random string Jul 04 14:43:49 well, JSONTokener(jsonString).nextValue() will give you the outer array (JSONArray), which you can then "iterate over" (grab the one object) Jul 04 14:47:10 for that object you'll have to do something along the lines of jsonObject.keys().next() to get the random string (why do you get a random string as key anyway?), and use it to grab the inner array Jul 04 14:48:02 SimonVT, then how do i delete my record from the contextual float menu? Jul 04 14:48:23 SimonVT: if i can get the id's to match between info.id and the records id, i can simply delete it Jul 04 14:48:43 Implement getItemId in your adapter Jul 04 14:50:05 SimonVT: I'm using a custom adapter http://paste2.org/EL8wmZ22 how do i implement getItemID ? Jul 04 14:50:36 in my activity i use: "adapter = new ProfileImageAdapter(this, R.layout.simplerow, imageArry);" Jul 04 14:50:48 You override the method called getItemId and write an implementation Jul 04 14:51:13 I know Thorbear its very annoying Jul 04 14:53:00 SimonVT: like this? http://paste2.org/3Mc2gMyg Jul 04 14:53:04 is there no predictable pattern to it at all? Or is it just supposed to be extra data? Jul 04 14:54:08 If your dataset is a cursor, use cursoradapter .. it implements getItemId for youy Jul 04 14:54:53 at this moment I'm using an array Jul 04 14:55:15 please see http://paste2.org/fBV3wUct Jul 04 14:55:31 I'm new to databases and display records in list view with images Jul 04 14:56:25 JakeWharton: did I understand correctly that you were in the process of implementing a ContentProvider/CursorLoader system for a database? Jul 04 14:56:49 yes Jul 04 14:57:07 Thorbear, its just an array of objects with a random string that contains an array of objects Jul 04 14:57:22 how to send from a dialogfragment back to a fragment (fragments start the dialogfragment) Jul 04 14:57:49 Do you happen to have a somewhat complicated mess of tables in that system? with a bunch of foreign keys, one-to-many and many-to-many connections? Jul 04 14:58:15 MickeySoFine: k Jul 04 15:01:08 JakeWharton: I'm asking because I'm doing that too, and I was curious as to what you were doing with inserts/updates/deletions. Especially the insert-part, if you have one-to-many connections, as there doesn't seem to be any support for doing that in the background in the existing abstract classes. Jul 04 15:02:22 hey guys, would you give me an advice, please. Im loading a set of images in custimized ArrayAdapter (in getView) with help of ThreadPoolExecutor, so the question is how do I post them? I need every image to be displayed as soon as it been loaded. Shouldn Jul 04 15:02:34 SimonVT, i don't get it, how do i overwrite the getItemID with the code I'm using. and in which class should i type it, main activity, database helper? using http://paste2.org/EL8wmZ22 and http://paste2.org/fBV3wUct Jul 04 15:03:18 Shouldn't I post them in postExecute() of threadPoolExecutor using some king of handler or somtheing? Jul 04 15:03:54 *afterExecute() i mean Jul 04 15:06:36 Thorbear, any idea how I might do this with gson? I've managed to drill down to the objects inside with that but I cant work out how to access that random string Jul 04 15:08:26 MickeySoFine: not really, I've only really parsed json in the way that I just described :) feeding the string to JSONTokener and iterating over JSONArray and JSONObject Jul 04 15:08:42 what control do you usually use to display a time or date that can be changed with a picker dialog? Jul 04 15:09:38 just a clickable textview? Jul 04 15:13:01 is it necessary to manually provide images at multiple resolution (hdpi, mdpi, etc) or can you just provide an xhdpi image and have it scale down automatically? Jul 04 15:14:41 you can, but it probably uses more memory and processing power than it would when providing all sizes Jul 04 15:29:59 My Goal: match database row id to the contextual info.id… How do i overwrite the getItemID with the code I'm using. and in which class should i type it, main activity, database helper? using http://paste2.org/EL8wmZ22 and http://paste2.org/fBV3wUct Jul 04 15:35:50 im making an sms app and Im wondering how to request a new threadid or _id for each sms? Jul 04 15:38:58 Anyone familiar with trello by chance? Jul 04 15:40:59 Currently my list contains one textview for each item. how can i realize it when the user clicks on an item, a little more details come visible under the textview of the item? is it good to make the extra views inside each item but default view.gone , when click --> view.visible? or is there a better solution? Jul 04 15:41:59 FrancscoV, i did what you describe and found no problems Jul 04 15:42:03 it works fine like that Jul 04 15:42:32 skrebbel: ok :) Jul 04 15:42:55 the only problem with it is that typically, clicking an item in a list means "choose this item". i added a button to the right of each item for that, and it works nice and looks fine, but it's not completely 100% androidy Jul 04 15:43:50 FrancscoV, in fact i first had two different layout types in my listview adapter, one for "some data" and one for "all data". it was significantly more cumbersome than just toggling some visibility properties Jul 04 15:45:23 skrebbel: so u use a second layout when an item is clicked? Jul 04 15:47:17 i used to do that Jul 04 15:47:19 but it was a mess Jul 04 15:47:35 much simpler to use a single layout for all items, and toggle the visibility of some views in each layout Jul 04 15:57:57 if i have an array list with database records. can i do this: db.deleteContact( dataList.getItemAtPosition(info.position) ); Jul 04 15:58:28 in my database helper class i have public void deleteContact(Contact contact) Jul 04 16:00:38 hey Thorbear I sorted it with JsonReader which comes in the GSON .jar! Jul 04 16:22:24 i have question which puzzles me. can someone provide an straight answer? imagine i wanna do something in another thread, like fetching gps/location stuff which as recommonded in documents, must use a backgroudn thread. so here is the question, whats the difference between doing/creating a thread in background via AsyncTask and "Thread thread1 = new Thread(new Runnable()"? Jul 04 16:22:47 Anyone have experience with swiping left and right between activities or fragments? Jul 04 16:23:15 if I have a function like : public void deleteProfile(Profile profile) { Jul 04 16:23:28 is Profile an object? or something else? Jul 04 16:23:50 i'd like to implement something that does that and want to make sure ot do it right the first time. looks like i should be using fragments and fragment pagerAdapter? Jul 04 16:29:35 omid8bimo: with asynctask you get a lot of things for free, like posting progress updates to the UI thread (if the task takes a long time to do), or generally getting the resource you acquired back to the gui thread Jul 04 16:31:47 Thorbear: ok. so basically both are the same but with different approaches? Jul 04 16:33:01 AsyncTask is just a class that makes it easier to use short-lived background threads, afaik it uses Thread and Runnable under the hood Jul 04 16:33:44 Thorbear: ok fair enough. one more thing, is it possible to update something on the UI from thread/runnable run() method? Jul 04 16:35:28 Hi, can somebody please tell me how i can get to the original 1.6.0 java ? i have 1.6.0_27 and want to go back .... Jul 04 16:36:18 Well, you'll need some sort of listener setup, you can't update the UI objects directly from the background thread. If you intend to do a lot of UI changes I really suggest you just use AsyncTask, or something similar (there are implementations for more specific needs, like querying a database) Jul 04 16:37:14 SlowMoe: why on earth would you want an un-updated version of java? Hosting a security-hole party? Jul 04 16:38:08 Thorbear: all right. thanks for the info Jul 04 16:38:37 lol i am @ 1.7 atm, but was trying to build a rom. I got stuck, and the dev sayed im on the wrong java, and i should get 1.6 SE Jul 04 16:39:48 so get the latest version of 1.6 ? android doesn't work with 1.7, but works with all versions of 1.6 (the updates are mostly security fixes) Jul 04 16:41:40 Thorbear, this is what i get : Your version is: java version "1.6.0_27".The correct version is: Java SE 1.6. Jul 04 16:42:35 guess i need the SE ? Jul 04 16:43:15 that sounds very strange... unless you are using Java ME or EE, 1.6.0_27 is SE Jul 04 16:43:22 anyhow: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html Jul 04 16:43:45 from _0 for _45 Jul 04 16:43:53 from to * Jul 04 16:44:34 SlowMoe, those are minor version numbers Jul 04 16:44:42 exclusively security fixes, no API changes Jul 04 16:44:57 if you REALLY have to use java6, use _45. Jul 04 16:45:12 Or later, no idea if 45 is still latest Jul 04 16:45:17 it is Jul 04 16:45:29 thx a lot, for help will check this out :D Jul 04 16:54:43 Thorbear, sonOfRa, it worked, thanks a lot ;) Jul 04 16:57:26 Is it possible to get the current height of the background on a linearlayout specified using android:background in an xml? Jul 04 17:43:21 How can I specify the position of a textview inside a viewgroup relatively? Jul 04 17:43:34 like how do I set its Y-position? setY is not working Jul 04 17:44:27 Positioning views absolutely is usually not a good idea Jul 04 17:44:38 use margins and such =) Jul 04 17:46:18 there is a bunch of positioning features you can use, relatively absolute x/y position isn't one of them, and this helps prevent overlapping elements =) Jul 04 17:47:30 Thorbear: i tried margins but that got screwed when the views height/width changed Jul 04 17:48:13 what kind of positioning are you really trying to do? Jul 04 18:03:33 What's the best resource for learning android development (I know nothing Android) for a professional Java developer? d.android.com? Jul 04 18:04:28 tom39291: it's a start to look at the main android dev site first Jul 04 18:04:55 Sixmsj: Indeed, but if there's a particularly good book, I'd get that. Jul 04 18:05:38 tom39291: i'm probably in your position, just started learning this week for my company Jul 04 18:05:53 Looks like Google's docs are good. Jul 04 18:06:38 Anyone keeping a eye on Tizen? Jul 04 18:07:00 Sixmsj: You're in #haskell too. Too bad there aren't more haskell jobs! Jul 04 18:07:13 Google Checkout stopped paying out for me Jul 04 18:07:15 Anyone have this issue? Jul 04 18:08:36 NSA Jul 04 18:10:14 i have a MainActivity and EditItem activity's Jul 04 18:10:34 when i launch intent EditItem it goes quickly to EditItem layout Jul 04 18:10:47 when i press on hardware button back Jul 04 18:10:53 your quickly back to MainActivity Jul 04 18:11:04 but when your pressing the back in the action bar (on the logo) Jul 04 18:11:10 it takes more time to return Jul 04 18:11:14 any ideas why this is? Jul 04 18:12:38 tom39291: yeah I'm a huge beginner on haskell Jul 04 18:12:50 rved: It's processing through to return instead of just reverting to the previous state? Jul 04 18:12:52 trying to learn too much this summer, between javascript/node, haskell, and java/android Jul 04 18:13:43 Bleeptech: i haven't specified any action myself, just made an intent in the MainAcitivity.. startActivity(intent)… and added my new activity in the Manifest Jul 04 18:15:53 When pressing the 'up' key in actionbar takes a lot of time Jul 04 18:21:22 would there be any way for my service to force a clipboard-paste onto another app ? Jul 04 18:24:36 I have a simple Activity that shows an AlertDialog. While the AlertDialog is displayed, if I turn my phone then my app crashes: Jul 04 18:24:43 07-04 19:18:34.695: E/WindowManager(18027): Activity org.bitbucket.dicetherapy.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40542108 that was originally added here Jul 04 18:25:00 The dialog is very simple. Jul 04 18:25:09 I just show it. Jul 04 18:25:15 I don't keep a member variable around for it. Jul 04 18:26:23 Use DialogFragment or Activity#showDialog Jul 04 18:29:40 I see. Jul 04 18:30:58 JakeWharton, here? Jul 04 18:31:52 Hmm. Jul 04 18:32:02 If I use "android:configChanges="orientation|keyboardHidden"", the problem disappears! Jul 04 18:32:10 For the activity. Jul 04 18:32:40 -.- Jul 04 18:33:03 magic Jul 04 18:33:12 Is that a good idea? Jul 04 18:33:25 * xorgate calms SimonVT down Jul 04 18:33:40 SimonVT: This only prepares you for the weekend! Jul 04 18:33:47 Gotta get in the mood. Jul 04 18:34:01 I'm new to Android programming. Jul 04 18:34:05 No need to be rude. Jul 04 18:34:07 No, that's not a good idea Jul 04 18:34:23 Okay. Jul 04 18:34:41 It's not a good idea until you know more about android Jul 04 18:34:43 We're not rude, it's just somewhat of an inside joke ;) Jul 04 18:35:48 for the menu in your: do you always have to inflate it via a xml file, or can you also create it completely in java Jul 04 18:39:11 guys, after long hours of search in the internet couldn't find a solution for this problem, "Couldn't create SOAP message due to exception: XML reader error" can someone help please? Jul 04 18:40:49 Extending a DialogFragment will definitely fix it, right? I ask because there's an SO question that seems to suggest that this can happen with DialogFragment, too. Jul 04 18:40:51 anyone knows how to fix something like this? Jul 04 18:40:51 http://pastie.org/private/ap7vpv5x415mrn59yqweq Jul 04 18:41:14 got it trying to use OkHttp with Volley Jul 04 18:42:01 TacticalJoke, you get the issue because you're not dismissing the Dialog before the Activity is destroyed. Now, you could do that, but then you'd also have to write logic to re-create the Dialog when the new Activity instance is created. When using DialogFragment, the dismissing and re-creating is handled entirely by the framework Jul 04 18:42:06 And you wont get that issue Jul 04 18:42:22 [A3G1S], did you try it out? Jul 04 18:42:52 hey SimonVT Jul 04 18:43:14 Also, re. configChanges .. If configChanges "solves" your issue, you haven't solved your issue at all. You've just hidden it. I guarantee you there's cases where the issue will show up that you haven't considered Jul 04 18:43:34 There's very few cases where you actually NEED to handle configChanges Jul 04 18:43:37 Hello Napalm Jul 04 18:43:53 TacticalJoke: like if someone inserts their device into a dock with your activity open it will cause the problem Jul 04 18:44:28 I have yet to see someone using a dock. Jul 04 18:44:34 SimonVT: Okay. Jul 04 18:45:01 kakazza: now you have, i have a nexus 7 and galaxy nexus dock Jul 04 18:45:12 Go to Developer Options and enable "Don't keep activities" and set "Background process limit" to "No background processes" Jul 04 18:45:19 i have it auto bluetooth connect to my pc when i dock Jul 04 18:45:25 really handy Jul 04 18:45:27 If you can leave your activity and re-enter it exactly as it was when you left it, you're doing it right Jul 04 18:45:37 What do you do over BT, tho? Jul 04 18:45:45 play music Jul 04 18:45:46 <[A3G1S]> thepoosh yeah did, and shifted to use gridlayout for the animations Jul 04 18:45:51 (most people who add configChanges to solve issues fails this test) Jul 04 18:45:54 <[A3G1S]> they are working nicely Jul 04 18:45:57 so it comes out my sound system Jul 04 18:45:59 cool Jul 04 18:46:04 did you see my link? Jul 04 18:46:24 <[A3G1S]> the pastie 1 ? Jul 04 18:46:32 yes Jul 04 18:46:36 <[A3G1S]> checking Jul 04 18:46:36 thepoosh, same code, different sensor object, just figure out how to retrieve it Jul 04 18:46:39 oops Jul 04 18:46:45 LOL Jul 04 18:46:50 was scrolled back Jul 04 18:46:57 [A3G1S], just found this Jul 04 18:46:57 https://github.com/square/okhttp/issues/184 Jul 04 18:47:06 guys, after long hours of search in the internet couldn't find a solution for this problem, "Couldn't create SOAP message due to exception: XML reader error" can someone help please? Jul 04 18:47:07 apparentlly it's a known issue of OkHttp Jul 04 18:47:26 JakeWharton, https://github.com/square/okhttp/issues/184 - this should be published or patched Jul 04 18:48:05 can someone help please, http://stackoverflow.com/questions/17476449/xml-document-structures-must-start-and-end-within-the-same-entity ? Jul 04 18:48:22 no Jul 04 18:48:27 that is a question for ##java Jul 04 18:48:37 <[A3G1S]> thepoosh i am n00b with ndk Jul 04 18:48:40 <[A3G1S]> never tried Jul 04 18:48:40 <[A3G1S]> :P Jul 04 18:48:57 has nothing to do with ndk, it's OkHttp Jul 04 18:49:02 pure java Jul 04 18:49:15 had to find this crap after unexplained crash Jul 04 18:49:22 fucking stack trace Jul 04 18:49:28 took me forever to find this Jul 04 18:49:36 15 uninstall-reinstall Jul 04 18:49:38 :S Jul 04 18:49:41 <[A3G1S]> lol Jul 04 18:50:03 <[A3G1S]> i wrote my own http classes for get and post Jul 04 18:50:07 <[A3G1S]> i like em so much Jul 04 18:50:09 <[A3G1S]> :P Jul 04 18:51:03 jayn: its invalid xml coming back from the SOAP service.. what url is it requesting? Jul 04 18:51:08 anyone else seeing a lot of errors/failed orders in google wallet? Jul 04 18:51:33 Napalm, http://localhost:8088/service?wsdl Jul 04 18:51:52 <[A3G1S]> thepoosh i never tried okhttp though... Jul 04 18:52:02 jayn: localhost.. and how are we suppose to browse that? pastebin your result Jul 04 18:52:24 [A3G1S], well, Jake told me I should use it and that it's a great client Jul 04 18:52:40 <[A3G1S]> k k Jul 04 18:52:42 I said "what the hell, Jake knows what he's talking about" Jul 04 18:52:53 <[A3G1S]> i should try this out... Jul 04 18:53:34 <[A3G1S]> seems like they have work around for this Jul 04 18:54:01 they have a few Jul 04 18:54:09 I'll try it on Sunday Jul 04 18:54:18 OkHttp is great. It was accepted back into AOSP. Jul 04 18:54:25 (live in Israel, friday and saturday are days off) Jul 04 18:54:38 <[A3G1S]> lol nice Jul 04 18:54:50 <[A3G1S]> i will try this asap Jul 04 18:54:54 <[A3G1S]> dont know when Jul 04 18:54:55 <[A3G1S]> :P Jul 04 18:55:01 Napalm, http://pastebin.com/A5CMvzwk Jul 04 18:55:01 my weekend started 4 hours ago Jul 04 18:55:09 Napalm, sorry for late ^^ Jul 04 18:55:15 <[A3G1S]> o_O Jul 04 18:55:15 <[A3G1S]> nice Jul 04 18:55:30 * [A3G1S] lives in india and here saturday and sunday are off Jul 04 18:56:28 cool Jul 04 18:56:49 <[A3G1S]> what u do for living thepoosh ? Jul 04 18:56:59 <[A3G1S]> if u dont mind... Jul 04 18:57:04 <[A3G1S]> u work for a company ? Jul 04 18:58:00 how do i add an ID to menu's i add in onCreateOptionsMenu http://paste2.org/twUKkg4z Jul 04 18:58:39 [A3G1S], I work here Jul 04 18:58:39 http://www.glide.me/ Jul 04 18:58:46 as an Android dev guy Jul 04 18:58:50 <[A3G1S]> nice Jul 04 18:58:56 :D Jul 04 18:59:06 try playing with it Jul 04 18:59:19 <[A3G1S]> yeah opening it Jul 04 18:59:22 it's not that stable but it's much better than 3 months ago Jul 04 18:59:25 :D Jul 04 19:01:10 <[A3G1S]> wohaa Jul 04 19:01:17 <[A3G1S]> app downloads are growing rapidly Jul 04 19:01:32 yes, we were doing quite well this month Jul 04 19:02:21 how do i add an ID to menu.add ? Jul 04 19:02:50 Pass it to the add method Jul 04 19:03:21 <[A3G1S]> nice man... Jul 04 19:03:37 :D Jul 04 19:03:53 wrote the entire DB module and server module Jul 04 19:03:55 <[A3G1S]> i will try to play with it... Jul 04 19:03:56 for this Jul 04 19:03:59 <[A3G1S]> nice Jul 04 19:04:00 <[A3G1S]> nice Jul 04 19:04:06 <[A3G1S]> which server u used ? Jul 04 19:04:10 <[A3G1S]> i mean technology Jul 04 19:04:15 Node.js Jul 04 19:04:21 Can anyone please tell if I can create a UI like this on android: http://imgur.com/Bph07Zq Jul 04 19:04:21 <[A3G1S]> nice Jul 04 19:04:25 yep Jul 04 19:04:34 our server guy is a happy camper Jul 04 19:04:35 <[A3G1S]> best for even driven stuff Jul 04 19:04:54 <[A3G1S]> ofc u can do that xpl0iter Jul 04 19:04:59 <[A3G1S]> thats very basic Jul 04 19:05:10 But please don't ;d THat looks horrible Jul 04 19:05:29 <[A3G1S]> lol Jul 04 19:05:35 [A3G1S] I was in doubt because of that big actionbar. Jul 04 19:05:36 <[A3G1S]> SimonVT +1 Jul 04 19:05:43 ok! Jul 04 19:05:47 xpl0iter, that is one ugly UI Jul 04 19:05:53 <[A3G1S]> lol Jul 04 19:06:28 What if I make the stories on tiles? Jul 04 19:06:40 <[A3G1S]> well Jul 04 19:06:45 <[A3G1S]> thats ur dcsn Jul 04 19:06:45 Tiles with the pic from the news post. Jul 04 19:07:15 [A3G1S] Obviously my decision was not good lol! Any suggestions would be great Jul 04 19:07:30 <[A3G1S]> i will prolly learn Node.js thepoosh Jul 04 19:07:38 <[A3G1S]> i already know RoR and iOS Jul 04 19:07:45 it's worth it for streaming based systems Jul 04 19:07:51 <[A3G1S]> yeah Jul 04 19:07:58 Obj-C is ugly as shot Jul 04 19:08:06 <[A3G1S]> lol Jul 04 19:08:09 <[A3G1S]> well Jul 04 19:08:16 <[A3G1S]> Obj C has its own advantages Jul 04 19:08:22 <[A3G1S]> but java is my baby Jul 04 19:08:26 <[A3G1S]> i <3 java Jul 04 19:08:33 you are a sick sick puppy Jul 04 19:08:46 <[A3G1S]> lol Jul 04 19:09:26 [A3G1S], have you read this? Jul 04 19:09:26 <[A3G1S]> k dude i gtg now... sleeping time... 1 a.m in here Jul 04 19:09:26 http://discuss.joelonsoftware.com/?joel.3.219431.12 Jul 04 19:09:26 <[A3G1S]> :P Jul 04 19:10:15 <[A3G1S]> bookmarked Jul 04 19:10:20 SimonVT: So, I used DialogFragment, and now I don't have the error, but any text entered in my text box (in the AlertDialog) is cleared when the phone is turned. Jul 04 19:11:10 night Jul 04 19:11:18 <[A3G1S]> nn Jul 04 19:11:23 Does your text box have an id? Jul 04 19:12:26 No. It's created dynamically. Jul 04 19:12:41 There's your problem Jul 04 19:12:42 then save instancestate and restore it Jul 04 19:12:47 yourself Jul 04 19:12:57 The framework will retain and restore state for views with id's Jul 04 19:13:06 Omg, my ListView gets cleared when I turn my phone! Jul 04 19:13:08 This is crazy. Jul 04 19:13:13 If your views don't have id's, then it's your problem Jul 04 19:13:13 TacticalJoke, http://developer.android.com/guide/topics/resources/runtime-changes.html#RetainingAnObject Jul 04 19:13:18 Why can't I just say "android:configChanges="orientation""? Everyone is recommending that on SO. Jul 04 19:13:29 just read the docs Jul 04 19:13:30 So many questions have that answer with loads of upvotes. Jul 04 19:13:36 you can, it's not the recommended practice Jul 04 19:13:51 So, the only drawback is with plugging in devices or something? Jul 04 19:14:00 no Jul 04 19:14:06 why not handle the config changes? Jul 04 19:14:19 thepoosh: It's so tedious! Jul 04 19:14:26 O_O Jul 04 19:14:36 this is a bad answer Jul 04 19:14:40 I don't want it to create a new Activity. Jul 04 19:14:50 You don't always have a choice Jul 04 19:14:52 you have no control over this Jul 04 19:15:41 e.g. in low memory situations, the user could switch to another app.. And android could reclaim your process while the other app is active Jul 04 19:15:59 That'll be roughly equivalent to an orientation change Jul 04 19:16:20 That article has a "Handling the Configuration Change Yourself" section. Jul 04 19:16:21 == broken app, since you just added configChanges and didn't fix your issues Jul 04 19:16:56 Once your app works without configChanges, then you can add configChanges Jul 04 19:18:53 how do i add an ID to menu's i add in onCreateOptionsMenu http://paste2.org/twUKkg4z Jul 04 19:19:01 i want to create a action for this Jul 04 19:19:02 but how... Jul 04 19:19:05 please answer ;) Jul 04 19:19:14 rved, you already got the answer Jul 04 19:19:24 oh sorry, i must have missed it Jul 04 19:19:42 no 'rved' no sound Jul 04 19:19:55 :S Jul 04 19:20:11 ah "SimonVT: Pass it to the add method" Jul 04 19:24:59 Why doesn't the Android system take care of this app-changes thing? Jul 04 19:25:28 :S Jul 04 19:25:33 Huh? Jul 04 19:25:38 it does most of the work for you Jul 04 19:25:43 don't be lazy Jul 04 19:26:07 The system doesn't know what state to retain Jul 04 19:38:02 If i want to create a layout where i have each row that contains something (text view, some text, etc...) in its own padded box, whats the best way to do this? Jul 04 19:38:24 and woudl i need a scrollview to make it scrollable? I was trying to use my scrollview and put multiple linearlayouts in it but scrollview doesn't like that Jul 04 19:39:41 and id on't want these rows to overlap... Jul 04 19:41:45 Use a listview Jul 04 19:42:41 would a listview be the main container, then something else inside it for each of the rows? Jul 04 19:52:56 Hi, when I do: adb install miesco.apk, it says: Failure [INSTALL_FAILED_ALREADY_EXISTS] Jul 04 19:53:29 uninstall, reinstall Jul 04 19:53:32 Miesco, Jul 04 19:54:48 okay Jul 04 19:54:51 adb install -r miesco.apk Jul 04 19:54:53 but how do I make it run like eclipse does Jul 04 19:56:24 well, you need to uninstall the exosting version vefore reinstalling Jul 04 19:56:27 ah ha! Jul 04 19:56:29 am start -n "miesco.decisionwheel/miesco.decisionwheel.MainActivity" Jul 04 19:56:39 you have differnet signatures Jul 04 19:56:40 ? Jul 04 19:56:44 no Jul 04 19:56:47 Don't uninstall.. Do what rops said Jul 04 19:57:28 SimonVT: Yea, thats what I do, now I just got to figure out how to execute 'am' on the device in a one liner Jul 04 19:57:52 Miesco: adb install -r && adb am start -n Jul 04 19:58:04 oh really k thanks! Jul 04 19:58:49 Doesn't work. Jul 04 19:58:59 any of you guys selling via google play? are you seeing lots of cancelled orders? Jul 04 19:59:11 As in 'am' isn't an adb option Jul 04 19:59:27 adb shell am Jul 04 19:59:27 Miesco: sorry, should "adb shell am …" Jul 04 19:59:40 is anyone selling apps getting a ton of "order #number cancelled by Google" emails from Google Wallet, since a few hours ? Jul 04 19:59:54 yes okay thanks Jul 04 19:59:58 ye bubbleguuum, exactly the same here Jul 04 20:00:08 ok I'm not alone then Jul 04 20:00:08 can anybody tell me the reason for FATAL EXCEPTION: pool 1-thread-3 Jul 04 20:00:15 dasd Jul 04 20:00:18 literally only 1 in 30 is successful, for the last 2.5 hours Jul 04 20:00:29 rops: it seems that every order fails with this error Jul 04 20:01:22 I am using AsyncTask for Http server conection Jul 04 20:01:30 How do I catch the onkeydown for * and # ? I logged the keyCodes and it looks like they send more than one Jul 04 20:01:59 after sometime the app crashes with pool 1 thread 3 exception Jul 04 20:02:00 Now one more question, how do I get logcat? Jul 04 20:02:05 bubbleguuum: i'm following twitter, and there are others having this problem, but not a massive amount of people Jul 04 20:02:25 users rather than developers though Jul 04 20:02:55 Miesco: adb logcat Jul 04 20:03:28 can anybody tell me the reason for FATAL EXCEPTION: pool 1-thread-3 Jul 04 20:03:58 rops: maybe that's a temp wallet failure. Reason sent to users is "We have cancelled your order because it could not be processed at this time.." Jul 04 20:04:21 How come new View().getHeight() returns 0 Jul 04 20:04:53 Because the view hierarchy hasn't gone through the layout pass yet Jul 04 20:09:28 rops: where are you following this issue on twitter ? Jul 04 20:09:32 SimonVT: layout pass? Jul 04 20:10:21 SimonVT: So I can't call getHeight() in the constructor? Jul 04 20:10:33 No Jul 04 20:10:47 Not until after it has been measured and layout has been called Jul 04 20:11:13 SimonVT: Well I am extending View as basically a surface to draw on Jul 04 20:11:14 bubbleguuum: just search for "google play", i've seen about 4 people mention problems with paid apps in the last 30 minutes Jul 04 20:11:52 SimonVT: I need the height so I can: mHexagon = new ShapeDrawable(new PathShape(path, this.getWidth(), this.getHeight())); Jul 04 20:12:30 Tough luck Jul 04 20:12:35 It has no size until it has been laid out Jul 04 20:13:19 that's what she said Jul 04 20:13:52 SimonVT: I can get the height of the display with wm.getDefaultDisplay().getSize(size); Jul 04 20:14:25 mkay Jul 04 20:14:29 SimonVT: But then there's the activity title rectangle that its counting Jul 04 20:14:36 Then my hexagon wont be centered Jul 04 20:15:45 SimonVT: I know! I'll just make an init() method and call it after I instantiate it Jul 04 20:15:47 +1 pragma- Jul 04 20:16:34 Yeah, no Jul 04 20:16:39 It doesn't work like that Jul 04 20:17:40 When you add a View, it tells Android that it has to re-layout the view hierarchy.. That doesn't happen until some time after your method returns Jul 04 20:18:24 SimonVT: I mean like this: drawView = new DrawView(this); drawView.init(); Jul 04 20:18:32 I know Jul 04 20:18:42 Oh so it does it in another thread? Jul 04 20:19:07 No, it does it later Jul 04 20:19:12 After you're done doing your thing Jul 04 20:20:54 SimonVT: Do you know a solution? Jul 04 20:21:44 SimonVT: Would using the default display height/width be the best solution? Jul 04 20:21:59 Resize your shape when onSizeChanged is called Jul 04 20:22:57 SimonVT: k thanks Jul 04 20:28:34 hello , can i use remoteviews and nutification.builder class in sdk 10 ?? is there any support for custom layout for notification for android 2.3 ?? Jul 04 20:34:10 Could someone tell me the difference between "@+id/..." and "@id/..." ? Jul 04 20:34:47 @id references an id, @+id references an id, and creates it if it doesn't exist Jul 04 20:35:13 Ah, thanks a lot. Jul 04 20:35:22 i ask run quastion ? :D Jul 04 20:35:33 So for strings I have defined in /values/strings.xml I should use the notation without the plus sign. Jul 04 20:36:01 Yes Jul 04 20:36:11 Only use @+ for id's Jul 04 20:36:32 Right :) Jul 04 20:42:18 hey guys, would you give me an advice, please. Im loading a set of images in custimized ArrayAdapter (in getView) with help of ThreadPoolExecutor, so the question is how do I post them? I need every image to be displayed as soon as it been loaded. Should I use a handler some way or something? Jul 04 21:08:02 defuera: are you using AsyncTasks? Jul 04 21:08:17 if so, do it in onPostExecute Jul 04 21:12:33 or publishProgress, to post them one by one Jul 04 21:13:09 Is there any state (as in drawable selectors -- ie, state_pressed, state_selected etc) that distinguishes between a long-click, and a regular click? I'm trying to draw a background for a LinearLayout when it's clicked -- but want it to disappear for a longclick. I'm using state_pressed, but that seems to be mapped to just what it says (on pressed.) Jul 04 21:13:39 hey anyone knows how to work with adb Jul 04 21:13:48 to backup ta partition completely Jul 04 21:16:09 kbs: sure you could do it in code Jul 04 21:16:16 not sure in just drawable states Jul 04 21:16:39 the default list selector has transition drawable on a clicked state Jul 04 21:16:49 think the anim has a delay Jul 04 21:17:03 so short click dont really use it, but you could look Jul 04 21:18:11 thepoosh: That's been fixed and released. Jul 04 21:18:40 StingRay_: ah, a transition drawable is a thought that didn't occur to me - I'll poke around, thanks Jul 04 21:22:41 kbs will be the delay that makes it appear as though it is just for long click I think, plus the states that are used, eg pressed, focused etc Jul 04 21:22:49 maybe you'll get what you want Jul 04 21:23:05 let me know though cause I would be interested in that too, just not at this minute :) Jul 04 21:23:07 Hey so i have a problem Jul 04 21:23:18 I dont have layout_land folder Jul 04 21:23:32 so where do i setup horizontal layout xml files seperately Jul 04 21:23:41 Issac: wow that is a problem Jul 04 21:23:43 so that horizontal aand vertical looks are different Jul 04 21:23:57 StingRay_: -_- I'm a noob Jul 04 21:24:03 if there were only some way to create folders :( Jul 04 21:24:13 Yes i created Jul 04 21:24:21 and when i try to create new XML files inside Jul 04 21:24:31 they get created in layout folder Jul 04 21:24:46 I'm sure i right clicked on the folder i craeted Jul 04 21:24:50 StingRay_: yep -- it's seems to be just you said -- I'm looking at list_selector_background.xml and list_selector_background_transition.xml; and it's kindof a hack that probably makes sense in this context Jul 04 21:40:08 question: I'm all of a sudden getting 'Source not found' java.util.concurrent.ThreadPoolExecutor for an Android api 14 project….any thoughts? It's right when I try and execute an AsyncTask... Jul 04 21:43:52 hey guys, so im trying to build android from source for the first time with the ultimate goal of hopefully being able to build a version of CM or PA or something with a few tweaks added in and have my own ROM (nothing too fancy tho)....Anyway, i have been following the instructions on Googles Developer page and ive hit a wall. im trying to configure usb access http://source.android.com/source/init Jul 04 21:43:53 ializing.html#configuring-usb-access and it doesnt have my device listed and i cant find the information anywhere else...and its odd becuase i have a Nexus 4 (mako) and they list galaxy nexus, nexus 7 and nexus 10 Jul 04 21:44:07 I've got a linear layout with a scroll view in it, if i want to stick something (like a small menu) to the bottom of the screen, how can i do that below the scroll view? Jul 04 21:44:16 I've tried all sorts of combos and can't quite get it... Jul 04 21:44:22 http://source.android.com/source/initializing.html#configuring-usb-access Jul 04 21:44:27 sorry. Jul 04 21:44:45 i guess im wondering if anyone who might know more about building android from source can help explain what this step does maybe or where i can find the appropriate code to include in the file as the page says to do, or how i might be able to modify one of those lines to be for my device Jul 04 21:47:06 the4ndy: read topic , not really correct channel Jul 04 21:48:58 any hints for me? Jul 04 21:50:17 Any one have a suggestion on a library to use for a slide out menu like Spotify and Facebook have? Jul 04 21:51:38 http://developer.android.com/design/patterns/navigation-drawer.html Jul 04 21:51:41 StingRay_: sorry so then what is? i mean, while i said my ultimate goal was custom roms, im really just trying to figure out how to build android from source. and im reading straight from Developer.Android.com and it doesnt list my current google nexus 4, if the android dev channel isnt the place for me than im confused as to what is, because the topci says "source at source.android.com" and... Jul 04 21:51:42 ...thats literally the page im on that is leaving me without the proper info. im googled it extensively and ive asked allover, can you at least point me in the RIGHT direction,if this is apparently not the place Jul 04 21:52:22 this is app development Jul 04 21:53:02 flipture: not sure what your question is Jul 04 21:53:02 i dont know what else i couldve done differently, i own the newest google phone, i read the instructions right from googles page and yet i cant get past step 3 and theres no where to turn :( its discouraging Jul 04 21:53:23 and so you have no suggestions at all as to where android development might be Jul 04 21:53:33 like source, OS, whatever you call it Jul 04 21:54:30 bankai_: Thanks! Jul 04 21:54:50 pretty well explained there with some very good docs :) Jul 04 21:57:49 i'm still not sure about this whole three line indicator for navigation-drawers, i don't like it at all Jul 04 21:57:55 StingRay_: i think i found it... I want to have a scroll view, but also have a view thats tied to the bottom of the screen Jul 04 21:58:12 so the bar at the bottom doesn't scroll while the content in the scrollview scrolls... Jul 04 21:58:21 Right now i'm trying a relative layout with two linear layouts in it Jul 04 21:58:36 erm Jul 04 21:58:40 no Jul 04 21:58:47 first linearlayout will hold hte scrollview, and the second will hold the bottom bar Jul 04 21:59:00 bad idea? Jul 04 21:59:04 just Jul 04 21:59:42 i couldn't seem to get that to work tho :-\ Jul 04 22:00:52 i was trying to use layout_alignParentBottom for the bottom bar but it wasn't working... Jul 04 22:01:23 parent linearLayout as VERTICAL Jul 04 22:01:49 scroll with height 0dp and weight 1f Jul 04 22:02:01 bottom linearLayout with a fixed height Jul 04 22:02:56 ok i'll give it a shot Jul 04 22:06:27 WOO! that worked :) Jul 04 22:06:46 i missed the fixed height and 0 height of the scrollview Jul 04 22:06:48 makes sense... Jul 04 22:06:56 StingRay_: thanks for the tip! Jul 04 22:17:51 what Jul 04 22:31:11 fwiw, yesterday I had a tip from SimonVT vis-a-vis using requestDisallowInterceptTouch(), to handle situations where a viewpager was sitting inside a scroll/gridview Jul 04 22:32:29 after some experimentation, the gotcha with that is that it doesn't correctly handle the "initial" swipe -- you have to swipe precisely horizontally, to get the viewpager to get into the scrolling mode, and then it can request teh parent to stop etc. Jul 04 22:33:15 so, I've gone back to my old code -- where the viewpager would set off the requestdisallow anytime the "swipe angle" is more horizontal than vertical Jul 04 22:33:28 anyway... just in case someone has a similar issue :-) Jul 04 22:35:44 er -- my old code is where the *list/gridview* stops interfering, rather than the requestdisallow mechanism... Jul 04 22:39:10 Why can't we use setRetainInstance in an Activity? Jul 04 22:49:12 kbs i probably would never have figured that out on my own Jul 04 22:49:23 still perplexed by the ui docs Jul 04 22:49:44 at this point, i always will ;) Jul 04 22:50:24 :-) I'm in the same club. Jul 04 22:59:48 How do I retain my DialogFragment's data on a screen-orientation change? Jul 04 23:00:00 setRetainInstance isn't working. Jul 04 23:00:34 same as an activity or any other fragment Jul 04 23:01:08 In my Activity I used onRetainCustomNonConfigurationInstance. Jul 04 23:01:14 But that's not available for the DialogFragment. Jul 04 23:01:34 so your not saving and restoring data ? Jul 04 23:01:56 Right. Jul 04 23:02:10 you probably should Jul 04 23:02:13 I'm asking how. lol Jul 04 23:02:14 if thats what you want to do Jul 04 23:02:18 I'm storing it in the Activity. Jul 04 23:02:21 oh onSaveInstanceState Jul 04 23:02:23 But not in the DialogFragment. Jul 04 23:04:43 anyone know how to get the overflow icon and the homeasup indicator to be white? on 4.0 theyre black Jul 04 23:12:13 I have an AlertDialog with an EditText. When the screen orientation changes, the on-screen keyboard disappears. Jul 04 23:12:17 How can I stop that? Jul 04 23:16:46 YOU COULD JUST STOP THE SCREEN ROTATING Jul 04 23:16:53 whoops Jul 04 23:17:33 please don't do that, it's the most annoying thing in the world Jul 04 23:17:39 heheh Jul 04 23:17:55 yeh im thinking live a developer not a user lol Jul 04 23:18:03 Okay, I can stop it with the whole [android:configChanges="orientation|keyboardHidden"] thing. Jul 04 23:18:18 We've gone full circle Jul 04 23:18:36 Yeah. Jul 04 23:18:39 I implemented that other stuff, though. Jul 04 23:18:44 So I guess I can do the above. Jul 04 23:49:54 is there a way to attach sources of maven hosted dependencies in Android Studio? Jul 04 23:50:55 hmm, it should give you a yellow bar with "Download Sources" link when you step into source? Jul 04 23:53:13 that works, but I'm looking to automate this so I don't have to do it with every dependency Jul 04 23:59:22 Can I override a listener in a subclass? Jul 05 00:01:40 TacticalJoke why not just check whether the keyboard should be open in the alertdialog's show method and show it if it should be? Jul 05 00:02:18 When should it be open? If the EditText has focus? Jul 05 00:03:57 probably? Jul 05 00:04:13 anyone know what would cause the back button to do nothing at all in a NDK native-activity? Jul 05 00:04:42 that way you can make it so if the user touches outside of the edit text, but inside the alert dialog (for whatever reason) it can close the keyboard, and if they focus it back it'll open again Jul 05 00:04:54 for instance if the user opens the menu Jul 05 00:04:59 will the keyboard close? Jul 05 00:15:16 oooooh if the primary touch is released the next touch that had happened gets set to index 0!? Jul 05 00:15:19 * icetooth smacks self in face Jul 05 00:18:43 now pointerID actually makes sense, man that was confusing as hell Jul 05 00:21:59 just wait until wink gestures become part of the sdk ;-) Jul 05 00:25:53 boy i sure wish motion event would hand off a non 0 index / id so i didnt have to track active touches manually :[ Jul 05 00:27:51 icetooth how far are you through to getting a release done? Jul 05 00:28:09 btw you might want to check out: http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game Jul 05 00:28:31 lasserix a release? i probably got like 5-6 months Jul 05 00:28:37 to go Jul 05 00:28:38 heehe Jul 05 00:28:40 yeah Jul 05 00:29:20 still gotta get this running on apple and windows platforms, and come up with a game to make, bah Jul 05 00:31:13 ohboy, thanks for the link. haha im gunna go shoot myself in the face Jul 05 00:41:09 i think i may write up some native-activity tutorials when i'm done with this port, i haven't been able to find many good solid resources. maybe everyones afraid of the deprecation axe being dropped? Jul 05 00:44:29 icetooth: pleaese do Jul 05 00:44:52 i'm working at java level but to do some stuff in the future i figure ill have to at least drop some of it in native code Jul 05 00:57:06 http://www.projectwoman.com/uploaded_images/bradley16_fig02-704998.jpg Jul 05 00:57:12 I want to warp images like in photoshop Jul 05 00:57:22 what kind of math should I read up on? Jul 05 00:58:55 I know things like ActivityGroup and are deprecated, but would that be a source for strange bugs in 4.1 (in particular, I put some extras in the intent for an activity's result, but then in onActivityResult, the intent has no extras) Jul 05 00:59:04 4.0.4 seemed to be ok Jul 05 00:59:22 i would eject your activitygroup asap Jul 05 00:59:51 liquidmetal, theres probably some open source gimp plugins you can look at to get an idea Jul 05 01:00:08 i figured... especially because they have that library that will support lower devices too (havent looked into it too much0 Jul 05 01:00:16 but that will require a major rewrite of the entire app Jul 05 01:02:17 what if it goes away in 4.3 ? i'd work on it Jul 05 01:02:49 i could see it going away in 5 maybe Jul 05 01:11:20 * otiose sighs Jul 05 01:11:49 I know that its necessary, but im frustrated at the people who originally built it