**** BEGIN LOGGING AT Sun Mar 11 02:59:58 2012 Mar 11 03:33:38 hey JakeWharton, android:theme="@style/Theme.Sherlock.ForceOverflow" isnt giving me the overflow button on a 2.1 emu Mar 11 03:33:56 add more items Mar 11 03:34:03 stop using showAsAction="always" Mar 11 03:34:03 the menu button brings up the overflow Mar 11 03:34:09 oh wow it's ALL fucked up Mar 11 03:34:14 actionbar is messed in this thing Mar 11 03:34:17 holy crap Mar 11 03:34:17 stop using so much text Mar 11 03:34:22 etc. Mar 11 03:34:27 enter bar Mar 11 03:34:31 it is the... Mar 11 03:34:33 BEST Mar 11 03:34:34 JakeWharton go load my apk in a 2.1 emu Mar 11 03:34:37 punctuation Mar 11 03:34:46 send apk Mar 11 03:35:22 oh wait i didnt deploy to the emu Mar 11 03:35:24 lololol Mar 11 03:35:31 it must be a REALLY old build Mar 11 03:35:40 .________________________. Mar 11 03:35:47 at lesat i didnt send you the apk Mar 11 03:39:14 I've got a class that uses the ConnectivityManager, and to get hold of an instance of that it needs a context. I can pass a context from an activity when instantiating the class, but is there another way to do this? Mar 11 03:40:33 no Mar 11 03:59:01 Ok, Android newbie alert. I'm trying to figure out how to get these "Extras" built correctly into my Eclipse project. I'm trying to look at the com.example.exapnsion.downloader. I tried to build the downloader and verification library projects as Jars and then import them as external .jars into the sample project but the sample project is still trying to access strings that are setup in the download library's string table which it Mar 11 03:59:01 obviously can't access as the string table didn't merge. Any suggestions on what I'm doing wrong? Mar 11 04:01:23 anyone have a non-xlarge device that is not a phone? Mar 11 04:01:28 i.e. does not have android.hardware.telephony Mar 11 04:01:36 also isn't a google tv Mar 11 04:01:43 like the galaxy player or whatever it's called Mar 11 04:08:48 canadiancow: would the kindle fire count? Mar 11 04:08:55 does it have telephony? Mar 11 04:09:12 no its a tablet, but its a smaller tablet, like.. it might be 7 inch? i dunno what x large is Mar 11 04:09:20 kindle fire is large, not xlarge Mar 11 04:09:25 and tablets can have telephony :P Mar 11 04:09:29 like can you put a sim card in it? Mar 11 04:09:37 uh, I dont think so Mar 11 04:09:42 ok cool :) Mar 11 04:10:02 let me find out for sure Mar 11 04:10:27 ok it definitely doesnt, its connectivity is only Wifi, no GSM or CDMA modem Mar 11 04:10:34 well if you run my app, you can find out, and test my app :) Mar 11 04:11:57 uh, do you know what the HWID of the fire would be for udev? Mar 11 04:12:13 o.O no Mar 11 04:12:13 it aint on d.android.com Mar 11 04:12:20 its not an "android" device :P Mar 11 04:13:15 sup peeps Mar 11 04:13:37 well so much for that.. Mar 11 04:13:46 anyone else with a device without telephony? :) Mar 11 04:14:36 JakeWharton, you got anythign? Mar 11 04:24:40 hwid should show up in lsusb Mar 11 04:24:52 canadiancow, don't you have a 10.1? Mar 11 04:25:10 oh, non-xlarge Mar 11 04:27:09 :P Mar 11 04:27:38 i used my google tv Mar 11 04:27:42 forgot it was large :D Mar 11 04:31:02 hah, it doesn't count as xlarge? Mar 11 04:31:35 I mean, a 50" display is pretty large... Mar 11 04:33:45 https://developers.google.com/tv/android/docs/gtv_displayguide Mar 11 04:34:00 the idea is that if you hold your tablet at normal viewing distance Mar 11 04:34:06 it appears larger than a tv at normal viewing distance Mar 11 04:47:59 hi Mar 11 04:50:14 hi Mar 11 04:54:11 Hello. i have written a code to display inbox contents.. now i want to do something when a list item is clicked. How should i do it??this is my code: Mar 11 04:54:33 http://pastebin.com/bhxSs3j8 Mar 11 04:54:43 can anybody pl help ? Mar 11 04:54:57 and here i thought he was about to post it all in the channel... Mar 11 04:55:47 neekers, :P Mar 11 05:36:46 <[deXter]> Anyone read that article on Battleheart? :P Mar 11 05:37:49 http://mikamobile.blogspot.com/2012/03/our-future-with-android.html Mar 11 05:37:54 er, yeah, that one... Mar 11 05:41:15 there are actually three very different things in that post Mar 11 05:42:11 I'm actually working on an installer for Unity projects right now. Maybe they can use that. Mar 11 05:42:15 1) the new 2+2GB data hosting is too little, too late, and it'll take *work* to implement it... Mar 11 05:42:42 2) porting their game (presumably from iOS) and supporting it took around 20% of their time Mar 11 05:42:54 3) it led to around 5% (and falling) of their revenue Mar 11 05:43:50 because they dont fucking support it Mar 11 05:43:58 you cant release an android version 6 months later with half teh features Mar 11 05:44:00 and never update it Mar 11 05:44:19 and expect it to have the same users to market ratio Mar 11 05:44:54 assume there are 500mil iOS devices and 500mil android devices - release identical iOS and android games at the same tiem Mar 11 05:44:57 support them equally Mar 11 05:45:05 one does not get a new feature without the other getting it at the same time Mar 11 05:45:10 and id like to see the numbers Mar 11 05:46:04 i know for a fact android can do better than ios Mar 11 05:46:21 when you have a comparable product out Mar 11 05:46:57 <[deXter]> Duh. Mar 11 05:47:17 <[deXter]> I mean take a look at Rovio. They have clearly stated that they make more money off Android than Apple. Mar 11 05:47:30 oh have they? Mar 11 05:47:32 <[deXter]> Yeah Mar 11 05:47:36 cool Mar 11 05:47:43 <[deXter]> This, inspite of releasing the game way after it was out on iOS. Mar 11 05:47:50 :( Mar 11 05:47:56 so why dont they do android first Mar 11 05:48:00 if android makes more moeny.... Mar 11 05:48:13 thats exactly why zynga does ios before android Mar 11 05:48:21 <[deXter]> Oh, they just fall into the FUD of "fragmentation". Mar 11 05:48:22 or so they say... Mar 11 05:48:26 lol Mar 11 05:48:46 to be fair, [deXter], there is more fragmentation than i originally thought Mar 11 05:48:49 Android is a support nightmare… with 400+ devices… it's impossible to test it son all of them. Mar 11 05:48:56 <[deXter]> Of course Mar 11 05:49:06 like there are devices that have broken opengl implementations Mar 11 05:49:11 <[deXter]> The trick is to officially support only the top devices Mar 11 05:49:15 the sgsII has a major sound bug that casues it to freeze Mar 11 05:49:53 <[deXter]> and say "we are adding support for more devices. feel free to try it on an unsupported device, but if its broke, dont come crying to us" Mar 11 05:50:15 mika-mobile stated that the *support* and related work for the game on Android *after* porting took them 20% of time while giving 5% of revenue Mar 11 05:51:08 that seems high Mar 11 05:51:19 like...i write games Mar 11 05:51:24 Leeds: meanwhile, I heard from game companies in Poland to "avoid iOS as a platform, it's a mine field" Mar 11 05:51:30 and i will admit that shitty OEMs doing shitty shit makes my life more difficult Mar 11 05:51:33 but 20% support??? Mar 11 05:52:18 i can also say that having someone on the android team *cough*me*cough* who actually knows android fairly well really helps reduce issues Mar 11 05:52:24 canadiancow: they are quite happy with Kindle Fire, apparently, but apparently 20% time in tracking down obscure differences in someone's broken GLSL compiler etc. Mar 11 05:52:24 because i can see right away when something's done wrong Mar 11 05:52:27 canadiancow - that isn't an overestimation. Our app, which shall remain nameless does about 60-40 revenue iOS-Android, but I would say 80% of our support emails are from Android users. Mar 11 05:52:53 Ferazel, i dont have our stats, and if i did, i couldnt release them, but i dont see the same thing at zynga Mar 11 05:53:00 and our rev split is probably more like that Mar 11 05:53:41 canadiancow: I haven't tracked what Zynga released for Android, but could it be that you simply encountered different sets of issues? Mar 11 05:53:55 One of the reason is due to our shitty downloader (which I'm trying to fix right now to use the new expansion files). We use the same game engine as MikaMobile. Mar 11 05:54:06 what engine is that? Mar 11 05:54:12 Unity3d Mar 11 05:54:40 I heard some funky stuff regarding Unity3d in general Mar 11 05:55:11 p_l: not really... lots of similar issues come up Mar 11 05:55:28 but its not like we get 1 email for 10 android users, and one for 50 ios users Mar 11 05:55:37 that ratio is fairly equal Mar 11 05:55:44 nothing like "OMG SUPPORTING ANDROID IS A NIGHTMARE" Mar 11 05:55:56 but it also depends a lot on the devs Mar 11 05:56:02 i have seen proejcts where ios devs do android apps Mar 11 05:56:11 and they have so many more issues than when android devs do android apps Mar 11 05:58:00 canadiancow: Agreed. The problem is that there is a serious lack of confidence at companies to invest in android developers. Mar 11 05:58:08 i'll agree with that Mar 11 05:58:22 the team im on right now is pretty awesome though Mar 11 05:59:34 more shameless self promotion, but if you're canada/uk/germany: https://play.google.com/store/apps/details?id=com.zynga.scramble Mar 11 06:08:10 Can anybody help me with the SMS manager API ?? Mar 11 06:09:03 arkiver: what you trying to do ? Mar 11 06:10:00 I m trying to build a sync application for syncing sms. I have been able to retreive sms. Mar 11 06:10:15 but i am just getting a list of smses from inbox, sentbox, etc Mar 11 06:10:35 i want to access info like who sent, who is the receiver, etc Mar 11 06:10:57 Want to knw how to access that info? Mar 11 06:11:48 i cant find any methods for that on android developers Mar 11 06:13:11 i am just a beginner with android. so kindly bear with me if i am wrong about something Mar 11 06:13:43 o.o Mar 11 06:15:16 there's a method getOriginatingAddress Mar 11 06:18:26 bankai_, ohh.. Thanks ! ill check it out ! Mar 11 06:19:08 that'll give you their mobile number, you may have to dig into the contacts provider to get anything more than that Mar 11 06:27:43 bankai_, ill study that .. thanks :) Mar 11 06:27:59 i think i can do with mobile number also .. Mar 11 06:56:29 Anyone have any success getting droidexplorer working over tcp? (wifi or bluetooth) ? Mar 11 07:09:27 where can i download the new google play store, and com.android.vending? thanks Mar 11 07:10:05 nonol, why don't you just download the .apk Mar 11 07:10:08 any market apk Mar 11 07:17:16 zhongfu: where can i find that please? Mar 11 07:18:31 nonol: search on google Mar 11 07:18:48 i got a .apk for market when i was emulating ICS in December or so Mar 11 07:19:00 it doesn't come with market by default Mar 11 07:19:08 so i used adb to install it Mar 11 07:19:16 it didn't come with the apk helper/whatever too Mar 11 07:26:50 com.android.vending seems to force close all my market apps, including google play Mar 11 07:34:08 nonol: something is weird about your situation - but it could be just that you're making things sound complex and messy. Either way, unless you're developing Android software, this is the wrong channel for you to be asking in Mar 11 07:44:18 thanks for the help Ego_UK Mar 11 07:44:49 what's a good way to record video of my app running - so i can put it on youtube or something like that? Mar 11 07:45:21 ... other than recording that with my other phone Mar 11 07:48:07 gridbag, http://forum.xda-developers.com/showthread.php?t=1252040 Mar 11 07:48:14 found it after some googling Mar 11 07:48:24 "** Does not work on Google Nexus or Tegra 2/3 yet **" Mar 11 07:48:46 well, im not about to root my phone. i have enough problems. Mar 11 07:50:07 gridbag, ah.. then okay Mar 11 07:50:19 i guess there's no other way than taking screenshots repeatedly Mar 11 07:51:55 ill just record the video on my big tv, playing from the hdmi-out. quality isn't that big a deal. Mar 11 07:53:26 okay then Mar 11 08:42:29 <[Pi]_> hello people! I need to port some work I've done from iOS to android, so I need to get an android device. I went to the shop yesterday and they were pointing out that different devices had different versions of the OS. is it possible to upgrade the OS to the latest on all of these devices? Mar 11 08:56:49 on some devices you can, yes Mar 11 08:56:54 best to ask in #android-root though Mar 11 09:10:14 is there a way to programmatically add a Button to a SurfaceView? Mar 11 09:14:04 Hiraghm: SurfaceView is not a ViewGroup, so no Mar 11 09:14:18 yea! Mar 11 09:15:41 Is there a layout that can place one view on top of another? Mar 11 09:15:57 like RelativeLayout, maybe? Mar 11 09:16:09 FrameLayout Mar 11 09:16:40 thx Mar 11 09:17:16 I want to develop an html5 based application exporting some custom function to javascript Mar 11 09:17:46 http://developer.android.com/reference/android/webkit/WebView.html tells that WevView does not support by default js and iteraction Mar 11 09:18:36 I have to still use WebView or I have to look to the doc of other classes? Mar 11 09:18:43 use WebView Mar 11 09:18:46 just enable JavaScript Mar 11 09:19:00 romainguy_: what's the recommended method for an app that needs to add items to a listview potentially 20 times or more a second without causing everything to become sluggish? Mar 11 09:19:17 FxIII: http://developer.android.com/reference/android/webkit/WebSettings.html Mar 11 09:19:42 pragma_: 20 times a second is a *lot* Mar 11 09:21:39 romainguy_: yes I've gone the route of having one ArrayList attached to the list view, and another ArrayList to act as an intermediatary buffer ... I add items to the buffer as quickly as I get them, and on a background thread I sleep for a second or so, then go through the buffer list and add the items in it to the listview's ArrayList, then I clear the buffer list and update the listview Mar 11 09:22:01 romainguy_: seems kind of a convoluted approach, though Mar 11 09:22:03 romainguy_: let me see if I understood correctly, the WebView is intended to be used as / is a full user agent for http+js but is simply defaulted to act as a presentation widget? Mar 11 09:22:10 pragma_: that's a lot better Mar 11 09:22:21 FxIII: correct Mar 11 09:22:25 ok Mar 11 09:22:31 FxIII: the default Browser is a just a UI around a WebView, nothing more Mar 11 09:22:45 perfect Mar 11 09:23:30 romainguy_: I was wondering if there was a better approach, or something that was more idiomatic -- I hear of Cursors, but I'm not sure if they alleviate the performance issues of 20 or more updates a second Mar 11 09:23:32 it is possible to have two webview with two separate js interpreter that works toghether? Mar 11 09:23:58 pragma_: the problem is that with 20 updates a second you will trigger 20 layouts, and a layout can be extremely expensive Mar 11 09:24:07 (not to mention the impact on battery life) Mar 11 09:24:21 FxIII: you can have several webviews in your app Mar 11 09:25:00 one has to interact to the user and another has to process some "external events" so both has to be responsive Mar 11 09:25:24 this means that both as to live inside the same activity? Mar 11 09:26:05 only one activity is active at a time Mar 11 09:26:13 but why do you need to webviews? Mar 11 09:26:28 you can write normal Android code that sends data to the webview Mar 11 09:26:31 it would be more efficient Mar 11 09:26:44 I need a webview and a js engine... Mar 11 09:27:26 maybe Mar 11 09:27:29 but two? :)) Mar 11 09:28:21 I mean i need a full webview (html+js) and another js engine Mar 11 09:28:33 that's what I'm getting at Mar 11 09:28:36 why do you need a second JS engine? Mar 11 09:29:10 the second js engine is like a server for a communication system that involves other nodes Mar 11 09:29:20 so the second js engine can run alone Mar 11 09:29:27 so why does it have to be JS? Mar 11 09:29:46 all the code I have to use is in js Mar 11 09:30:03 you are talking about instantiating a second WebView just to, basically, spawn a thread Mar 11 09:30:46 (I'm not even sure this would create a second instance of the JS VM) Mar 11 09:30:51 anyway you could try Mar 11 09:31:03 but i need to provide a simple ui for that thread too, so it can be html + js... Mar 11 09:31:30 a webview can have to tabs? Mar 11 09:31:36 *two Mar 11 09:32:18 it would be enough Mar 11 09:32:25 no, WebView doesn't know about tabs Mar 11 09:33:10 ok but the browser did right? Mar 11 09:33:29 oh I have an android 4.0 Mar 11 09:33:38 may be that android 2.x dont? Mar 11 09:34:09 tabs are a feature of the browser, not webview Mar 11 09:34:26 My Android app using Twitter4j to post tweets. Up till now I've been testing it on my wifi, but when i use mobile internet, I get an exception from JSON parsing. This suggests my mobile provider (T-mobile) is parsing the response (incorrectly) somehow through their proxy. Is there anything I can do? Mar 11 09:34:42 I understand Mar 11 09:35:31 ok I'll try to instantiate two and show one of them at once Mar 11 09:36:03 probably the other one will process events (like timers) even if it is not visible Mar 11 09:37:55 oh, is there a layout that shows one widget at time (full screen) and switches between widgets? Mar 11 09:38:48 TabHost, FrameLayout, ViewSwitcher Mar 11 09:39:00 ok Mar 11 09:39:48 If i put the vebviews into separate tabs the should work togheter ie process the events even if not in the display tab Mar 11 09:40:25 i fail at creating a simple layout: http://pastesite.com/32654 Mar 11 09:40:48 the b's represent a border image one pixel high and the i represent the central image Mar 11 09:42:03 http://pastesite.com/32656 Mar 11 09:42:23 as soon as i add the strips at the top and bottom my central image disappears Mar 11 09:42:26 hmm Mar 11 09:42:53 height="0" on the ImageView in the middle Mar 11 09:44:02 height="0dp" didn't make a difference.. Mar 11 09:44:18 oh, sorry.. you really meant height, not layout_height? Mar 11 09:44:41 no, layout_height Mar 11 09:45:33 You could also try removing the weight="0" on the other two Views. I am not sure they are necessary. Mar 11 09:48:26 Knossos: actually: the manifest had the orientation the other way.. so my bad :D Mar 11 09:48:33 Knossos: sorry for the noise.. :D Mar 11 09:49:06 Manifest? The layout do you mean? Mar 11 09:50:40 no, the andoird manifest had the orientation set to landscape.. working on someone else's code :D Mar 11 09:50:57 public static boolean isUserAMonkey () Mar 11 09:50:57 Since: API Level 8 Mar 11 09:50:57 Returns "true" if the user interface is currently being messed with by a monkey. Mar 11 09:50:59 Ah I see Mar 11 09:51:03 ... wat Mar 11 09:51:09 pragma_: adb shell monkey Mar 11 09:51:46 romainguy_: no --wrench related option? Mar 11 09:51:58 no, just monkey Mar 11 09:52:23 monkey --remove-wrench Mar 11 09:58:52 wtf. setting a ViewGroup's background drawable modifies its padding / inner border. Mar 11 09:59:11 Can I have shared preferences between apps? Mar 11 09:59:24 Ge0rG: yes, a drawable comes with padding information when set as the background Mar 11 10:00:13 romainguy_: so if I don't want that padding to be overridden, I have to read it out, set the background and setPadding()? Mar 11 10:00:24 Ge0rG: yes Mar 11 10:00:31 all I wanted was a fading color effect on some listitems... :> Mar 11 10:00:32 or just set the padding after setting the background Mar 11 10:00:43 or use a layerdrawable as the background Mar 11 10:01:11 romainguy_: I'm using a TransitionDrawable Mar 11 10:03:06 Hi all, could someone suggest me a good ebook to learn how to port drivers to android ICS? thank you Mar 11 10:03:49 http://pastebin.com/jYPVTWVS Mar 11 10:04:00 blackjack4it: port drivers from what? Mar 11 10:05:04 if i have two views in a vertical linear layout and both specify layout_height="fill_parent" shouldn't they divide the space evenly among them unless using weights? Mar 11 10:05:14 for example if I have the source of SGX530 driver, a guide that explain in details what to do, how android drivers work...a "drivers android porting for dummies book" :) Mar 11 10:07:32 http://pastebin.com/jYPVTWVS Mar 11 10:09:14 pragma_: for example if I have the source of SGX530 driver, a guide that explain in details what to do, how android drivers work...a "drivers android porting for dummies book" :) Mar 11 10:09:44 blackjack4it: if you have access to the source code of an SGX driver, you should ask IMG how to port it Mar 11 10:09:51 oh, ok, it seems the weights only come into play when the corresponding dimension (in my case height) is set to 0 Mar 11 10:09:56 especially since they already have SGX drivers for Android Mar 11 10:10:00 romainguy_: if I have a list view that has about 100,000 items, adding another item only has performance impacts on the number of items the list view has visible, yes? Mar 11 10:10:03 tapas: no it doesn't Mar 11 10:10:10 pragma_: yes Mar 11 10:10:35 tapas: the weight property is used to distribute empty remaining after all children have been measured with their specified width/height Mar 11 10:10:46 tapas: which means that the width/height you specify are actually very important Mar 11 10:10:52 romainguy_: ok Mar 11 10:11:37 romainguy_: so, the act of adding an item to the list view won't cause it to iterate through all 100,000 elements in its internal list -- I don't mean having to draw the elements, but having to go through the list and touch them for some reason? Mar 11 10:11:55 pragma_: that's correct Mar 11 10:12:01 * pragma_ wipes his forehead with relief. Mar 11 10:13:00 traceview is a nice tool, but it'd be nice to see something that shows the actual amount of time that a method takes, rather than the overall percentage -- is there an such a thing? Mar 11 10:13:13 pragma_: well… traceview does... Mar 11 10:13:21 I must have missed it Mar 11 10:15:05 it's right next to the percentage Mar 11 10:18:13 * pragma_ converted some nest LinearLayouts to RelativeLayouts, in addition implementing the bufferList companion to the list view, and the ui still gets pretty sluggish when those updates come in Mar 11 10:18:40 time to profile Mar 11 10:18:45 * pragma_ nods. Mar 11 10:19:26 I've been getting dispatchMessage() and drawViews() at the top percentages of execution time Mar 11 10:20:27 I don't remember any drawViews() method in our source code Mar 11 10:20:32 what's the time it takes? Mar 11 10:20:39 how often do those methods get executed? Mar 11 10:22:19 maybe i go about this completely wrongly though. here's a paste with an ascii drawing: http://pastesite.com/32657 Mar 11 10:22:48 the i's describe the central image whose aspect ratio i want to have preserved and scaled as big as possible on the screen Mar 11 10:23:09 the |'s represent a border which should grow to fill the remaining space Mar 11 10:23:19 and the - the same but in the other direction Mar 11 10:23:55 so if the screen is much taller than wide, the -'s should grow and if it's much wider than tall, the |'s should grow Mar 11 10:24:19 How do i write myltiple linees of text with TextView? Mar 11 10:24:21 tapas: maybe putting an ImageView inside of a FrameLayout would work. ImageView should be wrap_content for width and height, and layout_gravity="center". FrameLayout should be fill_parent on width and height. Mar 11 10:24:23 romainguy_: my mistake, Handler.dispatchMessage() -> ViewRoot.handleMessage() -> ViewRoot.performTraversals() -> View.layout() and View.measure() Mar 11 10:24:49 pragma_: makes sense Mar 11 10:24:58 so either you do fewer layout requests Mar 11 10:25:01 or you optimize your layouts Mar 11 10:25:26 romainguy_: dispatchMessage() chain is taking up 60% of my app's time, whereas I expected the data-updater to take up the majority of the time Mar 11 10:25:34 tomtiger11: TextView already works to display multiple lines. Just put them in. Mar 11 10:25:38 "\n" Mar 11 10:25:48 readme: Example please? Mar 11 10:25:51 considering that I'm supposed to be updating the listviews once a second, and doing the data-updating the majority of that time Mar 11 10:26:00 tomtiger11: android:text="One\nTwo" Mar 11 10:26:25 I have a background thread that updates the listview, then sleeps for 1000ms, then checks the listbuffer for new data and adds it to the listview's list if there is Mar 11 10:26:35 so it shouldn't be touching hte listview's data but once a second Mar 11 10:27:04 pragma_: that's where the actual work happens Mar 11 10:27:05 readme: If i was doing it like this: mTextView.setText(""); Mar 11 10:27:22 pragma_: check how often view.measure/layout is called Mar 11 10:27:26 to make sure it's not more than once a second Mar 11 10:27:28 and even then Mar 11 10:27:37 check how long it takes, in milliseconds, to execute measure+draw Mar 11 10:27:59 tomtiger11: the same Mar 11 10:28:30 readme: What if i had different parts of code wanting to say stuff? Mar 11 10:28:50 tomtiger11: "\n" is the ansi escape for newline Mar 11 10:29:04 tomtiger11: but "
" may also be supported. I haven't tried. Mar 11 10:29:37 romainguy_: apparently I'm not sure how to read that information... here's a screenshot: http://imgbin.org/images/7061.png Mar 11 10:30:03 readme: http://pastebin.com/hhzPvV7e Mar 11 10:30:26 tomtiger11: start every line that is not the first line "\nlike this" Mar 11 10:30:42 showing screenshots of a profile trace is as useful as showing a screenshot of a source file :) Mar 11 10:31:20 the data streamed from the device to traceview and I don't see a Save command :( Mar 11 10:31:42 the path to the file is in the title of the window Mar 11 10:31:53 :o Mar 11 10:32:09 I think maybe I should just get some sleep, maybe. Mar 11 10:32:30 readme: Ok Mar 11 10:33:23 romainguy_: actually, I provided the screenshot so maybe you could point out the right columns I should be looking at Mar 11 10:33:36 readme: What about these lines?: mTextView.setText(String.valueOf(millibars_of_pressure)); Mar 11 10:33:40 I didn't think you'd want to actually look at my trace. I can upload the 8MB file... Mar 11 10:33:52 well Mar 11 10:34:00 your screenshot shows on interesting thing Mar 11 10:34:05 what's that? Mar 11 10:34:10 it takes ~140ms for ListView to layout its children Mar 11 10:34:12 that's a LOT Mar 11 10:34:27 where do you see that? Mar 11 10:34:33 ListView.layoutChildren() Mar 11 10:34:36 Cpu Time/Call Mar 11 10:34:45 consistent with the inclusive time Mar 11 10:34:53 9 calls of 139ms each Mar 11 10:34:57 ah Mar 11 10:35:32 I had nested LinearLayouts originally and today converted them to RelativeLayouts... Mar 11 10:35:41 definitely a big savings Mar 11 10:35:48 have you measured the difference? Mar 11 10:35:49 But I'm apparently still missing some tricks Mar 11 10:36:03 hierarchyviewer will help you as well Mar 11 10:36:08 readme: ? Mar 11 10:36:13 (it shows the time it takes to measure/layout/draw) Mar 11 10:36:18 romainguy_: I glanced at the percentages, to be honest. I didn't actually grok the call time/call Mar 11 10:36:41 the percentages can be very misleading if you don't know exactly what's happening in the trace Mar 11 10:36:53 for instance if you see ~100% in the draw() methods Mar 11 10:36:58 it can actually be a good thing :) Mar 11 10:37:04 Glad to be more aware of the Call Time/Call information Mar 11 10:37:49 hierarchyviewer shows me 3 red dots for my listview :p Mar 11 10:37:51 tomtiger11: have you studied basic programming much? Mar 11 10:38:06 pragma_: it also shows the times in ms if you click on a node Mar 11 10:38:08 hi! Mar 11 10:38:09 I have an ImageIcon, and about 6 TextFields in each list item Mar 11 10:38:22 readme: yes... Mar 11 10:38:39 I havent done any java in a while though, especialy Android Mar 11 10:39:42 tomtiger11: "\n" is pretty universal.. that you don't understand what I'm trying to tell you makes me think you would do well to review the basics. Mar 11 10:40:21 for my developing i would like to save pictures in the internal storage.. but i don't understand how it is possible… does anybody know? i already look for the OutputFile Stream() but i understand is working.. Mar 11 10:40:49 readme: In a line without any quotes... Mar 11 10:41:12 tomtiger11: huh? Mar 11 10:41:28 tomtiger11: "\n" works inside double quotes. Mar 11 10:41:43 it works inside single quotes too, because in java, single quotes are for single characters. Mar 11 10:42:30 readme: *facepalm*... Mar 11 10:42:36 ListView 1: 37 views, measure 6.2 ms, layout 4.3 ms, draw: 6.7 ms; ListView 2: 15 views, measure: 5 ms, layout 1.86 ms, draw: 5 ms Mar 11 10:42:40 romainguy_: ^ Mar 11 10:42:51 "What\nIs\nIt\nYou\nDon't\nGet\nAbout\nThis?" ? Mar 11 10:43:06 "Hello!" + "\nWorld!"; Mar 11 10:43:22 ITS FOR THE LINES WITHOUT THE QUOTES!!!!!! Mar 11 10:43:29 No, it works fine on any line. Mar 11 10:43:30 How do i do those? Mar 11 10:43:42 Lines without quotes? Mar 11 10:43:44 romainguy_: the listview objects themselves have 3 red circles, but the children items have 3 green circles Mar 11 10:43:46 you mean raw data? Mar 11 10:43:49 Concat a newline Mar 11 10:43:53 Ow Mar 11 10:43:59 foo + "\n" + bar Mar 11 10:45:02 readme: http://pastebin.com/SQNzMzes Mar 11 10:45:30 tomtiger11: you're overwriting the previous contents! Mar 11 10:45:37 I KNOW!!! Mar 11 10:45:46 I wanted to know how not to Mar 11 10:45:51 well: either store it somewhere, or call getText().toString() to get it first Mar 11 10:46:26 Can you give me an example, and pastebin it? Mar 11 10:46:43 mTextView.setText(mTextView.getText().toString() + "\nNew Line"); Mar 11 10:47:06 That will get the other bits of text, yes? Mar 11 10:47:11 romainguy_: hrm, it actually seems that my LogViewUpder and AppViewUpdater threads are actually doing updates more than once per second... despite Thread.sleep(1000); curious. Mar 11 10:47:24 tomtiger11: if not, I don't know why I would suggest it. Mar 11 10:47:34 Lol, Thanks Mar 11 10:53:00 does anybody know how save pictures in the internal storage of the phonE? Mar 11 11:01:10 My OnSensorChanged Event isnt working... Mar 11 11:02:01 I put my thumb over the sensor Mar 11 11:02:33 readme: ^^ Mar 11 11:03:58 Instead of OnSesnorChanged, what event could i do to display a reading without a change needed Mar 11 11:06:30 ? Mar 11 11:06:41 what's the canonical way to place some buttons over an image and treat orientation changes and image rescaling correctly? Mar 11 11:07:48 How can i display a sensor reading without the OnSensorChanged Event? Mar 11 11:08:33 hello, i'm opening a pdf file memorized in asset folder. if i open it with acrobat reader and quickoffice it says "pdf is not valid", but with another viewer (AndroidPdfViewer_1_0_1) it opens. i want to ask you this: 1)how can i download free quickoffice for trying in on the emulator? 2)putting files in asset folder is the best way to open pdf files within an app? Mar 11 11:15:17 http://pastebin.com/SaZinKi7 No reading Mar 11 11:20:14 tomtiger11: your onSensor will never be called Mar 11 11:20:41 I'm not going to tell you why, you should try to figure it out, that's part of learning. I'll tell you though, that you've not done anything that would cause it to be called. Mar 11 11:21:32 the sensor apis have to know about your callback.. that is the hint. Mar 11 11:25:11 in Canvas.drawText(), is the text size in device independent pixels? Mar 11 11:33:12 hello, i'm opening a pdf file memorized in asset folder. if i open it with acrobat reader and quickoffice it says "pdf is not valid", but with another viewer (AndroidPdfViewer_1_0_1) it opens. i want to ask you this: 1)how can i download free quickoffice for trying in on the emulator? 2)putting files in asset folder is the best way to open pdf files within an app? Mar 11 11:34:08 romanr_: i'm getting stuk with tablayout, I'm writing a tab activity and using TabSpec to create a new tab, but i want to setContent a view, not an intent... how can i get my viewId? should i create a separate layout xml file? Mar 11 11:35:19 romainguy: what I asked to romanr_ where directed to you Mar 11 11:35:37 ok Mar 11 11:43:43 hi there Mar 11 11:44:46 My OnSensorChanged event isnt working Mar 11 11:45:01 tomtiger11: have you changed the code since you last posted it? Mar 11 11:45:48 readme: I just tried OnSensor event instead of OnSensorChanged, No dice Mar 11 11:46:17 tomtiger11: in the last code sample, I didn't see you register your OnSensor listener stuff. Mar 11 11:46:53 http://www.helloandroid.com/tutorials/using-android-phones-sensors Mar 11 11:46:59 follow it closely, the code you missed is in it Mar 11 11:47:56 No listener..., DUH!!! Mar 11 11:49:16 is there a way to get the original width and height of a drawable before layouting? Mar 11 11:49:35 i.e. independent of how it's scaled in any layout/view? Mar 11 11:51:22 does anybody know how save pictures in the internal storage of the phonE? Mar 11 11:54:17 readme: I get an error for these lines: SensorManager.registerListener(this, SensorManager.getDefaultSensor(Sensor.TYPE_LIGHT), SensorManager.SENSOR_DELAY_GAME); Mar 11 11:55:01 tomtiger11: you're not implementing the proper interface in your Activity. See since you passed "this" it used your Activity, but the registerListener call expects the object its passed to implement a certain interface. Mar 11 11:55:40 you don't need to implement it in your Activity, just for future ref. It can be any object, it just has to implement the interface expected by register listener. Mar 11 11:56:03 Ive Implemented SensorEventListener Mar 11 11:56:12 what error then Mar 11 11:57:04 readme: On the public class line: Multiple markers at this line Mar 11 11:57:04 - The type Tom4Activity must implement the inherited abstract method Mar 11 11:57:04 SensorEventListener.onAccuracyChanged(Sensor, int) Mar 11 11:57:04 - The type Tom4Activity must implement the inherited abstract method Mar 11 11:57:04 SensorEventListener.onSensorChanged(SensorEvent) Mar 11 11:57:21 hi guys, question: I'm currently using getSharedPreferences() when my View is first load (inside onCreate). How can I re-read the preferences when the View is displayed again, like after returning from another view? Mar 11 11:57:30 first loaded* Mar 11 11:57:58 tomtiger11: the error is right -- do exactly what it says. Mar 11 11:59:07 I am pretty sure there is a working sensor example in the sdk samples Mar 11 11:59:16 you should just find that and study it Mar 11 11:59:47 ok, getResources().getDrawable() is my friend.. Mar 11 11:59:58 now to get the size after layouting :D Mar 11 12:00:15 it seems that even in onResume the layouting hasn't been done yet Mar 11 12:00:24 readme: Do what?!? Mar 11 12:00:46 tomtiger11: Like it says, implement the methods Mar 11 12:01:51 tomtiger11: in the SDK, there is a directory full of example projects Mar 11 12:02:00 I am fairly certain there is one for sensors that you can just pull in Mar 11 12:02:18 (of course, you need to install them.. use the SDK manager) Mar 11 12:03:03 is there a callback in the activity after the layout has finished? Mar 11 12:03:12 Lochlan: do it in the onResume() method? Mar 11 12:03:42 Lochlan: You don't need to reload shared preferences, just keep a reference Mar 11 12:04:12 Ill check it out ozo Mar 11 12:04:12 readme: SensorManager.registerListener(this, SensorManager.getDefaultSensor(Sensor.TYPE_LIGHT), SensorManager.SENSOR_DELAY_GAME); Gives me this error: Mar 11 12:04:19 keep a reference, Simon? Mar 11 12:04:36 Multiple markers at this line- Line breakpoint:Tom4Activity [line: 45] - onResume()- Cannot make a static reference to the non-static method getDefaultSensor(int) from the type SensorManager- Cannot make a static reference to the non-static method registerListener(SensorEventListener, Sensor, int) from the type SensorManager Mar 11 12:04:50 You know, mSharedPrefs = getSharedPreferences(...) Mar 11 12:05:23 tomtiger11: why are you guessing when you could follow a recipe precisely and get the cookies you want? Mar 11 12:05:28 http://www.ibm.com/developerworks/opensource/library/os-android-sensor/ Mar 11 12:05:44 hi! does anybody know how use a FileOuptupStream to save Jpeg picture in the internal storage of the phone? Mar 11 12:05:51 please study java -- if you can't figure out the static thing that is a result of you needing to do more studying of java. Mar 11 12:06:52 thanks SimonVT Mar 11 12:06:54 anyway I am busy -- if you try to follow the instructions from the beginning I will be glad to help. don't deviate from them. Mar 11 12:07:49 readme: I am trying my best to get it working... :( Mar 11 12:13:22 ok, onWindowChangedFocus is what i want it seems.. Mar 11 12:13:40 but how to get the Image's width and height without the extra space in the imageview.. Mar 11 12:13:43 hmm Mar 11 12:15:23 tomtiger11: it's not about your effort. it's just that the approach needs to change. you can't tackle these problems head-on yet, so follow a recipe instead. just like a novice baker would, until they become more proficient Mar 11 12:15:29 in time enough recipes will teach you the way, don't worry Mar 11 12:16:36 readme: The thing is though, if you told me what was wrong, id remember it :D Mar 11 12:18:20 tomtiger11: I believe in teaching a man to fish instead of giving him a fish. sorry. Try again with the new tutorial and I'll be glad to help if your new code doesn't work. Mar 11 12:19:21 thanks again ozo got it working Mar 11 12:19:27 i think that's enough for tonight Mar 11 12:19:44 My facebook integration doesn't work on a gnexus. It opens the app and says "loading" and then it just crashes. The first crasch is silent, without anything in the logcat. The second one has a keystoreexception: java.security.KeyStoreException: java.security.NoSuchAlgorithmException: KeyStore jks implementation not found Mar 11 12:19:53 And I know I have the correct key hash at the developer site Mar 11 12:20:18 Hi all Mar 11 12:22:46 hi, the newest eclipse can't use the android plugin... it's installed but missing from the menus, builders, etc. is there a solution to this? Mar 11 12:24:00 Lochlan: glad to help :) Mar 11 12:24:31 hi Mar 11 12:26:58 If I drawBitmap with paint.setARGB(255, 255, 255, 255); It will just draw the bitmap without modifying the colors? Mar 11 12:28:46 i have this layout, that displays a form and fills in the fields automatically: http://pastebin.com/D7Dygvvj Now i want to change that form to a view that doesn't allow editing, with TextViews, but the android emulator crashes every time with everything i try. what's the correct way to do this Mar 11 12:29:06 Hi Mar 11 12:29:47 Kake_Fisk: why not just try it out? Mar 11 12:30:32 Because I would need to do quite much to test it out, so I was thinking maybe one of you know Mar 11 12:31:19 What does getIntent return in onCreate if app is killed in background? Mar 11 12:31:50 Kake_Fisk: the test you would have done would be more reliable then someone telling you over irc. For example, I could just lie to you. Mar 11 12:31:57 tests = awesome Mar 11 12:32:38 I trust people on IRC anyways Mar 11 12:32:39 Is it the Intent last time app got in onCreate? Mar 11 12:33:19 If somebody intentionally told people wrong information, they would probably be kicked anyways Mar 11 12:33:43 but you save them a lot of time if you test it yourself and if you really dont know what to do then ask them Mar 11 12:34:18 A lot of time? One either know it or one does not. :p Mar 11 12:34:20 Kake_Fisk: nah, I've never seen someone get kicked here Mar 11 12:34:29 I bet they'd get away with it Mar 11 12:35:21 It looks like it worked though Mar 11 12:35:27 :D Mar 11 12:35:32 anyways they can always register a new nick Mar 11 12:36:19 im trying to send an email from my application but i get this toast message "No applications can perform this action." i dont get any log messages just this Mar 11 12:36:26 If app is killed and somebody start the app with an intent, when will the app get this new intent? onCreate or onNewIntent Mar 11 12:36:30 ?? Mar 11 12:37:10 jimmy_lo_chen_fe, onCreate i suppose Mar 11 12:37:40 joelmob maybe you have to specify it in manifest Mar 11 12:37:55 as a permission Mar 11 12:38:11 Ktomislav, i cant find any Email permissions there Mar 11 12:38:35 never worked email just said it could be Mar 11 12:39:11 aha i found the problem, apparently the emulator doesnt have any email app lol Mar 11 12:39:34 OK Mar 11 12:39:37 probably just need to setup an account there Mar 11 12:40:01 joelmob, thank you, I'll try it Mar 11 12:41:19 readme: There code is depricated and has errors Mar 11 12:42:24 tomtiger11: yeah? Mar 11 12:42:31 tomtiger11: hold on a sec Mar 11 12:43:10 This one looks better, it was updated in 2012 Mar 11 12:43:11 http://www.vogella.de/articles/AndroidSensor/article.html Mar 11 12:43:20 it might be complete enough to just copy paste most of it, as well Mar 11 12:43:29 I've had good luck with his site before Mar 11 12:43:33 i have this layout, that displays a form and fills in the fields automatically: http://pastebin.com/D7Dygvvj Now i want to change that form to a view that doesn't allow editing, with TextViews, but the android emulator crashes every time with everything i try. what's the correct way to do this ? Mar 11 12:43:36 same with ibm, but I guess they don't update it often Mar 11 12:43:51 i trie to save picture on the internal storage Mar 11 12:44:09 here is my code but nothing is saved… http://pastebin.com/731uvwxb Mar 11 12:45:54 iv is an ImageView, ldImage is a LayerDrawable, iv.setDrawingCacheEnabled(true); iv.buildDrawingCache(); iv.setImageDrawable(ldImage); Mar 11 12:45:56 but iv.getDrawingCache(true) always returns null What am I doing wrong? Mar 11 12:46:14 ddreamer: should be to plainly exchange the EditText-fields with TextView-fields Mar 11 12:47:25 readme: view = findViewById(R.id.textView); - id cannot be resolved or is not a field Mar 11 12:47:43 hi. i have a kendo android 2.1 tablet i'm struggling to install flash player...didn't succeed Mar 11 12:47:53 is there a way to do it? Mar 11 12:47:56 ozo not so easy, i don't know why because in eclipe it's all fine but when i change them it crashes Mar 11 12:50:01 someone know why i can't save pictures with this code http://pastebin.com/731uvwxb ? Mar 11 12:50:01 tomtiger11: did you set your id to be textView or something else? Mar 11 12:51:45 what does the "+" in @+id/name mean ? Mar 11 12:51:54 that it adds the id to the view ? Mar 11 12:52:23 yes Mar 11 12:52:48 readme: You here? Mar 11 12:54:03 yeah, released update that required me to use full 500 char limit of update description text Mar 11 12:54:06 feels good Mar 11 12:54:28 in fact, my original descriptino was 657 chars Mar 11 12:54:44 tomtiger11: yeah Mar 11 12:54:46 Hi. Why I get this error and how avoid it? Thanks . -> http://ideone.com/Kdmq7 Mar 11 12:55:28 * pragma_ impatiently refreshes market app and website both Mar 11 12:56:08 under: The error told you why. "Cannot make a static reference to the non-static method getSystemService(String) from the type Context" Mar 11 12:56:16 readme: view = findViewById(R.id.textView); - id cannot be resolved or is not a field Mar 11 12:56:41 http://docs.oracle.com/javase/tutorial/java/javaOO/classvars.html -- read about static here Mar 11 12:56:52 readme: I got the code online Mar 11 12:56:53 tomtiger11: is there anything in your gen folder? Mar 11 12:56:56 under: well it's wrong Mar 11 12:56:59 don't copy idiots Mar 11 12:56:59 under: you have to have a context object, rather than interacting with the Context class Mar 11 12:57:16 tomtiger11: try build clean, make sure R is in your scope/imported. Mar 11 12:57:30 ok hahaah Mar 11 12:57:43 readme: You said what now? Mar 11 12:58:04 I think the kids are waking up. Mar 11 12:58:34 tomtiger11: 1. build clean 2. make sure R is either in the same package or imported. Mar 11 12:58:54 * tomtiger11 didnt get a word you just said Mar 11 12:58:56 If there is nothing in gen/ you don't have R Mar 11 12:59:14 tomtiger11: sorry, you'll have to see what you can make of it then. Mar 11 12:59:26 codin ain't easy Mar 11 13:00:01 when do i need the + in a view, as @+id/... ? Mar 11 13:00:11 hmm, i wonder how i can find the top left position of the image inside an image view relative to the enclosing layout Mar 11 13:00:45 ddreamer: when you want to reference that specific View in your code Mar 11 13:01:12 no, when you are creating a new view in layout Mar 11 13:01:49 when you want to referencethe specific View in the code use R.id.yourid Mar 11 13:02:51 Ktomislav: you don't need an id for views that you have no need to reference in the code? Mar 11 13:03:35 R.id.yourid is the id you set with @+id, but @+id is not required if you don't need it, or? Mar 11 13:04:02 i think you have to always use @+id Mar 11 13:04:07 nope Mar 11 13:04:11 because otherwise you cant set a new id Mar 11 13:04:26 but when you don't need an id, you don't have to set it Mar 11 13:04:43 whats the point of having a view you wont use? Mar 11 13:04:59 Ktomislav: label Mar 11 13:05:15 or button Mar 11 13:05:16 lol ok Mar 11 13:05:25 button? Mar 11 13:05:28 if there is only one button, you can Mar 11 13:05:33 any more than one button and you'll need to use an id Mar 11 13:05:38 nope Mar 11 13:05:58 huh, how can you have two buttons both do different things without assigning an id to both? Mar 11 13:06:26 you can't Mar 11 13:06:29 Different click listeners Mar 11 13:06:39 ... Mar 11 13:06:48 SimonVT: that will only work if you create them programmatically, though. Mar 11 13:06:51 but point taken Mar 11 13:06:54 android:onClick Mar 11 13:06:55 =) Mar 11 13:07:09 SimonVT: when you use that attribute, you won't be able to differentiate between the different buttons without ids Mar 11 13:07:12 ? Mar 11 13:07:15 that's how I do it, btw. Mar 11 13:07:29 well i have no problem setting a new id for every object i create lol Mar 11 13:07:30 onClick takes a method name Mar 11 13:07:35 Name them different things :P Mar 11 13:07:36 SimonVT: oh, good point. Mar 11 13:07:44 I point all my onClicks at the same method, usually :D Mar 11 13:07:53 not to mention there's no need to add ids to container views which are there just to handle layout Mar 11 13:07:54 that way I can have a default handler for buttons that aren't implemented yet. Mar 11 13:07:55 android:onClick is a horrible thing to do imo, but it's possible :P Mar 11 13:08:19 yes, it's not exactly good design, but frankly a lot of things in android arent, so screw it, I use it. Mar 11 13:08:23 it's convenient Mar 11 13:08:58 I usually assign different click listeners if the buttons are not related in any way Mar 11 13:09:00 http://pastebin.com/keEX52Ky <- an example Mar 11 13:09:11 In some cases they share a lot of logic, and then I use a single listener Mar 11 13:09:12 as long as you're not the guy creating 20 anonymous classes for each of his button every time you start the activity, I'm fine with whatevery ou did Mar 11 13:09:19 but i see you came far in the discussion :P Mar 11 13:09:45 readme: Can you help me code my app then, or don't you want to? Mar 11 13:10:25 tomtiger11: I'm not personal support. Most people here are talented enough to help you if you ask the right questions. Mar 11 13:11:07 tomtiger11 you need to know some basics, otherwise people here cant help you Mar 11 13:11:20 ozo: I knew that, it just didn't occur to me immediately. I've got my own way of handling buttons that I view as quite awesome Mar 11 13:11:44 iv is an ImageView, ldImage is a LayerDrawable, iv.setDrawingCacheEnabled(true); iv.buildDrawingCache(); iv.setImageDrawable(ldImage); but iv.getDrawingCache(true) always returns null What am I doing wrong? Mar 11 13:11:55 that is, I assign them all to point at onClick, do a switch on the ids, and if I don't want to handle it, I call super to the other onClick i defined, and use that as a default handler. That way there is never a button that does nothing while I am coding. Mar 11 13:12:27 Just knowing how to fix that line will help 100% Mar 11 13:12:32 which line? Mar 11 13:12:40 the R? Mar 11 13:12:47 view = findViewById(R.id.textView); Mar 11 13:13:00 Thats the only error Mar 11 13:13:02 tomtiger11: is view a View or some subclass of it. Mar 11 13:13:12 guys i need your help … i need to save picture on the internal storage… does anybody know why this code doesn't work? http://pastebin.com/731uvwxb Mar 11 13:13:13 readme: of course that's the better way, it was just for the sake of argument, that it was possible :) Mar 11 13:13:16 I believe your problem ist hat you need to import R Mar 11 13:13:17 Its the code from that site Mar 11 13:13:24 ozo: yeah, point taken, you have won the debate today :D Mar 11 13:13:30 tomtiger11: the code is right Mar 11 13:13:38 for the last time Mar 11 13:13:41 make sure R is imported Mar 11 13:13:47 if you are not in the default package Mar 11 13:14:28 things you can try: checking the gen folder to make sure R.java is there, checking your imports, building clean Mar 11 13:14:49 checking AndroidManifest.xml to change the default package so R.java is generated in the right package in the first place so you don't need to import R Mar 11 13:15:26 readme: This is the problem: android:layout_height="match_parent" Mar 11 13:15:45 readme: error: Error: String types not allowed (at 'layout_height' with value 'match_parent'). Mar 11 13:15:55 tomtiger11: just change it to "fill_parent" then Mar 11 13:15:59 or wrap_content Mar 11 13:16:04 whatever you please, layout wise. Mar 11 13:16:24 fill_parent is equivalent to match_parent isnt it? Mar 11 13:16:27 see.. more information in the first place would have saved me about 20 lines of typing Mar 11 13:16:34 Ktomislav: i think some api levels don't recognize match_parent. Mar 11 13:16:39 yea Mar 11 13:16:46 match_parent wasn't added until 2.2 Mar 11 13:17:30 Anyone using OpenNFC here? How did you manage to compile the jni.so file? Mar 11 13:19:15 market, y u no update my app Mar 11 13:20:13 can you please tell me what's wrong here? Mar 11 13:20:19 iv is an ImageView, ldImage is a LayerDrawable, iv.setDrawingCacheEnabled(true); iv.buildDrawingCache(); iv.setImageDrawable(ldImage); but iv.getDrawingCache(true) always returns null Mar 11 13:34:45 yay, market update my app Mar 11 13:34:59 what app? Mar 11 13:35:56 o0 Mar 11 13:36:44 hey everybody Mar 11 13:36:50 I'm sorry, that wasn't meant to be rude. Just curious about your app. Mar 11 13:38:30 i have some trouble with data storage. is want to read into a buffer, but it doesn't work. here is the code: http://pastebin.com/t0xwynJt Mar 11 13:38:35 please help me ;) Mar 11 13:39:03 fis.read(buffer) doesn't work, cause buffer is null Mar 11 13:39:56 but fis.read(buffer) has to write into buffer... so what's the problem... Mar 11 13:40:51 how would i make a textview load text automatically from my program? Mar 11 13:41:31 something like ?? Mar 11 13:41:36 chris_cross: it doesn't do the allocation for you. you need to allocate the byte arra yourself Mar 11 13:42:45 like buffer = new byte[1024] ? Mar 11 13:43:03 ddreamer: android:text="@string/yourDefinedString" Mar 11 13:43:33 yes Mar 11 13:43:58 id did it, but then all bytes have value 0 Mar 11 13:44:02 i have an edittext that autoloads the contents with Mar 11 13:44:07 chris_cross: so? Mar 11 13:44:07 and nothing is written... Mar 11 13:44:14 isn't it possible like this in a textview ? Mar 11 13:44:22 chris_cross: check the return value, it tells you how many bytes were written to it. Mar 11 13:44:38 ok, thanks alot. i try it Mar 11 13:45:20 ddreamer: that codeline will not autoload any text, afaik. it's probably done programmatically? Mar 11 13:46:48 readme: it returns -1 Mar 11 13:47:52 don't now why. "Weckschemas" is an empty ArrayList Mar 11 13:48:42 I'm testing a Singleton class and everything seems to be working fine but it doesn't seem to get GC after my app closes. Is it because the Application hasn't been destroyed? Mar 11 13:48:43 now= know ^^ Mar 11 13:48:49 wtf, market app says 'update' but when i click on it, it says 'open', then i go back and it says 'update' again Mar 11 13:49:02 chris_cross: I don't know why it returns -1 either. You will have to do some more investigating. Mar 11 13:49:14 But at least you know why there are no new bytes in your array. Mar 11 13:49:15 i've cleared the cache 3 times ow Mar 11 13:49:18 now Mar 11 13:49:31 ok, thank you Mar 11 13:49:40 market app, y u so crazy Mar 11 13:51:02 ozo i think you're right there are settextx in my code (i'm reusing a tutorial) and starting to understand it actually lol Mar 11 13:51:32 Will android keep an application in memory even after pressing back all the way to the home screen? Mar 11 13:51:44 depends Mar 11 13:51:48 it can Mar 11 13:52:06 sometimes the apps themselves override this and demand to stay around Mar 11 13:52:08 Until it decides it needs the memory Mar 11 13:52:27 ozo but i don't know why it's crashing, just because i change the editext to textviews Mar 11 13:52:57 my apps always exit on back button Mar 11 13:53:08 ozo shouldn't it be able to "fill in" the text of either just as easily ? Mar 11 13:53:36 there's just something unsettling about seeing it in the running processes list after i've closed it, so I threw in a System.exit(0) for good measure Mar 11 13:54:29 pragma_: ok, I might try that because my singleton class isn't being GC app closes Mar 11 13:54:51 hello guys is z4root the safest way to root my galaxy ?? Mar 11 13:54:58 kosaidpo: #android-root Mar 11 13:55:18 SimonVT: i tho im in there sorry guys and thanks Mar 11 13:55:31 ddreamer: you have to look at the error message, and see what causes the crash Mar 11 13:55:47 ddreamer: it's usually explained pretty good Mar 11 13:58:19 hi Mar 11 13:59:13 pragma_: where do you put the System.exit(0)? Mar 11 13:59:54 Hopefully nowhere Mar 11 14:00:04 :) Mar 11 14:03:40 code1: end of onDestroy() Mar 11 14:03:58 unless it's a state change Mar 11 14:04:07 no intent receivers. Mar 11 14:05:34 You mean onDestroy of activity rather than placing it in Application? Mar 11 14:06:39 in the what, now? Mar 11 14:07:12 Application class doesn't have an onDestroy method does it? Mar 11 14:07:32 ozo if i change the edittext tot textview like this i get: E/AndroidRuntime(1874): java.lang.RuntimeException: Unable to start activity ComponentInfo{apt.tutorial/apt.tutorial.DetailForm}: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText Mar 11 14:07:53 right, in the activity Mar 11 14:07:58 ddreamer: That's a pretty obvious error Mar 11 14:08:04 I don't use Application Mar 11 14:08:05 You're casting a textview to an edittext Mar 11 14:08:58 code1: Don't System.exit(0) ... Android will reclaim the memory when it needs it Mar 11 14:09:44 lol Mar 11 14:09:52 ddreamer: what SimonVT says, check your code Mar 11 14:09:57 and what's the best way to change the value in a textview? can't it be done programatically with settext ? Mar 11 14:10:21 with the edittext it was done programatically like that Mar 11 14:10:24 SimonVT: Is it possible to have memory leak if you application is completely killed/destroyed? Mar 11 14:10:50 ddreamer: the value is not your problem, somewhere in your code, you're casting a textview to edittext Mar 11 14:11:02 code1: Uh, no Mar 11 14:11:11 SimonVT: I have a singleton class and I just want to make sure it's not leaking so I've put a log message in the finalize but it's never displayed Mar 11 14:11:37 if it's killed, it might not have a chance to do clean-up and could leave background processes running if it uses runtime.exec or other "root" techniques Mar 11 14:12:02 * pragma_ mutters about the lack of Signal and SignalHandler Mar 11 14:12:12 we has a linux Mar 11 14:12:13 code1: do you *need* a singleton? Mar 11 14:12:15 ozo, i think that's because i changed the edittext to and textview in the xml Mar 11 14:12:38 ddreamer: of course it is, now you have to fix it in the code Mar 11 14:12:49 the closest i would recommend to a singleton in most places is holding the instance in a WeakReference Mar 11 14:12:52 canadiancow: I've thought about it long and hard and it makes sense really Mar 11 14:13:05 or at least if it's somethign with high memory usage Mar 11 14:13:10 code1: What exactly is the issue? Yes, a singleton is kept in memory until it's released. If android chooses to reclaim the memory, your singleton will be GCed Mar 11 14:13:35 My facebook integration doesn't work on a gnexus. It opens the app and says "loading" and then it just crashes. The first crasch is silent, without anything in the logcat. The second one has a keystoreexception: java.security.KeyStoreException: java.security.NoSuchAlgorithmException: KeyStore jks implementation not found Mar 11 14:13:38 And I know I have the correct key hash at the developer site Mar 11 14:15:13 SimonVT: ok but it won't reclaim the singleton memory if it's being used (referenced) right? Mar 11 14:15:40 Riight Mar 11 14:16:28 But if Android chooses to reclaim your memory, it reclaims the entire process, basically deallocating all the memory your application was using Mar 11 14:16:28 ok, just wondering why the finalize log wasn't being called but maybe it's not reliable to count on it. Mar 11 14:16:30 what units does Canvas.drawText use? Mar 11 14:17:16 Well, you can't know when it's going to reclaim the process.. And I don't know how exactly it does it, if finalize will be called Mar 11 14:17:25 ozo ok i'm looking for it, but settext shouldn't be a problem, asigning the text value to a TextView, right? Mar 11 14:17:32 i posted my code here : http://pastebin.com/b8CZ2PeJ Mar 11 14:17:54 ah ok i think i got it Mar 11 14:17:59 SimonVT: ok so basically my singleton can't memory leak because there's only ever one, right? Mar 11 14:19:11 Well, the point of a singleton is that there's only one instance Mar 11 14:19:14 does anyone know what units of text Canvas.drawText() uses? DIP? Mar 11 14:20:06 ddreamer: no, the settext isn't the problem, that should work just fine. in the error-log, you should get which codeline is your problem Mar 11 14:24:02 hi Mar 11 14:24:11 which version of Java SE do i downloads? Mar 11 14:24:22 6uWhatever or 7uWhatever? Mar 11 14:24:46 the newest one? Mar 11 14:25:15 there is a newest 7 and a newest 6? Mar 11 14:25:33 7? Mar 11 14:25:36 as long as you set the compiler optiosn in eclipse to 6, you'll be fine Mar 11 14:25:40 regardless of which you download Mar 11 14:25:49 but tehre are features of 7 unsupported by dalvik Mar 11 14:30:34 qqq Mar 11 14:32:29 The subconscious letter of the day, is q. Mar 11 14:33:51 canadiancow: "or at least if it's somethign with high memory usage" - you mean if it's a small (low memory usage) class then keeping it around as a singleton isn't a big deal? Mar 11 14:33:59 exactly Mar 11 14:34:02 I/ActivityManager( 197): Displayed com.facebook.katana/.ProxyAuth: +2s854ms Mar 11 14:34:05 and then dies, wtf Mar 11 14:34:13 i still think theres a 95% chance you're using a singleton where it isnt desired though Mar 11 14:35:57 D/webviewglue(23068): nativeDestroy view: 0x2a6798 Mar 11 14:36:11 wth Mar 11 14:37:10 http://pastebin.com/k3sgFaPh Mar 11 14:38:11 canadiancow: I've spent a long time with other ways and the singleton really does make sense in this case without all the headaches the other options were causing. It is lightweight so I don't think keeping it around will be an issue (how can I measure this?) Mar 11 14:42:02 I'm having a weird problem: AsyncTask. I execute it, onPreExecute gets called, doInBackground does not. Last line of onPreExecute is a log call, so is the first line of doInBackground Mar 11 14:42:16 any ideas ? Mar 11 15:15:24 hi, the newest eclipse can't use the android plugin... it's installed but missing from the menus, builders, etc. is there a solution to this? Mar 11 15:16:33 nooba use the 3.5 version Mar 11 15:16:47 3.5.2* Mar 11 15:23:12 My supposedly "dual core" android phone only has cpu and cpu0 entries in /proc/stat. According to the linux kernel docs for /proc/stat, the first line "cpu" is the aggregate of all the cores. Mar 11 15:23:17 Is this intentional? Mar 11 15:23:23 Should I subtract to get core2? Mar 11 15:27:44 How can you create custom views like a messagebox in an sms application ? Mar 11 15:28:04 shroomyreader: you mean like the conversation bubble? Mar 11 15:28:16 Does android have a name to draw a custom view ? Mar 11 15:28:42 if that's the case, you don't need a custom view. Just set a 9patch image of a conversation bubble as the background of a TextView Mar 11 15:29:04 custom views can be written by extending the View class, or any subclass of it. Mar 11 15:29:15 but I dont think that's what you're actually looking for. Mar 11 15:29:49 I'm not sure what I'm looking for, I want to create a different look and feel for one object Mar 11 15:30:21 shroomyreader: you probably just want to change the background to something nicer Mar 11 15:30:26 there are thrid part sms applications that have a differnet UI Mar 11 15:30:26 shroomyreader: read up on 9patch images Mar 11 15:30:48 those thrid party sms apps have these textboxes for text messages Mar 11 15:30:51 I wonder how they create it Mar 11 15:31:00 I don't want to change my background lol Mar 11 15:31:10 I'm not sure what you call such thing Mar 11 15:31:42 It's a textview with a background.. Mar 11 15:32:01 shroomyreader: take the advice I gave you and read the 9patch tutorial Mar 11 15:32:04 Oh now I see what you mean Mar 11 15:32:08 thanks Mar 11 15:32:09 I've made this before, I know exactly what it is Mar 11 15:32:13 I'm look into it Mar 11 15:32:18 *I'l Mar 11 15:33:40 Yup that is indeed what I needed, thanks Mar 11 15:34:01 Are there any other good tutorials for / site for android UI design? My screens look dull! ;) Mar 11 15:34:42 btw thanks for the 9patch mention, taking a look at that now Mar 11 15:40:41 i need to move an ImageView in response to sensor readings Mar 11 15:40:45 what's the recommended way for this? Mar 11 15:41:06 right now i plan on manually setting the layout parameters on every sensor reading and requestLayout() Mar 11 15:41:14 i guess this might turn out to be expensive though Mar 11 15:43:09 it's basically a static layout except for the moving view Mar 11 15:53:26 really pisses me off. I go to my gmail account to visit the developer console and update my app, and when I try to go to Youtube, it already has me logged in on that account Mar 11 15:53:39 except my youtube account is totally separate... on purpose. Mar 11 15:53:44 * Hiraghm bitches and moans some more Mar 11 15:56:37 i used to have that problem a lot when i was writing someone elses app.. log into their acc to publish, then try and go to gmail and end up reading all their emails, making a note of their passwords, siphoning off their credit card data, etc etc Mar 11 15:56:48 wasn't so bad, bought a tablet! Mar 11 15:57:00 xD Mar 11 16:06:09 man the logcat in eclipse autopauses at irregular intervals :( Mar 11 16:36:01 hey guys i wanted to ask if this is the correct Syntax for a Cursor in SQLite for getting back only the rows matching EXACTLY ... and ALL of those three String ?! Mar 11 16:36:01 Cursor cGP_Stats = unsreDatenbank.query(DATABASE_TABLE2, columnscompleteStats, KEY_ROWIDP + "=? and " + KEY_OPP + "=? and " + KEY_GSET + "=?", new String[] {strPlayerID, strOpponent, strSetcount}, null, null, null); Mar 11 16:36:09 Could someone help me with the issue I'm getting. I'm trying to work with SQLite databases and here my code - http://pastie.org/3571686 - I'm getting an SQLiteException telling me my table doesn't exist, but it should be created by "onCreate" Mar 11 16:36:53 The issue presents itself first on line 57, because I call it to add a "game" Mar 11 16:37:38 Is it possible to extract the server time from a HTTP response? Mar 11 16:40:06 How is it possible that an ImageView and a LayerDrawable assigned to it have different widths and heights?? Mar 11 16:41:50 mephju: possible but not necessarily likely Mar 11 16:42:21 p_l, what do u mean. I guess I could do so via some header field right? Mar 11 16:43:49 mephju: if you ensure that the server will send some header with time, yes Mar 11 16:44:03 hmm Mar 11 16:44:13 p_l, unfortunately I am not sure Mar 11 16:44:32 can't I force the server to do so via my request? Mar 11 16:44:39 nope Mar 11 16:45:30 man sometimes it pays to know about the protocols one is using Mar 11 16:46:49 afaik the few places time is mentioned in HTTP it's optional, and then there's the problem that I don't think the format of that was standardized Mar 11 16:47:32 that IS a problem Mar 11 16:48:00 Sun, 11 Mar 2012 16:46:59 GMT that's what I just got as response Mar 11 16:48:25 if you control the application you're querying with HTTP, you can drop in an extra header Mar 11 16:48:36 sure. but I am not Mar 11 16:48:42 in control Mar 11 16:48:51 p_l thanks for the information Mar 11 16:49:08 well, the time headers work good enough for caching, but it might be not enough resolution/correct for your needs Mar 11 16:49:18 :| the Set returned by Android's HashMap implementation doesn't support addAll (to perform a union) :| Mar 11 16:49:50 * readme reluctantly writes for loop. Mar 11 16:54:45 is there any way to prevent LayerDrawable from resizing it's layers? Mar 11 17:22:30 are there any nice library/software available to draw charts? afaik there's nothing like this in the standard library Mar 11 17:23:04 google charts lol Mar 11 17:41:14 I thought that it would be nicer not to require internet connection to use the application, but why not then Mar 11 18:00:36 hi there Mar 11 18:05:52 I hate the NDK Mar 11 18:06:02 do you have to use cygwin to work with the NDK? Mar 11 18:32:24 Does the function finish() only work in connection with startActivityForResult? Is there another way to "end" the current activity, such that it returns to the parent activity? Mar 11 18:34:10 It works for any activity, no matter how it's started Mar 11 18:36:15 SimonVT, In said "startup" activity I called another activity using the startActivityForResult() and now am back in the parent activity. How do I call the onCreate for the parent activity so it completes building out the UI etc? Mar 11 18:36:46 what? Mar 11 18:38:51 In the parent activity, I check if the application has been "initialized". If not, I call the initialization activity using startActivityForResult(). Now once that activity is done, I've returned to the parent activity in the onActivityResult(). How do I ensure that the rest of the onCreate is completed? Mar 11 18:39:10 or call it explicitly Mar 11 18:39:35 Eh, onCreate is executed fully when the activity is created Mar 11 18:39:39 To call something explicity means to do it yourself? Mar 11 18:39:44 If you need stuff to happen when you return, do it in onActivityResult Mar 11 18:39:52 kk Mar 11 18:40:12 so the onCreate will be called again before the onActivityResult? Mar 11 18:40:20 No Mar 11 18:41:17 So how do I call the onCreate again? Mar 11 18:41:30 When i press the menu button, how do i get an about page to pop up? Mar 11 18:42:30 You don't, paradoxx .. you can finish the parent activity and relaunch it, but you don't manually call it Mar 11 18:42:32 tomtiger11, You have to create an "About" activity, and add a menu item that initiates that activity Mar 11 18:43:10 SimonVT, You mean the child activity? Mar 11 18:43:18 no Mar 11 18:44:17 paradoxx: How do i create menu items? Mar 11 18:45:04 It is the parent activity that calls the child activity using the startActivityForResult at the beginning of the onCreate. Now I am back in the parent activity's "onActivityResult" function. How then would I get the onCreate to finish? Mar 11 18:45:17 onCreate has already finished Mar 11 18:45:24 It was finished before the new activity was launched Mar 11 18:46:00 tomtiger11, See http://developer.android.com/guide/topics/ui/menus.html Mar 11 18:46:23 SimonVT, oh ok. So it will complete the onCreate even if I start the child activity in the middle of it? Mar 11 18:46:29 Yes Mar 11 18:46:32 kk Mar 11 18:46:33 Got you Mar 11 18:46:36 It doesn't magically stop mid-method Mar 11 19:00:21 hey all Mar 11 19:01:43 Quick question on passing contexts. I have a standalone class that I want to be reusable. It contains a call to startActivity however (as it runs a thread outside of the main application thread). It communicates with the calling class via a handler. What is the proper way to kick off startActivity via passing the context Mar 11 19:05:28 Sorry, got disconnected so reposting my question. Mar 11 19:05:29 Quick question on passing contexts. I have a standalone class that I want to be reusable. It contains a call to startActivity however (as it runs a thread outside of the main application thread). It communicates with the calling class via a handler. What is the proper way to kick off startActivity via passing the context Mar 11 19:08:22 paradoxx: Can you pastebin me some example code for my menu? Mar 11 19:10:07 hi Mar 11 19:15:05 paradoxx: create an xml of the menu items, inflate these menu items in your activity Mar 11 19:18:08 I want to add to my main.xml, should I add it inside the or where? Mar 11 19:18:22 I get error for main.xml Mar 11 19:19:05 You put menu xml in res/menu/ Mar 11 19:20:02 create a new xml file separate from your main called main_menu.xml or whatever Mar 11 19:23:27 gochya thanks Mar 11 19:23:34 can I have a sub-sub-menu? Mar 11 19:23:48 yeah, but its also in a separate menu xml Mar 11 19:24:06 how's that? in android.com it says "You can add a submenu to an item in any menu (except a submenu) by adding a element as the child of an ." Mar 11 19:24:45 AbelianHorizon: how can I connect that xml file for the sub-sub menu to this one that has sub menu? in the click events? Mar 11 19:26:17 yeah Mar 11 19:30:13 menu cannot be resolved or is not a field - inflater.inflate(R.menu.menu, menu); Mar 11 19:30:49 Newbie question, how does Android handle methods that are only available in later APIs than the API level described in the android:MinSDKVersion? So if it encounters an API that was defined in API level 11 and the API level I'm running is 9, does the app crash? Mar 11 19:31:19 tomtiger11: this is inside onCreateOptionsMenu(Menu menu) ?? Mar 11 19:31:23 Ferazel: yes Mar 11 19:31:30 Ferazel: it's your job to ensure you don't call those methods Mar 11 19:31:38 there are various ways of doing this Mar 11 19:32:10 AbelianHorizon: yes Mar 11 19:32:24 how to get the market:// address of my app ? Mar 11 19:32:51 romainguy_: Damn google samples saying that they only require API level 5 when they really need API level 11 :p Mar 11 19:33:16 which samples? Mar 11 19:33:34 The expansion file downloader sample Mar 11 19:34:13 AbelianHorizon: Yes, it is Mar 11 19:34:36 They reference the DownloadManager.getMaxBytesOverMobile methods, but yet there are no checks for if the API is available. Mar 11 19:34:40 market://details?id=com.example.your.package Mar 11 19:35:26 -.- Mar 11 19:36:53 Hi, there's a problem I really don't understand, I have a function in an other class than my activity that is supposed to display toasts, I send an argument to this fonction which is a Context variable which is set in onCreate to "this" (context= this). If I call this function from the UI thread, the Toast is displayed, but if I call it from an other Thread it doesn't Mar 11 19:37:30 I don't understand because the context variable is the same... Mar 11 19:37:50 ui stuff happens on the ui thread Mar 11 19:38:25 So how could I display toast...? Mar 11 19:38:35 Display it from the ui thread Mar 11 19:38:40 is adding a bluetooth protocol hardware-specific? Mar 11 19:39:28 menu cannot be resolved or is not a field - inflater.inflate(R.menu.menu, menu); Mar 11 19:40:14 1. make sure you import the right R 2. make sure R is actually built 3. maybe try to make up some smarter names, as that is just confusing Mar 11 19:40:16 SimonVT : ... isn't there any easier solution ? Mar 11 19:41:05 3) names ++ :) Mar 11 19:41:10 SimonVT: Its straight from a guide, so... Mar 11 19:42:34 tomtiger11: is this in an activity? or fragment? Mar 11 19:42:45 Walui: Yeah, no.. ui stuff == ui thread.. And it's pretty easy to post to the UI thread, just use a handler.. Or if you're in an activity, you can even use runOnUiThread Mar 11 19:43:13 Quick question on passing contexts. I have a standalone class that I want to be reusable. It contains a call to startActivity however (as it runs a thread outside of the main application thread). It communicates with the calling class via a handler. What is the proper way to kick off startActivity via passing the context Mar 11 19:43:17 tomtiger11: Alright, small addition to the guide: Your menu xml does not have to be called "menu.xml" Mar 11 19:44:43 SimonVT: I know :D Mar 11 19:46:44 SimonVT: But i need the error fixed tather than changing the name of my .xml file Mar 11 19:48:08 And the answer to #1 and #2 is? Mar 11 19:48:42 #3 though for sure dude Mar 11 19:49:01 Can either of you help me? Mar 11 19:51:00 What R did you import? The one in your package? Mar 11 19:51:17 Yes... Mar 11 19:51:35 SimonVT : can I create a handler in a class which isn't an activity ? Mar 11 19:51:43 hello, anyone willing to help me compile actionbar sherlock? Mar 11 19:51:54 Okay. Has the R been built since you added the menu xml? Try clean project Mar 11 19:52:11 SimonVT: I can't be bothered... Mar 11 19:52:26 Walui: It just has to be created on the ui thread Mar 11 19:54:07 tomtiger11: help yourself by answering questions about your code Mar 11 19:55:07 anyone do anything with xmpp+jingle extension for android? Mar 11 19:55:17 hi Mar 11 19:55:31 is there a way to move my dev acct to another gmail? Mar 11 19:55:34 does anyone know of any way to use Python on Android? Mar 11 19:55:59 since there is no way to set permissions for people to view installs/reports, I'd like my team to use just the common gmail account to view from and not my personal one that I haev dev acct registered under now Mar 11 19:56:12 meoblast001: give sl4a a try Mar 11 19:56:35 When using android code libraries (such as when you add a library project under Android in Eclipse), what are the steps necessary to get those libs to recompile? Mar 11 19:56:55 meoblast001: https://code.google.com/p/android-scripting/ Mar 11 19:57:00 So that the project using those libraries will use the updated code? Mar 11 19:57:03 ah, thanks Mar 11 19:57:21 QubeZ: Yes.. I know there's an article on it on the developer help page, but I can't find it right now Mar 11 19:57:31 bassrael: would this allow me to still write my application in Java, but then use Python to do some of the application logic (i'm going to be importing some application logic from a Python program, and don't want to rewrite it in Java if i don't have to) Mar 11 19:57:38 SimonVT: thanks, i'll look it up Mar 11 19:57:42 Ah, QubeZ: https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=139626&topic=16285&ctx=topic Mar 11 19:57:46 oh nice! Mar 11 19:58:08 thank you Mar 11 19:58:16 what kind of variable should I use to share a value among all activities that are running or going to be called in an app? Mar 11 19:59:04 mindlogger: try using shared preferences if you want to share data among all activities, or pass it to the activities that need it. I wouldn't suggest using public static vars. Mar 11 19:59:52 QubeZ: always used singletons. speaks any argument agains taht? Mar 11 19:59:54 *that Mar 11 20:00:11 QubeZ: I will try passing it to the activities, thanks Mar 11 20:03:38 does dalvik automatically optimize string concatenations using StringBuilder? Mar 11 20:03:48 it seems so in the debugger, anyway Mar 11 20:05:59 What do you mean? Mar 11 20:06:30 concat some strings, and set a breakpoint, you'll see that StringBuilder is in the call stack Mar 11 20:06:46 That's how + is compiled Mar 11 20:07:20 Which is also why it's inefficient to do + in a loop, since each iteration will create a new stringbuilder Mar 11 20:07:33 ah, ok Mar 11 20:07:38 now i see why I use stringbuilder Mar 11 20:07:47 =) Mar 11 20:09:56 I'm trying to make a loading splash screen for my app. But the setcontentview, which is called first, doesn't happen until the calculations are finished. Mar 11 20:10:17 SimonVT : I'm a bit lost... It seems nothing can work in my situation... Mar 11 20:10:34 If your calculations take long enough for a splashscreen to be necessary, you should probably use a thread Mar 11 20:10:36 IS there a sure fire way to make sure the setcontentview is finished before calling the other alculations? Mar 11 20:11:04 anyidea, for setting the background colour for the main activity and all activities that going to be called? Mar 11 20:11:05 SimonVT : I can't use a handler because I'm not in an activity class Mar 11 20:11:26 Walui: Handler handler = new Handler() Mar 11 20:11:29 Can be created anywhere Mar 11 20:11:36 It's attached to the thread it's instantiated from Mar 11 20:11:52 And thus messages posted to that handler will be executed on that thread Mar 11 20:12:23 So it won't work because the class is used in an other thread Mar 11 20:12:29 mindlogger: Set a theme with android:windowBackground Mar 11 20:12:52 Walui: Well yes, the handler has to be created on the ui thread for messages to be posted to the ui thread Mar 11 20:13:13 In fact, onCreate creates a new Thread, and this thread calls a function in an other class Mar 11 20:13:17 But as I said, Activity has a runOnUiThread method you can use instead Mar 11 20:13:26 and my toasts are in this function... Mar 11 20:13:35 SimonVT: do you have an example code? Mar 11 20:13:36 Since I guess you're already passing the activity, use that method Mar 11 20:14:12 Thsi method can only be used in an activity class Mar 11 20:14:21 and my function is in an other class Mar 11 20:14:37 SimonVT: ah so it's that easy? android:windowBackground="#000" ? Mar 11 20:14:47 mindlogger: Yep Mar 11 20:14:51 ty Mar 11 20:14:55 Walui: Are you not passing the activity instance? Mar 11 20:15:24 I don't understand so I don't think so... :/ Mar 11 20:15:42 Does anyone know how to change main activity programatically? Mar 11 20:16:22 SimonVT: but I get this error: "windowBackground cannot be resolved to a variable" why is that? Mar 11 20:16:54 mindlogger: It has to be set in the theme of your application Mar 11 20:17:20 There's an article on themes on the dev page Mar 11 20:17:30 SimonVT: but I need to handle that in a click event not in the theme Mar 11 20:18:36 Well, then you'll have to set the background on each activitys layout Mar 11 20:19:08 SimonVT : What do you mean by passing the activity instance...? Mar 11 20:19:10 SimonVT: how can I do that for just one activity now Mar 11 20:19:47 Walui: Take the activity as a parameter Mar 11 20:20:15 mindlogger: Get the parent view and set the background Mar 11 20:20:29 SimonVT : and then what could I do with it ...? Mar 11 20:20:38 Walui: Call runOnUiThread? Mar 11 20:21:13 You could also just pass a handler Mar 11 20:22:45 SimonVT : When I write Message msg = new Message(); I get an error Mar 11 20:23:22 sorry it worked Mar 11 20:27:27 SimonVT: I did ViewParent current = getParent(); to get the parent view but I get error, getParent() returns an Activity not a ViewParent Mar 11 20:27:59 so scaleType="centerInside" only shrinks the image while keeping aspect ratio? Mar 11 20:28:02 You could also try findViewById Mar 11 20:28:12 is there a scaleType that also grows the image while keeping the aspect ratio? Mar 11 20:30:28 SimonVT : I tried passing a handler, but I can't do handler.sendMessage(msg); Mar 11 20:30:42 It says the method doesn't exist Mar 11 20:30:55 Walui: Just post a runnable Mar 11 20:31:10 SimonVT: tnx Mar 11 20:31:29 SimonVT : what...? Mar 11 20:32:10 SimonVT : You told I could just pass a Handler and then use it Mar 11 20:32:34 handler.post(new Runnable() { ... }) Mar 11 20:32:50 http://stackoverflow.com/questions/4372899/android-nativeactivity, NDK is to a large extent a JNI wrapper around the Android SDK? Mar 11 20:50:17 is it the right way to start a new activity? MortgageActivity mortgage = new MortgageActivity(this.backColour); Mar 11 20:51:12 I have a MortgageActivity.java file with a constructor "public MortgageActivity(int backColour)" and "public void onCreate(Bundle savedInstanceState)" am I doing it right? Mar 11 21:05:01 hmm, interesting the dimensions of the drawable i get with ImageView.getDrawable() are bigger than my original png Mar 11 21:07:44 I want to pass an argument to MortgageActivity() how can I do it in "Intent mortgage = new Intent(context, MortgageActivity.class); startActivity(mortgage);" Mar 11 21:08:15 mindlogger: look into bundles Mar 11 21:08:30 mindlogger: you can attach various data easily to intents Mar 11 21:08:56 how's that easy way? where is bundles? Mar 11 21:09:00 mindlogger: https://developer.android.com/reference/android/content/Intent.html , look under 'extras' Mar 11 21:09:03 Hello, when doing a managed query to get contacts how can i just display the phone-contacts and skip the facebook, SIM and twitter ones? Mar 11 21:09:22 mindlogger: That's the easy way because that's how android works. The documentation will show you several examples. Mar 11 21:09:36 dragorn: ty Mar 11 21:09:57 Duke_Puke: I have no idea; seems like this place is relatively dead on the weekends tho, ask tomorrow and there's usually a lot more people awake doing UI work Mar 11 21:10:37 dragorn: Ok will try tomorrow too :) Mar 11 21:13:51 dragorn: does it do the job now? mortgage.putExtra("ca.nbcc.saintjohn.MortgageActivity", this.backColour); Mar 11 21:16:35 does it pass "this.backColour" to the constructor of MortgageActivity? Mar 11 21:21:43 JakeWharton broke it Mar 11 21:23:57 are "context" ActionModes allowed in ActionBarSherlock? Mar 11 21:24:35 I think I found it nvm Mar 11 21:42:42 heyy folks Mar 11 21:42:45 how goes it Mar 11 21:49:54 k1t_: it's going very bad, eclipse is crashing, and I will be late for submitting my work tomorrow Mar 11 21:58:06 hey I want to create a popup windows only in the first time the user installed the app, somethin like "Hello welcome, bla bla bla" how can I managed that is only gona see one time that popup? Mar 11 22:27:38 If I try to add the compat library to my project, it looks for the .jar in completely the wrong place (~/Documents/v4/android-support-v4.jar rather than where it really is, /android/android-sdk-linux/extras/android/support/v4/) -- any ideas how I can correct this? Mar 11 22:27:55 I've tried removing/installing the support package Mar 11 22:28:18 I'm right clicking my project, android tools, add compat library Mar 11 22:38:36 ""Because Rubin judges the success of Android primarily through device activations and mobile search revenue, the app store has been a secondary priority inside the group. This is even though apps are a key reason consumers might choose one type of device over another." Mar 11 22:38:52 looks like Eric Chu is stepping down Mar 11 22:39:40 http://techcrunch.com/2012/03/10/eric-chu-steps-away-from-overseeing-androids-app-store-jamie-rosenberg-expands-role/ Mar 11 22:40:18 i guess thats why i keep hearing the "but we're activating 1 BAZILLION phone per minute!" Mar 11 22:40:21 bahhhh Mar 11 22:42:45 there are 666 people in the channel. the sign of the devil. Mar 11 22:43:19 oh, not anymore. we're safe again. :) Mar 11 22:47:50 something has to be a secondary priority Mar 11 22:48:13 neekers: probably my fault. I'm a satanical Mar 11 22:49:13 oh my gosh. Mar 11 22:49:32 Codhisattva: what brings you to these hallowed halls? :) Mar 11 22:50:48 neekers: today is SDK install day Mar 11 22:50:53 I'm anticipating trouble Mar 11 22:50:59 heh Mar 11 22:51:08 are you porting one of your apps over? Mar 11 22:51:14 yeah Mar 11 22:51:27 The 7th Guest comes to Android ASAP ;) Mar 11 22:51:37 damn NDK will be the death of me Mar 11 22:51:55 kinda cool http://venturebeat.com/2012/03/10/a-private-social-network-just-for-you-and-your-sweetie/ Mar 11 22:52:26 i was just reading an article yesterday about a game coding company who dropped android because it was taking 20% of thier time to create android games with all the fragmentation but only getting them a 5% return on thier time investment Mar 11 22:52:46 ack Mar 11 22:52:54 neekers: *support*, not just create Mar 11 22:52:57 well I'm special since the game is complete Mar 11 22:52:59 as in, fixing bugs etc. Mar 11 22:53:10 Codhisattva: i'll be watching in eager anticipation how it works out for you Mar 11 22:53:20 me too Mar 11 22:53:20 p_l: was that on slashdot? Mar 11 22:53:44 * pragma_ suddenly realizes he hasn't looked at slashdot in the last several months. Mar 11 22:53:46 Codhisattva: if you have any problems with the ndk, it could be because that huge sun spot is burping Mar 11 22:53:51 p_l: support also means "why u no work on my android para 4g max pocket!" Mar 11 22:54:54 Codhisattva: or "why are the textures white!" ;) Mar 11 22:54:58 here it is Mar 11 22:54:59 http://games.slashdot.org/story/12/03/10/2226214/battleheart-developer-drops-android-as-unsustainable?utm_source=rss1.0mainlinkanon&utm_medium=feed Mar 11 22:55:04 http://mikamobile.blogspot.com.au/2012/03/our-future-with-android.html Mar 11 22:55:04 p_l: :) Mar 11 22:55:13 p_l: that is exactly my kind of problem Mar 11 22:57:29 it's a good day when you can spend 10 minutes closing tickets :D Mar 11 22:57:39 ohman I just figured out the solution to my "Your project contains errors" with no actual errors in the project problem Mar 11 22:58:15 after completely uninstalling/reinstalling eclipse/everything, it turns out that I just needed to delete my debug certificate (probably out of date) Mar 11 22:58:23 what a huge pita Mar 11 22:59:04 question: if I play a sound using media player, how can I prevent the sound from being stopped on orientation change (and there for activity desctruction/recreation) Mar 11 23:00:39 wabz: also, next time you have a huge problem, just delete your workspace metadata after your debug key ;) Mar 11 23:00:54 not your /workspace/ just the .metadata directory :D Mar 11 23:01:55 I'm not really sure if you're trolling or not haha Mar 11 23:02:37 i'm not trolling :) i rm my workspace metadata dir every time i reinstall eclipse Mar 11 23:02:51 hate computers Mar 11 23:02:53 i reinstall eclipse on every new release Mar 11 23:03:08 * g00s is paranoid Mar 11 23:04:17 i never noticed... Mar 11 23:04:19 :) Mar 11 23:06:33 yo fellas and fellets Mar 11 23:07:01 why do I get this exception? "java.lang.RuntimeException: Unable to instantiate activity ComponentInfo" Mar 11 23:07:24 mindlogger: we kinda need to see the code and full stacktrace Mar 11 23:07:53 mindlogger: did you check stackoverflow? http://stackoverflow.com/questions/4688277/java-lang-runtimeexception-unable-to-instantiate-activity-componentinfo Mar 11 23:09:16 QubeZ: https://gist.github.com/2018574 Mar 11 23:09:50 QubeZ: line 43 - 53 when I try to start an activity Mar 11 23:09:58 I'm gonna check that link Mar 11 23:10:01 mindlogger: now, the stacktrace... where it is stating the runtimeexception? If you look at that stackoverflow, your answer might be there Mar 11 23:10:12 mindlogger: pronbably you forgot to add activity to your manifest Mar 11 23:10:21 QubeZ: I did add that Mar 11 23:10:57 mindlogger: can you post your manifest? Mar 11 23:10:58 QubeZ: I just wrote the name for them in manifest, does it need more than that? Mar 11 23:11:01 sure Mar 11 23:11:39 QubeZ: https://gist.github.com/2018586 Mar 11 23:12:00 mindlogger: you forgot the . (dot) Mar 11 23:12:05 where? Mar 11 23:12:11 .MortgageActivity and .BmiActivity Mar 11 23:12:35 although im not certain the manifest cares about that, but try it first Mar 11 23:12:37 QubeZ: are you sure? b/c I added that from the application tab, I didn't write them manually Mar 11 23:12:42 ok Mar 11 23:13:46 also try a Project -> Clean then Build again Mar 11 23:13:52 sometimes Eclipse is stupid, if thats what you're using Mar 11 23:14:12 yes I'm using eclipse Mar 11 23:15:04 i dont see any other glaring issues Mar 11 23:15:23 when you load a html file from the web view does it not load the javascript from the script tags? Mar 11 23:15:46 mindlogger: you should get into the habit of fully qualifying your activity name like android:name="ca.nbcc.saintjohn.MortgageActivity" in your manifest Mar 11 23:16:16 Today I learned what a witches's broomstick really was. Mar 11 23:16:37 pragma_: do tell Mar 11 23:16:41 http://lolclicks.net/wp-content/uploads/main/2012_02/njgFR.png Mar 11 23:18:14 I may never get anywhere with this. Android dev seems to be 90% downloads so far. Mar 11 23:18:26 Codhisattva: what? Mar 11 23:18:46 QubeZ: gotta download all these things and then download some more Mar 11 23:18:48 Yeah, I'm always downloading ideas from my brain to my code. I need more bandwidth. Mar 11 23:19:17 Codhisattva: i dunno, took me 15 mins to setup my dev environment... not really an ordeal Mar 11 23:20:13 imo, they should make it harder to set up the dev environment, then we'd have less amateurs putting inefficient cpu/battery hogs with broken UI designs on the market Mar 11 23:20:22 QubeZ: hopefully I'm on the last piece. (on my network it takes hours to get eclipse+sdk+ndk+abi+adt) Mar 11 23:20:35 pragma_: I think making it harder to get on the market would be a better idea Mar 11 23:20:40 pragma_: high bars are helpful but they won't stop me :P Mar 11 23:21:43 the market ought to have a stress-tester that tests the app for cpu/battery usage over a period of 24 hours or so that the app must pass before allowing the app to hit the public Mar 11 23:22:12 pragma_: nah, some apps are just battery hogs Mar 11 23:22:14 look at navigation Mar 11 23:22:28 navigation is for women Mar 11 23:22:45 real men drive in circles Mar 11 23:22:56 Try To Do Mapr :) Mar 11 23:23:12 for some stupid reason, the market will not return proper search for "to do mapr", only "todomapr" Mar 11 23:23:22 i hate the searching capability of the market Mar 11 23:23:31 QubeZ: how can I get the stack info Mar 11 23:23:37 I couldn't solve that :( Mar 11 23:23:38 mindlogger: from logcat Mar 11 23:23:50 dump the entire logcat into a pastebin and i will continue to aid you Mar 11 23:23:54 I'd like to have been able to add tags to my app, and further subcategorize it among the listing Mar 11 23:23:58 pragma_: somewhat off topic, but do you think this is normal or is it one of those shitty apps we were talking about causing it? http://dl.dropbox.com/u/24031172/Screenshot_2012-03-11-18-35-32.png Mar 11 23:24:13 instead of generic "Tools", I'd like to have further specified that it was a networking tool, for instance. Mar 11 23:24:23 pragma_: dude, what a simple idea right? but Google dosen't do that. Mar 11 23:24:46 I'd love to add tags like "mapr" so anytime someone typed "to do mapr" it wiould return my app. Right now I'm having a hard time getting my app visible. Mar 11 23:25:11 QubeZ: would you please have a look https://gist.github.com/2018586 ty Mar 11 23:26:31 mindlogger: what is your code there from line 81:84? You dont need a constructor. Mar 11 23:26:35 Do that stuff in onCreate Mar 11 23:27:53 QubeZ: https://gist.github.com/2018574 there is no 81 to 84 Mar 11 23:28:08 ah ok Mar 11 23:28:12 also, why dont you just set your background color in the XML of your main layout? Instead of doing it programtically, will you be changing the background later based on something the user does? If not, just add the android:background="@android:color/black" Mar 11 23:28:17 jon-: you might be able to use System Tuner to start logging cpu usage over an hour or two and then look at the data to see which apps are hitting the cpu Mar 11 23:28:44 thanks, the phone is also just very sluggish Mar 11 23:28:45 QubeZ: b/c it should happen by a click event Mar 11 23:28:47 almost tempted to just wipe it Mar 11 23:29:02 mindlogger: ok then do that in some method after you set the listener in onCreate... take our that constructor crap Mar 11 23:29:03 yes I'm changing based on user input Mar 11 23:29:09 that is why your activity is not instantiating Mar 11 23:29:24 QubeZ: how can I pass the color to that activity then? Mar 11 23:30:01 mindlogger: you did a putExtra so in your onCreate... do this: Mar 11 23:31:47 http://pastebin.com/R4w78EnR Mar 11 23:32:04 this would be in yoru Bmi activity... you get the extras passed in Mar 11 23:32:22 that 0 at the end of the line 4 just says, if no extra exists with that name, just default to 0 Mar 11 23:33:12 does that make sense? In Activity A you putExtra and call Activity B, so in ActivityB onCreate() you get the extra (getInt, getString.. whatever it is) Mar 11 23:34:43 QubeZ: yes it does make sense, thanks a lot, I'm editing it Mar 11 23:35:06 no worries Mar 11 23:37:21 alright i gotta head out to eat Mar 11 23:37:23 g'luck Mar 11 23:37:51 check out and give me a good rating :) ... Mar 11 23:37:52 https://play.google.com/store/apps/details?id=com.controlledsenility.android.todomapr Mar 11 23:38:03 well if you like it Mar 11 23:38:03 QubeZ: have fun Mar 11 23:41:53 I got the same error :( Mar 11 23:43:52 ls Mar 11 23:44:09 wting: what's "ls" ? Mar 11 23:44:25 mindlogger: it gives you the number of characters in a file that are "l" Mar 11 23:44:31 wrong terminal, sorry. :) Mar 11 23:44:51 no it gives me a list of files and directories Mar 11 23:44:59 my pov is linux terminal Mar 11 23:45:25 emulator launching is slow Mar 11 23:45:38 it seems to need a lot of network :/ Mar 11 23:46:17 can someone help me please? https://gist.github.com/2018574 I get this error https://gist.github.com/2018586 Mar 11 23:47:25 QubeZ: please have a look at this when you are back -> https://gist.github.com/2018574 I get this error https://gist.github.com/2018586 Mar 11 23:47:57 does every single run launch a new emulator? Mar 11 23:48:16 hey, how do I share a Contract class for use with my ContentProvider to other applications that might consume my ContentProvider? Mar 11 23:49:51 Codhisattva, no. Mar 11 23:50:12 orospakr: hmmmI wonder what I'm doing wrong Mar 11 23:50:37 Codhisattva: go to AVD run your emulator then run your code Mar 11 23:50:45 Codhisattva: check Run configuration Mar 11 23:51:05 jon-: ironicly, it might be that very cpu spy program that is causing the cpu to remain in the lower power state instead of deep sleep Mar 11 23:51:36 that cpu spy program might be using an inefficient polling method to determine the cpu state every microsecond Mar 11 23:53:04 pragma_: i would hope someone wouldnt write that terrible of an app Mar 11 23:55:01 i imagine a significant portion of the apps are written by people who skipped the dev guide fundamentals and went straight to some obscure off-the-wall random ad-infested android blog to copy/paste code Mar 11 23:55:55 I think I should just wipe the phone. I wish google would back up text messages though >_< Mar 11 23:56:12 you can export them to your sdcard and then import them later Mar 11 23:56:40 pragma_: funny >_> Mar 11 23:56:43 there's got to be about a hundred apps that do that; the trick is finding the one that doesn't phone home somehow with your details Mar 11 23:56:49 (remember the g nexus has no sd card? :)) Mar 11 23:58:05 jon-: perhaps you can save your contacts to a file on the internal storage, then, and upload it to dropbox or something Mar 11 23:58:19 yeah, not having an sd card makes it a real pita Mar 11 23:58:53 er, text messages Mar 11 23:59:53 jon-: you might want to just go to the airport or something and steal a better phone :p Mar 12 00:01:00 perhaps a dance club might be an easier target Mar 12 00:01:38 probably Mar 12 00:01:41 or just a bar Mar 12 00:02:45 well, a dance club has patrons more likely to leave their phone with a drunken friend while they get up to go dance Mar 12 00:02:51 and we all know that friends don't watch your phones as well as you do Mar 12 00:02:56 especially while drunk Mar 12 00:04:07 Restaurant hostesses also tend to leave their phones on the podium at the door for some reason. Mar 12 00:04:09 yeah, most "normal" people don't follow security. Then you get the wonderful world of "frape" Mar 12 00:04:16 I could steal one at work, but I dno’t think that’d be good for my job Mar 12 00:04:31 people at work have to leave them outside of certain areas, easy stealing Mar 12 00:17:20 I can't call ---->getActivity().startActionMode(mContentSelectionActionModeCallback); <---> inside of my ----> public static class HistoryList extends ListFragment ---->because its static, how do I get around this? Mar 12 00:17:28 what up nerds Mar 12 00:17:43 is there another approach for passing a value to an activity instead of bundle extras? "bmi.putExtra("ca.nbcc.saintjohn.BmiActivity", this.backColour);" Mar 12 00:17:53 AbelianHorizon why is your ListFragment static? Mar 12 00:18:51 mindlogger shared preferences would be another way, but I think for passing things like color values, bundle is the way to go Mar 12 00:19:50 t0mless: idk, iwas under the impression it needed to be Mar 12 00:19:58 Negative. Mar 12 00:20:15 yeah Mar 12 00:21:31 okay yeah, when its not static, I get --- no empty constructor Mar 12 00:21:34 but there is one Mar 12 00:21:45 t0mless: is it the right way to set background colour? https://gist.github.com/2018586 I get this "java.lang.NullPointerException" for this line "current.setBackgroundColor(this.backColour);" Mar 12 00:21:58 am I supposed to be able to debug broadcast receivers? I set breakpoints and they just don't break Mar 12 00:22:08 but the code is obviously running Mar 12 00:22:26 you sure the debugger is attached? Mar 12 00:22:52 nope Mar 12 00:22:58 there's no startup activity Mar 12 00:23:17 mindlogger need more code than that... is that being called before your setContentView? That would make current be null Mar 12 00:23:39 I don't have a setCOntentView, there is no activity for this Mar 12 00:23:51 wabz hrm... you might be able to attach to the process manually Mar 12 00:24:00 not sure how in eclipse Mar 12 00:24:03 k Mar 12 00:24:08 t0mless: https://gist.github.com/2018574 Mar 12 00:24:09 wabz that was for mindlogger Mar 12 00:24:10 thanks, will have a look Mar 12 00:24:21 oh lol Mar 12 00:24:24 anywya yep Mar 12 00:24:46 t0mless: line 57 , setContentView is in onCreate, so no it's called after that Mar 12 00:24:48 oh duh, mindlogger you're not using find view by id right Mar 12 00:25:07 you need to pass an ID of the view you want to set, not a layout Mar 12 00:25:44 t0mless: View current = findViewById(R.layout.main); Mar 12 00:25:51 that's not an ID Mar 12 00:25:57 should be R.id.myviewsid Mar 12 00:25:58 does com.project.activity$innerClass mean that innerClass is static? Mar 12 00:26:13 t0mless: but there is no id in my r.java for that view ! Mar 12 00:26:17 let me check Mar 12 00:26:27 did you give it one in xml with android:id ? Mar 12 00:27:22 let me see Mar 12 00:27:35 t0mless: in which xml file? Manifest? Mar 12 00:27:42 your layout file... Mar 12 00:28:30 you're trying to find a view in your current layout with the id of R.layout.main which won't exist for a single view Mar 12 00:28:31 I have four layouts bmi.xml menu.xml main.xml mortgage.xml Mar 12 00:28:37 since that references a layout file Mar 12 00:28:46 right Mar 12 00:29:02 how can I get it without an id, b/c I can't find an id for that in R.java Mar 12 00:29:02 so that's why findViewById is returning null Mar 12 00:29:06 and thus current is null Mar 12 00:29:14 you need to give it an id Mar 12 00:29:31 or use getWindow().getDecorView() to get the root view Mar 12 00:29:32 hey I want to create a popup windows only in the first time the user installed the app, somethin like "Hello welcome, bla bla bla" how can I managed that is only gona see one time that popup? Mar 12 00:29:49 djx shared preferences Mar 12 00:30:06 cool Mar 12 00:30:07 store a value after it's been shown and check for that value on start Mar 12 00:30:15 if it's not there, show the popup Mar 12 00:30:40 other thing Mar 12 00:30:52 anyone used sqlcipher? Mar 12 00:31:00 t0mless: public HistoryList(){} is an empty constructor no? Mar 12 00:31:02 mindlogger if you're trying to set the background for your main.xml layout, you need to add an ID for that view in the xml Mar 12 00:31:19 AbelianHorizon I think you need a constructor that calls super Mar 12 00:32:15 t0mless: right, gonna try it Mar 12 00:32:19 t0mless: same no empty constructor error Mar 12 00:32:52 http://developer.android.com/guide/topics/ui/declaring-layout.html#id Mar 12 00:33:04 what does the error say exactly AbelianHorizon Mar 12 00:33:44 can't instantiate class blah.blah$HistoryList; no empty constructor Mar 12 00:34:19 AbelianHorizon: put an empty constructor in it, then Mar 12 00:34:43 t0mless: public HistoryList(){} is an empty constructor no? Mar 12 00:35:14 "All subclasses of Fragment must include a public empty constructor. The framework will often re-instantiate a fragment class when needed, in particular during state restore, and needs to be able to find this constructor to instantiate it. If the empty constructor is not available, a runtime exception will occur in some cases during state restore." Mar 12 00:36:18 t0mless: should I add an id for ? Mar 12 00:38:13 only if you need to reference the linearlayout from code. Mar 12 00:38:24 He's trying to set the BG color in code Mar 12 00:38:25 so yea Mar 12 00:38:26 you should Mar 12 00:39:49 t0mless: make sure class name exists, is public, and has an empty constructor that is public Mar 12 00:40:07 but it works before removing static from signature Mar 12 00:40:24 so leave it static Mar 12 00:40:40 I've never made them static and they seem to work Mar 12 00:40:48 but then I can't use ActionMode Mar 12 00:40:50 but maybe I'm doing it wrong >.> Mar 12 00:41:28 I'm sure that I'm the one with the incorrect code Mar 12 00:41:39 I also don't use fragments as inner classes Mar 12 00:42:15 why won't it let you call getActivity() from your fragment? Mar 12 00:42:35 why don't you show us some code -_- Mar 12 00:43:21 Must, must keep top secret hello world code to myself. Mar 12 00:43:37 here's my entire HomeScreenActivity.java http://pastebin.com/MpQPiWtE i dont care Mar 12 00:44:52 HistoryList at the bottom, startActionMode at line 260 Mar 12 00:46:23 o.O Mar 12 00:46:58 Today I learned what witches's broomsticks really were back then: http://imgbin.org/images/7105.png Mar 12 00:47:42 O_O Mar 12 00:47:58 LOL Mar 12 00:48:01 harry potter... Mar 12 00:48:03 ohmy. Mar 12 00:49:02 wow pragma_ Mar 12 00:54:53 t0mless, any thoughts? Mar 12 01:00:38 pragma_: that might not actually be true -- too little evidence for it. Mar 12 01:02:31 i choose to believe it is true. doing so has made my world a better place. Mar 12 01:02:58 its definitely true Mar 12 01:04:28 anyone in here mess with cocos2d-x much? Mar 12 01:06:37 I personally suspect that claims like that belong to the typical fear of the mother and its personifications that you see throughout the history. As far as anyone is able to tell now, the whole witch business was just another case of irrationality on large scale, so I place little value on whatever evidence you find from that period regarding subject society was not OK with to begin with. Mar 12 01:08:15 #offtopic Mar 12 01:09:36 fair enough. Mar 12 01:32:06 man, the system just stopped notifying my app of Mar 12 01:32:10 just don't get them anymore Mar 12 01:35:41 lol Mar 12 01:35:48 wabz thats wak Mar 12 01:36:11 yeah either that or the Log.e's aren't showing up Mar 12 01:36:23 I love it how so many subsystems use log.e for informational things Mar 12 01:36:33 probably just so they were easy to spot during development Mar 12 01:39:47 lol Mar 12 01:39:49 probably Mar 12 02:03:24 weird... some apps show numbers like "10 7 3" where there should be a date or a "2 days ago" or something. Mar 12 02:03:40 anyone know what's up with that? Mar 12 02:08:51 Lets say I have a StringBuilder buffer; Is this legal or is this undefined: buffer.replace(0, buffer.length(), buffer.substring(buffer_pos, buffer.length())); -- where buffer_pos > 0 and buffer_pos < buffer.length() Mar 12 02:11:28 does a get registered when the application is installed? Mar 12 02:12:36 pragma_: you wanna replace the buffer contents with a substring of the buffer itself Mar 12 02:12:45 ? Mar 12 02:13:19 tnelsond Mar 12 02:13:27 AbelianHorizon: yes? Mar 12 02:13:38 do you have any thoughts on that code? Mar 12 02:13:57 I didn't look. Mar 12 02:14:05 DallaRosa: yeah Mar 12 02:14:05 for sure Mar 12 02:14:16 buffer.delete(0, buffer_pos - 1), does the same thing? Mar 12 02:14:26 is there a better way, or a better class for this? Mar 12 02:14:30 a buffer class? Mar 12 02:14:33 StringBuffer Mar 12 02:16:03 pragma_: yes, it supposedly has the same effect Mar 12 02:16:45 should you use StringBuffer instead? the docs say: "This class is intended as a direct replacement of StringBuffer for non-concurrent use" Mar 12 02:18:09 It's a singleton Mar 12 02:36:54 Hey all Mar 12 02:37:02 Can anybody help me real quick please Mar 12 02:37:21 When in AVD manager it doesnt allow me to select a target device, the area is greyed out Mar 12 02:39:15 nvm got it Mar 12 02:55:19 JakeWharton! did you fix abs yet? :) Mar 12 02:55:22 s/abs/aosp/ **** ENDING LOGGING AT Mon Mar 12 02:59:58 2012