**** BEGIN LOGGING AT Sat Mar 16 02:59:58 2013 Mar 16 03:14:38 argh how do you load a preferencefragment to replace the one you already have Mar 16 03:16:23 so I've imported a hello world app for NFC that writes a string to an NFC tag and in the first few lines it has @SuppressLint . what is that and if i remove it will it break everything? Mar 16 03:16:49 it suppresses warnings from lint Mar 16 03:16:54 removing it will, at most, give you a lint warning Mar 16 03:16:55 :P Mar 16 03:17:14 canadiancow: what's a lint warning? so it will break the app and not let it function? Mar 16 03:17:28 it's like a compiler warning Mar 16 03:17:30 but it comes from lint Mar 16 03:17:38 what is lint :P Mar 16 03:17:54 google it :P Mar 16 03:17:55 lolol Mar 16 03:17:56 static analysis Mar 16 03:18:21 i've googled it and it makes no sense to me Mar 16 03:18:32 it's like findbugs but for Android's ridiculous APIs Mar 16 03:18:59 I see, but isn't eclipse meant to findbugs anyway Mar 16 03:19:08 no, eclipse is makebugs Mar 16 03:19:29 okay, so if I remove that thing I won't be able to run it? Mar 16 03:19:33 Aaaaand he's gone Mar 16 03:19:40 canadiancow: so can i remove that thing? Mar 16 03:22:09 coco89, lint shows some things that won't break a compile. Like a declared integer that is never used. Mar 16 03:22:57 that *wont break a compile? Mar 16 03:23:44 Won't Mar 16 03:23:46 It just hides warnings. Warnings don't break a compile. Mar 16 03:24:04 There are Lint Error, but then you can still clear all lint errors and compile. Mar 16 03:24:49 But probably shouldn't. Mar 16 03:24:53 I see Mar 16 03:25:00 hmm I think I understand Mar 16 03:25:05 It's not good to have things like unused declared integers in code. A good lint will show such things. But code will compile and run OK with such things. Mar 16 03:25:05 why dont you just try it? Mar 16 03:25:13 Ologn, agreed Mar 16 03:25:16 i dont like suppressions Mar 16 03:25:28 ohh Mar 16 03:25:30 so like Mar 16 03:25:39 the yellow triangle exclamation mark thing? Mar 16 03:25:51 Those are warnings. Yes. Mar 16 03:25:54 coco89, yes, in that ballpark Mar 16 03:26:02 so those are lints? Mar 16 03:26:02 zomg Mar 16 03:26:05 ~_~ Mar 16 03:26:12 lool Mar 16 03:26:13 if you're trolling, please stop Mar 16 03:26:22 i'm not Mar 16 03:26:32 i should've called them warnings my bad Mar 16 03:27:51 thanks thuogh guys Mar 16 03:28:12 off to bed, it's 3.30 Mar 16 03:28:18 night Mar 16 03:42:47 I'm creating an intent with ACTION_IMAGE_CAPTURE and adding the EXTRA_OUTPUT, the camera activity writes the file i specify - but it's resolution is garbage (it's a thumbnail) - is there a good cross-device compatible way to overcome this? Mar 16 05:49:19 re Mar 16 05:49:40 Any recommended 3rd party widgets? I found a few just trying to see if there are any good widgets out there Mar 16 05:49:57 hey guys, I'm adding a Fragement with a FragmentTransaction but I can't figure out how to hide it on a tap/click -- ideas? Mar 16 06:36:51 hey, is there a simple way to lighten a color a color using the android API? from strong red (#ff0000) to a ligther version? Mar 16 06:38:14 use math Mar 16 06:38:33 int red = 0xFF0000 & color; Mar 16 06:38:43 er Mar 16 06:39:21 int red = (0xFF0000 & color) >> 16 Mar 16 06:39:56 int lighterRed = (int)(red * 0.8f); Mar 16 06:40:16 int lighterRedColor = (lighterRed << 16) | (0xFFFF & color); Mar 16 06:40:51 and now you should have a color with 20% lighter red value Mar 16 06:41:07 there's also Color.red(0xFF0000) to get the ff part only, and Color.rgb(red, green, blue) to create a color int from components Mar 16 06:41:50 that too Mar 16 06:42:18 thanks Mar 16 07:23:53 hi all, does anyone know why my DatagramSocket keeps returning the same data I just sent when I call receive() Mar 16 07:27:09 hi. how can I add my website in the strings resources to be clickable? Mar 16 07:35:26 superlinux-hp: I don't think that has do to with the string Mar 16 07:35:44 rather, I think you have to make sure the textview it is in makes things linkable Mar 16 07:36:06 JesusFreke, i have just read it thanks Mar 16 07:36:22 or manually Linkify it, I guess Mar 16 07:36:52 i want it for my application About menu item Mar 16 07:37:25 gtg thanks anyways Mar 16 07:37:32 If it's a menu item, just handle the menu item event, by starting an intent to go to that url Mar 16 07:41:48 I left my expansion file on 'Processing' last night and it still seems to be stuck there any ideas on what could be causing this not to upload? Mar 16 07:47:22 Its had over 6 hours so far Mar 16 07:49:23 anyone have an idea of why my datagram socket seems to receive only previously sent data? ie. I send "HELLO", then I want to wait for a response, so I call .receive(), but the data returned is still "HELLO" Mar 16 08:27:52 i have downloaded the opengl sample from google site, I changed the AndroidManifest.xml and the proper files to have my own package and class names, the project imports correctly but doesn't add the library dependencies like Android 4.0 to the project, how can i force this from the manifest or probably another file Mar 16 09:13:34 when i update my appwidget programmatically, the content in the widget is replaced by content from a different app for a second or two before my content is loaded, any ideas? Mar 16 09:40:43 hello laidies Mar 16 09:41:12 so I'm 3 weeks into android programming.. and I still suck at it.. so lets all keep that in mind when I ask questions Mar 16 09:42:12 I'm doing a small app.. as of right now I have an actionbar, in my mainactivity, the actionbar has 5 pictures Mar 16 09:42:37 now when I click on one, it starts a suited activity. and in that new activity I have the exact same actionbar, with all the 5 logos, and 5 onClick methods Mar 16 09:42:48 that is of course, idiotic.. I want to keep that actionbar static Mar 16 09:43:31 but I'm unsure what the best approach is?.. should I keep my actionbar as one activity, and then keep what they contain in fragments Mar 16 09:43:41 or should the actionbar be a fragment? .. Mar 16 09:47:16 P3nnyw1se: cl s Mar 16 09:47:19 oops Mar 16 09:47:33 P3nnyw1se: concidered a viewPager ? Mar 16 09:47:42 considered* Mar 16 09:47:52 * StingRay_ is just waking up and cant type Mar 16 09:50:10 well I'm not sure how that would work honestly.. imagine that these 5 'sites' that the actionbar can switch inbetween Mar 16 09:50:28 at least some of them have extensive coding and functionality Mar 16 09:50:35 like listing items.. booking them, creating e-mails Mar 16 09:51:08 I was thinking that the actionbar would stay as an activity you never left.. and then have fragments swap Mar 16 09:51:32 but being new to this, I dont know if there are any side effects into using fragments.. to contain that much Mar 16 09:51:34 and not activities Mar 16 09:51:46 P3nnyw1se: nothing wrong with that Mar 16 09:52:31 so there aren't any limitations behind fragments vs. activities? Mar 16 09:53:07 like e.g. savedInstances and stuff like that I can do in activities Mar 16 09:53:11 that applies to fragments aswell ? Mar 16 09:53:18 yes Mar 16 09:53:34 Can I change the path to a library in eclipse? I want to move it to a different folder on my HDD Mar 16 09:54:07 Quacked: yeah, but it WOULD have to be listed in the build path in project config I think Mar 16 09:54:38 hmm Mar 16 09:54:43 maybe better to delete it and re-import Mar 16 09:54:48 Stingray thats nice.. I was afraid that I might be halfthrough and then go 'shit you can't do this with fragments' Mar 16 09:56:06 P3nnyw1se: tbh I dont do that globally in my app, if I have a fragement that controls something that is not going to alter with something like screen rotate or keyboard appearance I use setRetainInstance(true) Mar 16 09:56:38 somethings that I have to track/alter then I bundle them and save / restore Mar 16 09:56:39 alright so its uncommon practice what I'm about to do? Mar 16 09:57:22 P3nnyw1se: just saying that setRetainInstance with keep mVars that are init in onCreate Mar 16 09:57:31 across config changes Mar 16 09:57:38 if i remember correct Mar 16 09:57:40 I'm unsure how else to do it.. I have this actionbar that I want to occupy like 1/10th of the screen no matter where the user is Mar 16 09:58:12 P3nnyw1se: I just outlined an option, I did not say that what you want to do is wrong Mar 16 09:58:17 what you want to do is fine Mar 16 09:58:30 just saying there is a flag that does that for you if it suites Mar 16 09:59:06 mmmmmm Mar 16 09:59:13 its early in the morning :P Mar 16 09:59:17 same Mar 16 09:59:24 been up 20 min Mar 16 09:59:27 need more coffee Mar 16 09:59:48 so let me get this ABC.. you are telling me there is a common solution to keeping something static like an actionbar ? Mar 16 09:59:52 I would assume many apps have one Mar 16 10:00:18 I never/dont use actionbar Mar 16 10:00:32 I use my own menu/title system Mar 16 10:00:56 but if you have 1 activity Mar 16 10:01:04 how can the action bar not be static ? Mar 16 10:01:11 there is just one of it ever Mar 16 10:03:18 yeah I'm just you know.. trying to find out if there was something like Mar 16 10:03:24 'if you are doing an actionbar.. you should always do this' Mar 16 10:06:49 whats a tabactivity Mar 16 10:06:49 hmmm Mar 16 10:09:36 oh thats the pre-fragment Mar 16 10:14:13 viewPager and indicator are kinda replacements to that I think Mar 16 10:17:57 actionbar things are gone at the activity level no? so nothing to do with fragments Mar 16 10:18:29 or are you still just wondering how the design/implementation of your entire app is gonna work ? Mar 16 10:26:21 Does any one know a possible reason for runOnUiThread to run multiple times? (example: message listener for XMPP, runnable() runns adapter.add(x) several times, causing same items to appear on the list view) Mar 16 10:26:31 Stingray kinda Mar 16 10:26:54 I was told at my school that 1 hour of design can save you potentially 8 hours of programming.. as a thumb rule Mar 16 10:27:10 I'm still not sure keeping the actionbar as an activity and everythign else in fragments is the right choice Mar 16 10:27:15 but its the only one I can wrap my head around Mar 16 10:27:38 fragments are in and activity Mar 16 10:28:07 or if your using support lib in a fragmentActivity Mar 16 10:28:08 yeah I know Mar 16 10:28:21 but the way this is planned out then Mar 16 10:28:30 it would mean that everything would be one activity Mar 16 10:28:35 how else would you use the action bar ? Mar 16 10:28:39 that handles a bunch of ragments Mar 16 10:28:40 so... no guesses on why code inside the runOnUiThread may get executed multiple times? Mar 16 10:29:08 alright so StingRay riddle me this :P.. Mar 16 10:29:09 Boris______: does it get exectued many times ? you gone through debugger ? Mar 16 10:30:04 lets now assume that my actionbar is an activity.. how do I construct the rest of the window into fragments Mar 16 10:30:10 StingRay_: gimme a second there, thanks for the tip Mar 16 10:30:10 do I make a viewgroup and load in another xml to that Mar 16 10:30:13 sorry if it sounds confusing Mar 16 10:30:34 P3nnyw1se: action bar is not an activity Mar 16 10:30:48 actionBar is used as a widget as an activity level Mar 16 10:30:53 just like a fragment is Mar 16 10:31:32 and I think if you want to be dynamic with fragments you dont do them in xml Mar 16 10:31:33 What I mean is, I've only tried swapping between fragments and activities with each their own xml.. Mar 16 10:31:42 fullview to fullview Mar 16 10:32:08 how do I have half a window be one xml file.. and the other half be another Mar 16 10:32:57 erm, with a layout of 2 viewGroup types Mar 16 10:33:05 or 3 rather Mar 16 10:33:17 parent + left + right Mar 16 10:33:25 and setCOntent Mar 16 10:33:29 just like any activity Mar 16 10:34:39 hey StingRay_ & capella Mar 16 10:34:51 morning Mar 16 10:34:52 morning! Mar 16 10:35:01 morning :) Mar 16 10:35:13 g00s: you lie Mar 16 10:35:29 is it not evening there ? Mar 16 10:35:31 or night ? Mar 16 10:35:34 I know it seems easy.. but fact is I've only tried swapping between fullview to fullview Mar 16 10:35:36 3:35 am :) Mar 16 10:35:36 but seems doable Mar 16 10:36:27 P3nnyw1se: I would say a little more than doable, its more "the way it was intended" Mar 16 10:36:53 doable as in.. I can do it :P Mar 16 10:37:23 dang I hate my reviewers who make me explain every single line of code Mar 16 10:37:49 how dare they Mar 16 10:38:18 capella: what app ? Mar 16 10:38:27 the rape app Mar 16 10:38:30 it searches for good spots Mar 16 10:38:35 and drunk women Mar 16 10:38:49 alright maybe thats a bit too aggressive this early that joke Mar 16 10:38:54 the guy wrote the routine (wrong) and I have to explain a) why its wrong and b) why my fix works Mar 16 10:39:28 on my 2nd semester of java.. I wrote a 'gunList' which was actually a circle array.. Mar 16 10:39:30 :P oh well - but I wish 'try it and see' was enough Mar 16 10:39:51 capella: after google killed reader (probably to shift people into G+) i realized how important it is to use and support the open wen; apps like Firefox and standards like RSS Mar 16 10:40:08 *open web Mar 16 10:40:18 yah - we have our good side Mar 16 10:40:49 StingRay_: I remembered why I didn't do it, the Thread is executed in the packet listener function, which runs on a background. Problem is that function itself is executed once, while the code in runnable is executed multiple times. Mar 16 10:41:31 to be fair, my reviewer is awesome ... so we're both surprised to find holes in his stuff :D Mar 16 10:46:04 g00s yah readers absence is getting noticed ... though for some reason I thought you were a googler Mar 16 10:47:07 i think its a good thing; with Reader - all the other RSS apps languished. now they have to innovate again Mar 16 10:47:10 @capella write a unit test then just say 'look at the test' Mar 16 10:47:58 well I always provide the steps to reproduce ... but a lot of things are caused by regressions from unrelated patches Mar 16 10:49:45 capella: are you guys porting FF to Tizen ? Mar 16 10:49:50 and being a long term unpaid contributor, the more experienced moz emps sometimes sideline my stuff Mar 16 10:50:02 :( Mar 16 10:50:08 who here has the patience to go through some basic stuff with me in msg.. I expect it to take 6-7 minutse before I get it Mar 16 10:52:58 I've heard pretty much zero about Tizen Mar 16 10:58:44 hey being all new to this android thing.. I dont get how I get to divide myscreen into 2 fragments .. like I have my setContentView(R.layout.activity_main); that populates my contentView with an xml file Mar 16 10:59:01 so how do I take another xml file and populate the other half of the screen Mar 16 11:00:00 P3nnyw1se: i think you should go through the training on fragments Mar 16 11:00:35 http://developer.android.com/training/basics/fragments/index.html Mar 16 11:00:50 alright Mar 16 11:00:51 Firefox will stay with Fennec under Android, and for alternate OS use our new B2G Mar 16 11:01:21 (Boot to Gecko / Firefox OS) Mar 16 11:06:57 hey Stingray I know I'm inpatient but reading through the guides so let me get this straight Mar 16 11:07:17 I create a view in the MainActivity and then populate that view with my Fragment? Mar 16 11:07:19 e.g. Mar 16 11:07:31 just to know if I'm on the right course here Mar 16 11:07:45 well yes, it explains it all in that link Mar 16 11:07:53 and there are excersises and samples Mar 16 11:08:20 exercises lol.. where would the military be if they ever exercised Mar 16 11:10:43 How can I go to the end of a list if I only have an external keyboard? Mar 16 11:10:53 (scrolldown list) Mar 16 11:11:00 like in Settings-app Mar 16 11:17:19 spobat: ? Mar 16 11:17:33 the cursor keys ? Mar 16 11:17:48 ? Mar 16 11:17:57 as in the down arrow Mar 16 11:21:17 unless you have some constraining factors on the focus/touch of items then dont see why that would be a problem Mar 16 11:31:02 Stingray it says Mar 16 11:31:03 "If your activity allows the fragments to be removed and replaced, you should add the initial fragment(s) to the activity during the activity's onCreate() method." Mar 16 11:31:21 does that mean I should Instantiate all the fragments i plan to use right away Mar 16 11:31:22 ? Mar 16 11:47:30 I made it work :D Mar 16 11:48:18 I created a viewgroup in my activity xml..and using fragment manager.. I swap fragments around in that view when buttons are clicked Mar 16 11:48:26 keeping the activity and as such my actionbar always at teh same Mar 16 11:51:33 * P3nnyw1se is padding his own back then Mar 16 11:52:04 oh, well done P3 Mar 16 11:53:05 yeah, propper padding is important... Mar 16 11:54:09 P3nnyw1se: in answer to your prev. question… no Mar 16 11:54:21 it just means do that way rather than xml calls Mar 16 11:54:37 code rather than xml def. of fragments Mar 16 11:58:24 as it looks right now.. I have an activity with 5 different onClick methods.. for 5 different buttons Mar 16 11:58:38 and inside each button it adds a fragment and commits it to a view designed for it Mar 16 11:58:45 in the mainactivity layout Mar 16 11:58:53 hmmm writing that makes me thing Mar 16 11:58:55 think Mar 16 11:59:29 couldn't I just call all my buttons with an onClick method? same name Mar 16 11:59:32 and then ask by .getID Mar 16 11:59:36 which button was hit? Mar 16 11:59:42 so I dont need 5 different methods for 5 buttons Mar 16 12:00:04 maybe do it in a switch statement Mar 16 12:01:14 alright gonna shorten that question up Mar 16 12:01:56 isn't it possible to have 5 buttons with 5 onClick, all 5 called "hello" .. in my java file I just do a hello(); and then ask by ID which of the 5 buttons were hit Mar 16 12:02:01 that way avoiding to have 5 different methods Mar 16 12:02:21 I dont need an answer.. that has to be possible Mar 16 12:02:21 brb Mar 16 12:03:12 hey, if i draw something on canvas, with bounds that are beyond the screen does that consume CPU power? for example if the screen is 400x200 and i draw a line from (0,0) to (10000,10000) Mar 16 12:03:13 P3nnyw1se: one onClick with switch for getId() Mar 16 12:03:41 viran: no and it's easy to test Mar 16 12:04:01 * P3nnyw1se slaps StingRay_ around a bit with a large trout Mar 16 12:04:03 thank you :P Mar 16 12:05:58 Xabster: thanks Mar 16 12:12:57 Xabster are you following me on irC! Mar 16 12:13:13 yes Mar 16 12:14:25 I knew it Mar 16 12:14:30 I'm flattered but I'm gay Mar 16 12:14:32 and you are a girl Mar 16 12:14:34 be back later Mar 16 12:30:54 hey guys Mar 16 12:31:15 I have a static class with a method in it that I run a few hundred times Mar 16 12:31:55 does turning that class into an instance class and keeping an instance of it so I can reuse my stack objects in the method speed stuff up? Mar 16 12:32:05 or does the optimizer already iron all that out? Mar 16 12:39:33 Hello. I have a scrollview and I have a LinearLayout (vertical) inside scrollview. I dynamically add ImageViews into LinearLayout. It adds well but there is a empty space gap between ImageViews. So it shows an empty space before ImageView and after ImageView. How can I solve it? Mar 16 12:41:58 musaulker: depends whats the cause Mar 16 12:42:06 not using wrap_content Mar 16 12:42:29 maintaining aspect of an image within the bounds where the images leaves the space in the imageview Mar 16 12:42:34 etc Mar 16 12:43:10 I would test it myself and find out, but I'm not sure how to do it? Mar 16 12:49:19 hi guys, how can i put the camera view into my activity? Mar 16 12:49:49 i want the camera to be shown in my activity and work with it... im freakin beginner but fast learning :D Mar 16 12:58:43 norbi: you been though the tutorials ? Mar 16 12:58:57 cause I dont think anyone will answer your question Mar 16 13:02:50 Something is fucked with my Debug.InstructionCount class Mar 16 13:03:09 collect returns false Mar 16 13:03:29 and when it doesn't I get an instruction count of 0 Mar 16 13:03:31 any ideas? Mar 16 13:09:29 :( Mar 16 13:10:01 I asked my teacher if I should do 5 buttons with 5 seperate onclick methods or have a switch statement with 5 possibilites Mar 16 13:10:11 he told me.. and I quote "sometimes you do the one thing, sometimes the other" Mar 16 13:10:14 how is that a help to me Mar 16 13:11:33 P3nnyw1se: then choose the easiest for this task Mar 16 13:11:35 :) Mar 16 13:11:42 is this homework your doing ? Mar 16 13:13:03 I will choose what I consider the best.. the switch statement.. Mar 16 13:13:07 its is homework.. but.. Mar 16 13:13:19 P3nnyw1se: he's right... Mar 16 13:13:23 He's right tho Mar 16 13:13:34 I usually use switch if I have a bunch of buttons that do similar things Mar 16 13:13:40 Like a tab bar Mar 16 13:13:49 If they're completely unrelated, they each get their own Mar 16 13:13:49 I know that different situations apply to different things. Mar 16 13:13:53 but when I'm in a learning situation Mar 16 13:14:01 he can't just tell me each time 'you can go right or left' Mar 16 13:14:06 he should tell me 'in this case I would go right' Mar 16 13:14:18 nah Mar 16 13:14:38 he should explain the advantages and disadvantages if you don't understand them Mar 16 13:15:00 I dont see a difference at all on the switch statement or their own methods Mar 16 13:15:07 seems to me you can do everything inside a switch case as you can Mar 16 13:15:08 shared code Mar 16 13:15:09 in a method Mar 16 13:15:24 There is no difference Mar 16 13:15:29 It's all about making readable code Mar 16 13:15:31 so its purely overview Mar 16 13:15:31 if the buttons do different things, the code's cleaner with separate methods Mar 16 13:15:32 k Mar 16 13:15:53 from a functionality standpoint, yeah, there's no difference Mar 16 13:15:53 I'm 4 days into planning an app and 3 weeks into android teaching Mar 16 13:16:00 and in 3 months I'm turning over a working app to a real company Mar 16 13:16:34 I've done java projects.. so I know Mar 16 13:16:43 you make 'silly' mistakes early on.. you pay for it later Mar 16 13:16:48 thats why I'm a bit anal about these things Mar 16 13:18:27 sorry but you make me laugh Mar 16 13:18:46 alright Mar 16 13:20:09 apology accepted then Mar 16 13:30:48 SimonVT: But with adding the OnClickListeners on each button seperately, you'll get so much cruft. 5 lines of boilerplate code :\ Mar 16 13:30:57 Even if IDEs like IntelliJ thankfully hide it away. Mar 16 13:33:18 I´m still not quite sure what the best trade-off is, having all your methods in the activity or writing a lot of boilerplate code Mar 16 13:33:30 for button functions Mar 16 13:37:32 Hello, i am having an issue passing an objext from Activity1 to Activity2...it's very strange and i don't understand why this happen. The relevant code is here http://pastebin.com/8Nf3wU5S If it's not enought for understand the scenario i'll paste more. Thank you Mar 16 13:38:38 You can't pass views between activities Mar 16 13:40:01 but why a part of method return the right value and other doesn't? Mar 16 13:40:24 you can pass RemoteViews between them Mar 16 13:40:56 if i remove the call to pp.getListOfComments() it works Mar 16 13:41:25 uragano2: presumably, whatever type you're using for getListOfComments can't be Parceled Mar 16 13:42:30 it's an ArrayList(customObject> Mar 16 13:44:18 sorry, it's an ArrayList, sorry but in my mind if i pass an object there isn't a reason why i can't access only to a part of it's variables Mar 16 13:48:31 It's a parcelable, you're responsible for retaining and restore its variables Mar 16 13:49:01 uragano2: you can't pass a non-parcelable object inside a parcel. Mar 16 13:49:09 uragano2: either make it parcelable, or use something that is. Mar 16 13:52:10 post it's parcelable Mar 16 13:53:32 and i suppose that i can pass an object parcelable that contains non parcelable objects as ArrayList in this case Mar 16 13:54:26 you can't pass anything in a Parcel that isn't parcelable Mar 16 13:54:45 Parcels can't contain anything that isn't parcelable either Mar 16 13:54:58 your options are to make it parcelable, or to use something that is already parcelable instead Mar 16 14:05:30 mhhh...it's never a good idea choose to coding instead of sleep....i forgot to pass it in parcel constructor, now the error is "Parcel: unable to marshal value com.util.Comment". I suppose that is the scenario that we were speaking about Mar 16 14:07:39 [15:05] mhhh...it's never a good idea choose to coding instead of sleep. Mar 16 14:07:45 thats like saying dont have sex with drunk girls Mar 16 14:08:52 Any ideas on why whenever I upload an expansion file the window eventually freezes on 'Processing' Mar 16 14:09:14 No errors so I can't figure out where to start Mar 16 14:09:28 I just tried again with a blank new project but got the same result Mar 16 14:10:04 where do you upload too ? Mar 16 14:10:10 and how big a file Mar 16 14:10:47 Google Play, the expansion file is 75mb Mar 16 14:10:54 The apk uploads just fine Mar 16 14:12:51 I left it on over night as a test so it had a good 6 hours to 'process' Mar 16 14:13:27 does it error out or just stalls ? Mar 16 14:13:47 how does it terminate Mar 16 14:13:47 Just stalls which makes it really tough to find the cause Mar 16 14:14:03 halway through or possibly right away? Mar 16 14:15:25 it seems to upload to 100% and just says 'processing' but I'm not sure if the problem is right away or not Mar 16 14:16:16 The 'save' and 'cancel' buttons are greyed out so my only option it to keep closing the window Mar 16 14:16:27 depends how much they are drunk and if they are enough lightweight to be drag Mar 16 14:18:10 is the solution of my problem create an object that extends ArrayList and implements Parcelable? Mar 16 14:18:34 * P3nnyw1se slaps apple741 around a bit with a large trout Mar 16 14:18:50 the fact you reach 100% and it stalls there.. seems to me to be some authentication problem Mar 16 14:19:04 like it won't allow your files or your user or wahtever Mar 16 14:21:24 P3nnyw1se: I see, so my actual apk must be properly signed just not the expansion file itself? Mar 16 14:22:18 I'm trying to animate listview items when a button is clicked in the contexual action bar, however the only way to get the row view (that i know of) is to call listview.getChildAt(x). but this only returns child views visible on screen. how would you guys suggest I handle a situation where an item off screen needs to be animated? Mar 16 14:23:29 what would be the point of animating something when no1 can see it ? Mar 16 14:23:31 If it's off screen, you don't need to animate it Mar 16 14:25:54 yeah, that just hit me. Mar 16 14:26:29 * pragma- pats alexfu on the head. Mar 16 14:26:42 * pragma- sends a memo to HR to fire alexfu at first opportunity. Mar 16 14:27:26 or only class Comment must be Parcelable? Mar 16 14:38:54 hi guys, i'm having trouble understanding the concept of contexts Mar 16 14:39:05 could someone please clarify ? Mar 16 14:41:09 if you have a concrete question Mar 16 14:41:26 what is context Mar 16 14:41:53 it's generally the thing that is holding your thing Mar 16 14:42:05 a context can be different things. Its what the same describes: a context in which seomthing is executed. e.g. an activity is a context Mar 16 14:42:09 an application, a service, etc. Mar 16 14:42:39 practically: it's what gives you access to resources and preferences Mar 16 14:43:19 e.g. you started an activity, then you have the application context for everything of you application that is currently running, and the activity context for your current activity. If you now change the activity in your app, the activity context will change, but not the application context Mar 16 14:44:04 and as osxorgate just said, it is an android class, that gives you access to the android stuff like resources, starting new serices or activities, etc. Mar 16 14:44:11 ok, now the object Comment implements parcelable, but it doesn't work yet. The error now is NullPointerException. During the activity switch it calls writeToParcel(..) but it never calls the constructor. Is this why i must create an object tha extends arraylist and implements parcelable that contains Comment objects? Mar 16 14:44:55 Hmm I see Mar 16 14:45:24 dont worry too much about context Mar 16 14:45:27 yet :) Mar 16 14:45:40 just say the magic 'this' and you're all set Mar 16 14:46:41 osxorgate: I want to forget about it but I'm doing an NFC app and it involves contexts :P Mar 16 14:46:51 but I think I get the jist of it, I'll read up more Mar 16 14:47:04 and hopefully have a more specific question Mar 16 14:48:08 sure Mar 16 14:48:22 thanks guys :) Mar 16 14:56:11 how can I get the id on a view in a onClick Mar 16 14:56:18 I mean onClick(View view) Mar 16 14:56:29 there is the view.getID(); but thats an int Mar 16 14:56:32 view.getId() Mar 16 14:56:34 I'm looking for the name I assigned it Mar 16 14:56:44 name ? Mar 16 14:57:05 android:id="@+id/requestBasket" Mar 16 14:57:08 R.id.myButton = int reference Mar 16 14:57:40 you could also findViewById in oncreate and in onClick() do if (view == mMyView) {} Mar 16 14:57:58 if(view.getId() == R.id.requestBasket){yey;} Mar 16 14:58:18 .... Mar 16 14:58:26 do I really have to do that? I can't ask what 'name' the button has? Mar 16 14:58:30 P3nnyw1se: you resouce names are ints Mar 16 14:58:34 fuck me Mar 16 14:58:36 P3nnyw1se: realize that @+id/requestBasket just generates an int Mar 16 14:58:50 look at R.java Mar 16 14:58:57 I dont wanna do a billion if/else statements Mar 16 14:58:59 hmmmm Mar 16 14:59:06 what? Mar 16 14:59:31 * StingRay_ leaves the conversation Mar 16 14:59:36 so if I name it Mar 16 14:59:36 I guess you want to compose the button name dynamically? Mar 16 14:59:37 * StingRay_ :) Mar 16 14:59:42 id/1 Mar 16 14:59:43 yes Mar 16 14:59:45 P3nnyw1se: just have an array or a switch statement, thats the reason why they are int's; so you dont have a billion if/else statements Mar 16 14:59:46 don´t :P Mar 16 14:59:58 I do have a switchz statement Napalm Mar 16 15:00:03 then when I click the button Mar 16 15:00:06 Why do we have two different target? In project.properties and in AndroidManifest.xml ? Are both are used for different reasons? Mar 16 15:00:08 I get a generated int Mar 16 15:00:18 P3nnyw1se: you can do thjat Mar 16 15:00:31 and then I just have to 'know' what each generated int refers too ? Mar 16 15:00:34 and hardcode it? Mar 16 15:00:36 seems.. wrong Mar 16 15:00:52 View.generateViewId() Mar 16 15:01:17 if the view.getID(); on '@id/requestBasket' Mar 16 15:01:20 e.g. is 54 Mar 16 15:01:22 how can i set an adapter for this object in a class that extends listfragment? HorizontalListView listview = (HorizontalListView) findViewById(R.id.listview); Mar 16 15:01:25 I would do case 54 = something Mar 16 15:01:27 ofc Mar 16 15:01:32 but that seems wrong to me Mar 16 15:01:58 cause I tell my case something specific based on something autogenerated Mar 16 15:02:26 P3nnyw1se: you pass in the it parameter, its not fixed Mar 16 15:02:31 *id Mar 16 15:02:40 its not fixed okay Mar 16 15:02:47 but doesn't that mean then Mar 16 15:02:59 I would have to ask.. 'is it this button? no.,. ok this button? no.. ok this button? Mar 16 15:03:22 thats what a switch is for Mar 16 15:03:24 what? Mar 16 15:03:30 case a,b,c,d,e Mar 16 15:03:37 explain what you are doing Mar 16 15:03:44 but if its a newly autogenerated ID Stingray Mar 16 15:03:47 how am I suppose to make cases Mar 16 15:03:54 Napalm just said it wasn't fixed Mar 16 15:03:56 case R.id.mybasket Mar 16 15:04:02 so it is fixe Mar 16 15:04:05 points to the same thing Mar 16 15:04:11 d Mar 16 15:04:11 as case view.getId() Mar 16 15:04:19 both ints Mar 16 15:04:22 view.getId() = R.id.mybasket Mar 16 15:04:24 got it Mar 16 15:04:27 Hi. I use ActionBarSherlock. On 2.2, my options menu is bright although I use Theme.Sherlock (not .Light). I add the normal dark theme icons, so it currently looks really bad in the options menu. Can I check which color the options menu has or can I set it to also be dark (better)? Screenshot: https://dl.dropbox.com/u/22760184/screenshots/Bildschirmfoto%20vom%202013-03-16%2015%3A59%3A57.png Mar 16 15:04:29 go read the tutorials Mar 16 15:04:38 I misunderstood, Napalm said it wasn't fixed Mar 16 15:04:50 it's generated when you build Mar 16 15:04:58 Kopfgeldjaeger: i have a fix for that, one moment Mar 16 15:05:01 but both resolve to same refrence int Mar 16 15:05:11 yes but what I thought he meant was.. that the ID could at one runtime refer to 33 and change dynamically to 54 next time I click it Mar 16 15:05:20 Napalm: great! Mar 16 15:05:22 oh god no Mar 16 15:05:28 that would be fun Mar 16 15:05:32 that would suck balls :P Mar 16 15:06:13 the autogenerated int based on the ID.. is done randomly? or would it be the same each time I run the program Mar 16 15:06:18 just out of interest Mar 16 15:06:28 its consecutive Mar 16 15:06:32 read the src Mar 16 15:07:26 well that clears up that then Mar 16 15:07:34 P3nnyw1se: http://pastebin.com/xaPGdafi Mar 16 15:08:26 wow that algorithm looks weird to me Mar 16 15:08:33 P3nnyw1se: an identifier is an opaque number, it matters not its value, just the fact it lets you identify the object Mar 16 15:09:10 look this question is gonna be stupid but Mar 16 15:09:11 newValue > 0x00FFFFFF Mar 16 15:09:21 this is asking if a newvalue is bigger than a colorcode ? :P Mar 16 15:09:38 Kopfgeldjaeger: http://pastebin.com/ebHiNSvg Mar 16 15:10:01 P3nnyw1se: 0x00FFFFFF is not a color code in this instance, its a number Mar 16 15:10:23 P3nnyw1se: 0x == hex == a number Mar 16 15:10:53 Napalm: well thats tidier than how I do it, gonna try it in my view generator …thanks :) Mar 16 15:11:33 oh what'd i miss Mar 16 15:12:15 Napalm: thank you! needs to be called in onCreate once, I assume? Mar 16 15:12:41 Kopfgeldjaeger: correct Mar 16 15:16:39 StingRay_: you mean the view id generation? Mar 16 15:16:45 ya Mar 16 15:16:55 thats just copied straight out of the current android source Mar 16 15:17:01 Napalm: does R.drawable.list_item_selector need to be defined by me or is it android.R.drawable.list_selector_background ? Mar 16 15:17:34 Kopfgeldjaeger: thats one of your own drawables to use for the background Mar 16 15:17:59 Kopfgeldjaeger: create a new file called res/drawables/options_background.xml Mar 16 15:18:46 Kopfgeldjaeger: put the xml in for a shape drawable with a solid background of black or dark grey.. see http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape Mar 16 15:19:53 Kopfgeldjaeger: you can also set text text color to white Mar 16 15:23:07 StingRay_ Sorry i was your message now. Thanks Mar 16 15:25:47 I have a ScrollView with LinearLayout (vertical) and I add ImageViews into LinearLayout dynamically. Problem is, on different buttons i add dynamically different imageviews, and before adding i'm calling scrollview removeAllViews() . It removes child but when again I call scrollview to f Mar 16 15:26:09 ill same imageviews it stores the scroll bar location so I think its not removing views??? Mar 16 15:26:20 fill same imageviews it stores the scroll bar location so I think its not removing views??? Mar 16 15:26:57 musaulker: seems like you should probably use a listView and adapter Mar 16 15:27:06 maybe make things easier Mar 16 15:29:58 StingRay_ let me try with listview and adapter if it has a better performance Mar 16 15:40:16 how can i use a custom listview in a class extending listfragment? Mar 16 15:44:12 gives me a nullpointer http://pastebin.com/PFJ638MJ Mar 16 15:48:06 shotcaller: whats null ? Mar 16 15:48:37 StingRay_ line 23 Mar 16 15:50:08 my problem is, i need to use a custom listview object but it doesnt seem to be allowed Mar 16 15:50:12 so getView() is then Mar 16 15:50:40 then you call findView on null ? Mar 16 15:51:21 never used SherlockFragment Mar 16 15:53:15 hey guys, what software do you use for doing android app mockups? i've heard good things about omnigraffle but it's mac only :( Mar 16 15:54:47 shotcaller you need to inflate a view in onCreateView Mar 16 15:55:51 xorgate, in the AccountListFragment class? Mar 16 15:56:41 and in the activity Mar 16 15:57:03 though that might not be true Mar 16 15:57:42 you call getView() but where does it come from Mar 16 15:58:35 also maybe not pass getActivity() to your adapter since the activity could be gone after rotation change Mar 16 15:58:53 in short, read this : http://developer.android.com/guide/components/fragments.html Mar 16 16:02:22 question. can a class that extends listfragment set an adapter on a listview object created by a library/another class? Mar 16 16:02:46 why not? Mar 16 16:03:55 yes, but how. the listfragment class only uses setListAdapter() and notListView.setAdapter() Mar 16 16:04:30 which only inolves an adapter Mar 16 16:04:42 listfragment is a 'convenience' class Mar 16 16:05:37 if i switch to Fragment, my program will compile but it wont run and i cant discern a meaning from the little error message i get in logcat Mar 16 16:05:47 so if you use listfragment or normal fragment+listview , both want an adapter Mar 16 16:06:45 well what's the message Mar 16 16:09:01 xorgate, 03-03 03:10:27.784: E/AndroidRuntime(4000): at com.example.android.sherlockdemo.AccountListActivity$AccountListFragment.onActivityCreated(AccountListActivity.java:64) Mar 16 16:09:22 the whole thing, and use pastebin.com please Mar 16 16:11:07 xorgate, http://pastebin.com/jXWgfBAu Mar 16 16:11:39 right, it's to do with the transaction Mar 16 16:11:52 pastebin the frag and the act Mar 16 16:12:06 the act? Mar 16 16:12:09 ivity Mar 16 16:14:23 xorgate, http://pastebin.com/jpp0SUe3 Mar 16 16:16:09 what kinda class is FragmentTabsPager Mar 16 16:17:31 it creates tabs with TabsAdapter Mar 16 16:17:46 what kinda class is it Mar 16 16:18:09 what do you mean? it extends SherlockFragmentActivity Mar 16 16:18:35 thats what i meant Mar 16 16:19:37 anyway Mar 16 16:20:17 you need to create a view in your fragment before getView() returns anything but null Mar 16 16:23:00 I'm having trouble breaking down this line. pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); So that creates a new pending intent and within its parameters it takes an intent as the second argument and in this case the intent is being initiated inside it. Then flags method is being called to add flags? what are Mar 16 16:23:00 flags? Mar 16 16:24:32 coco89[a] do you know the programming term 'flag' ? Mar 16 16:24:58 xorgate: no sir Mar 16 16:25:05 they are basically booleans Mar 16 16:25:11 oh i see Mar 16 16:25:15 http://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION Mar 16 16:25:35 so you can stash a few inside an int Mar 16 16:25:48 and their values are powers of 2 Mar 16 16:25:55 so 1 bit = 1 flag Mar 16 16:29:44 i don't understand how the numbers relate? Mar 16 16:30:00 do you know what a bit is :) Mar 16 16:30:00 so a flag grants users permision to read or write uri? Mar 16 16:30:02 God, I just found out how easy tab navigation is (also with ActionBarSherlock)... I think I was really stupid the last time I tried that, because I just could not make it work :> Mar 16 16:34:11 Kopfgeldjaeger, is the code supposed to be lengthy when all the tabs use Fragment instead of ListFragment? Mar 16 16:35:27 shotcaller: I actually currently don't even use fragments with that, because the content change is very simple. But I don't think it should be too complicated Mar 16 16:51:00 xorgate, it worked, thanks Mar 16 16:51:59 shotcaller: http://graetzer.org/index.php/2012/03/android-actionbarsherlock-mit-tabs-und-viewpager/ here's a great code example. Works great with normal fragments (and actionbarsherlock, if you need that) Mar 16 17:05:38 Kopfgeldjaeger, i have very similar code and i just got it working Mar 16 17:06:07 Has anyone ever had an issue with text getting cut off in LogCat? Mar 16 17:07:10 i saw cut off text when i was filtering for a specific project Mar 16 17:07:52 Apparently an outstanding issue: https://code.google.com/p/android/issues/detail?id=45744 Mar 16 17:20:53 Does anyone know if it is possible with IntelliJ IDEA to debug Android to a point where it will tell me which method / activity is being called when in the simulator? Mar 16 17:38:21 ah finally managed to update my intellij plugin Mar 16 17:52:25 QbY: yes Mar 16 17:52:41 QbY: and by simulator, I assume you mean emulator Mar 16 17:54:40 yes. Mar 16 17:55:21 JesusFreke: Do you know how to get it to show the methods it's firing? Mar 16 17:56:07 That's not how it works.. You set breakpoints where you want it to stop, then you can step through the code Mar 16 17:56:18 k. Mar 16 17:56:20 QbY: oh, to actually print them out? doubtful. You can use traceview in ddms. Or add printing to the methods yourself Mar 16 17:56:47 traceview is pretty nifty though. definitely take a look if you haven't tried it yet Mar 16 17:56:51 JesusFreke: that's the problem; i'm coming in on the tail end of a huge app, and i have no idea which methods are called Mar 16 17:57:41 QbY: traceview might help Mar 16 17:58:15 And the performance dump that traceview works on definitely contains the data you're looking for Mar 16 17:58:32 iirc, it's basically a list of method entry and exit events Mar 16 17:58:42 I don't recall the format offhand though (or where it's documented) Mar 16 17:59:17 I used to have a tool that would print out a nice tabbed call graph/tree thing as text Mar 16 17:59:27 so I know it's possible at least :) Mar 16 18:00:41 I'm using the eclipse ADT, and using git. When I switch to a new branch, some of the old .java source files are removed, and some are added. How can I get eclipse to refresh the project so that the list of .java source files will be current and the project will build? Mar 16 18:00:48 k. let me see if i can do that in intellij Mar 16 18:01:38 http://developer.android.com/tools/debugging/debugging-tracing.html#dmtracedump Mar 16 18:01:44 Maybe this is useful Mar 16 18:03:29 Hey guys. I'm placing a textview on a relative layout based on density pixels and it won't align correctly... here is an image of what its compared to on the actual device. http://i.imgur.com/6w4hrsG.png Mar 16 18:03:48 thanks SimonVT Mar 16 18:04:21 Also splitting the image doesn't work and I don't think the 9 patch tool would help since there are many textviews in one picture Mar 16 18:04:41 what is the HC UI idiom that generally replaced the old long-click context menus? Mar 16 18:05:31 Do you mean actionmodes? Mar 16 18:05:57 * g00s looks up actionmodes Mar 16 18:06:12 .. you don't know about actionmodes? ;/ Mar 16 18:06:48 SimonVT: i haven't done anything UI-wise post froyo generally ;) Mar 16 18:06:53 except fragments :D Mar 16 18:07:03 yeah that could be it, thanks Mar 16 18:10:17 what's the average amount of money admob pays per click? Mar 16 18:10:35 this ^^ Mar 16 18:10:39 I'd like to know too Mar 16 18:10:54 I think it differs a lot Mar 16 18:11:05 you can have low quality or high quality clicks Mar 16 18:11:31 thus, the average is? Mar 16 18:11:49 it's not really possible to calculate because no one releases their results Mar 16 18:12:12 what determines a high or low quality click? accuracy, speed, timing? :P Mar 16 18:12:23 4 dollar per 15.000 users? one number I heard Mar 16 18:12:29 that view the ad Mar 16 18:12:42 15,000 users? wow. Mar 16 18:12:54 but I don´t know if that was related to admob :D Mar 16 18:12:54 $4 for 15k users? that's shitty Mar 16 18:13:03 15k isn't that much Mar 16 18:13:07 da. fuq. Mar 16 18:13:09 in terms of advertising nowadays Mar 16 18:13:20 that would mean you expect a user to spend like 0.003 cents... Mar 16 18:13:23 doesn't that require 15k downloads and that's assuming all of them will click Mar 16 18:13:35 no, view Mar 16 18:13:38 oh Mar 16 18:13:49 but I could easily be wrong Mar 16 18:14:10 I'd guess that the money per click differs a lot per app and is based on the audience, likelihood of clicking, etc Mar 16 18:14:18 15.000 users generate 4 dollar per day on average... Mar 16 18:14:20 I though Mar 16 18:14:21 t Mar 16 18:14:27 that seems accurate Mar 16 18:14:35 that doesn't sound unreasonable Mar 16 18:14:46 i think it would be light Mar 16 18:14:51 I would love to find out myself though :P Mar 16 18:15:04 SimonVT: does ABS bring have actionmodes ? Mar 16 18:15:11 yah, now ij ust need to make a popular app ;) Mar 16 18:15:19 all I know is I get exactly $0 from the 1000 users of my free (no-ads :p) app. Mar 16 18:15:23 I currently have an app with 4k active users making about $0.20/day Mar 16 18:15:26 g00s: it does but not supported everything Mar 16 18:15:46 but it depends a lot on what your app does Mar 16 18:15:49 timroes: not supporting all functionality or all typical old android versions ? Mar 16 18:15:51 games generally make a lot more ad money Mar 16 18:16:00 I want google to raise revenues and be less egocentric. Mar 16 18:16:05 g00s: all functionallity, the multi item support isn't supproted yet IIRC Mar 16 18:16:12 ah, ok Mar 16 18:16:13 if you have a weather app that people check once a day, you're not going to get much Mar 16 18:16:13 and what kind of ad I presume, small bar is less worth than fullscreen Mar 16 18:16:31 yeah fullscreen ads can be $1.30 per impression Mar 16 18:16:34 like in gmail app marking more then one item, but for a special use case it's not that hard to include if you need it Mar 16 18:17:49 just remember about ads Mar 16 18:17:54 don't expect to make a living off of them Mar 16 18:18:28 not from one app anyway Mar 16 18:19:09 my current impression is that you make way more money from people paying to remove ads Mar 16 18:19:41 Overv, taht would make sense, given that click through is pretty bad Mar 16 18:20:21 in that sense ads are really just an excuse for a trial for your app that people later pay for if they like it Mar 16 18:20:30 Overv, are you Overv from Facepunch? Mar 16 18:20:33 yes Mar 16 18:20:37 I love you Mar 16 18:21:31 is hardware acceleration for the canvas in Android good enough to draw lines to it at a reasonable framerate? Mar 16 18:24:08 Overv, which ad provider gives you 1.30 for fullscreen banners? Mar 16 18:24:24 one moment Mar 16 18:25:09 * spobat waits Mar 16 18:25:10 spobat: Sorry, I'm afraid I forgot where I read that Mar 16 18:25:11 :D Mar 16 18:25:18 okay :((( Mar 16 18:25:23 but clicks on fullscreen ads definitely make more Mar 16 18:25:30 okay Mar 16 18:25:35 because they get more attention Mar 16 18:25:37 :p Mar 16 18:25:41 is there an ad provider to recommend for these as admob doesn't ever them Mar 16 18:26:07 from that same source (so take it with a grain of salt) you can usually only get fullscreen ads if your app is already popular Mar 16 18:26:42 but I'm really not the right person to consult Mar 16 18:26:45 I only released my first ad supported ad a few weeks ago Mar 16 18:26:48 app* Mar 16 18:27:21 I have a dark and light theme and show a WebView. If I set webView.setBackgroundColor, the background color is right but the text is not readable in one theme. How can I fix this? Mar 16 18:27:43 Overv, what does that mean I can use it only if it is popular? Mar 16 18:27:46 (I want the WebView background to match my theme. html file is in assets/) Mar 16 18:28:08 spobat: with some ad networks you're only legible if you've already proven yourself as a good popular app Mar 16 18:28:15 basically they don't bother with you if you have < 10k downloads Mar 16 18:28:32 yeah, that makes sense Mar 16 18:28:42 I got more than that :D (very closely) Mar 16 18:28:52 what kind of app did you make? Mar 16 18:29:00 https://play.google.com/store/apps/details?id=com.troubi.kingofmath Mar 16 18:29:28 cool Mar 16 18:29:48 I also currently have a math related app :p Mar 16 18:29:48 https://play.google.com/store/apps/details?id=nl.vertinode.mathstep Mar 16 18:30:13 hah, funny^^ Mar 16 18:30:26 those math training apps seem to do well Mar 16 18:30:57 I hope so Mar 16 18:31:11 when did you release the first version? Mar 16 18:31:37 On functions, what is that symbol between pi and e? Mar 16 18:31:46 theta Mar 16 18:31:54 it's usually used as 'x' in trigonometry Mar 16 18:32:16 I always use alpha :P Mar 16 18:32:35 and then beta, and then gamma, and then.. :p Mar 16 18:32:47 I should probably change a, b, c to alpha, beta, gamma Mar 16 18:32:49 yeah Mar 16 18:33:13 ^^ Mar 16 18:33:25 feb 27th Mar 16 18:34:14 oh wow Mar 16 18:34:17 you've been busy Mar 16 18:34:21 is all that your work? Mar 16 18:35:38 yes, I think so. Mar 16 18:35:49 I'm glad you like it. Mar 16 18:37:31 I like MathStep too, I'll give it 5 stars :) Mar 16 18:38:19 :) Mar 16 18:39:01 How do you render the square/cuberoot? Mar 16 18:39:21 I draw a unicode square root sign and render the line seperately Mar 16 18:39:37 and the 3 is also a separate text draw call Mar 16 18:39:58 on Canvas? Mar 16 18:40:02 yup Mar 16 18:40:11 I've once sent an e-mail to someone describing how it works Mar 16 18:40:15 I can forward it if you want Mar 16 18:40:31 okay Mar 16 18:41:13 I've encountered a "bug," if you want so: If you make a sqrt within a sqrt the upper line overlaps :/ Mar 16 18:41:19 I think they shouldn't. Mar 16 18:41:49 yeah Mar 16 18:41:55 it's not a very complex system right now Mar 16 18:41:56 :p Mar 16 18:43:33 I'm currently figuring out the best approach for drawing graphs Mar 16 18:52:44 Overv use a lib Mar 16 18:53:50 xorgate, do you have a suggestion? I can only find chart libs Mar 16 18:56:00 xorgate: I need a lib for things like this: https://lh6.ggpht.com/UCf1KYtBUJaCMTK2xm2XUl3PYf5c7z4ISrfqYuDe9gXmoUA7748uI8bnqoJ6NAUEgvQ Mar 16 18:56:20 ah Mar 16 18:56:25 well no idea if theres a lib Mar 16 18:56:39 you could extend View and override onDraw with what you want Mar 16 18:57:02 Overv: you might look at handyCalc, and see what it uses. Not sure if it uses some homegrown solution, or a library Mar 16 18:57:13 ah yes I forgot that's open source Mar 16 18:57:22 oh, is it open source? I didn't realize that Mar 16 18:57:35 well maybe not Mar 16 18:57:43 how would I check it out if it wasn't OS? Mar 16 18:57:43 :p Mar 16 18:57:57 I just meant to see if it uses some library Mar 16 18:58:02 that's... fairly easy ;) Mar 16 18:58:40 if it's a homegrown graphing solution, there's not much you could do. but if it's a third party library, you could look into that. Mar 16 18:58:57 hmm, regardless of what it is, I don't like handycalc's plotting too much Mar 16 18:59:02 it doesn't have pinch to zoom Mar 16 18:59:27 I don't mind a homegrown solution Mar 16 18:59:32 it's not the most complex thing to make Mar 16 18:59:40 quick sql question : UPDATE stuff SET item_a='changed' WHERE name IN ('a','b','c'); would I get a warning in sql db helper if that was not completed ? Mar 16 18:59:43 still might be worth looking if it uses some library Mar 16 19:00:05 I suspect it is probably a homegrown solution though Mar 16 19:00:13 handycalc has been aronud a *long* time Mar 16 19:00:28 since the beginning, iirc Mar 16 19:02:25 how can i use a position parameter with onCreateView like getView can? getView(int position, View convertView, ViewGroup parent) onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) Mar 16 19:03:05 that question makes no sense Mar 16 19:05:01 shotcaller what are you trying to achieve Mar 16 19:05:37 let me paste some code... Mar 16 19:06:11 does anyone know if shared preference is unreliable when writing / reading constantly? Mar 16 19:07:58 in my game, a player types answers to questions, three questions in a row. I save those in shared preferences until the third is answered and then I clear those preferences and passes the data to a server Mar 16 19:08:13 problem is, it seems it somehow skips writing to shared preferences Mar 16 19:08:15 xorgate, when i call getView().findViewById(R.id.list); the first function will display the list but the second one will give me a nullpointer error in the imageLoader class http://pastebin.com/CApYqhiH Mar 16 19:08:40 so i was wondering if i could get onCreateView to use position Mar 16 19:08:49 Is it normal that Theme.Holo.Light TextView backgrounds are white and noch #f3f3f3? (I use actionbarsherlock) Mar 16 19:08:56 s/noch/not Mar 16 19:09:02 / Mar 16 19:09:13 shotcaller you ... are mixing up things Mar 16 19:09:23 how so? Mar 16 19:09:45 oh. you want to know where those functions are? Mar 16 19:10:20 if you need a context in your fragment, use getActivity() Mar 16 19:10:39 getView() as you have it now is what's in an adapter Mar 16 19:11:15 why cant ListView be what i want it to be Mar 16 19:11:49 Napalm: not mind readers … so question is un-answerable Mar 16 19:11:56 * Napalm s play on words from a phrase from Bugsy Malone Mar 16 19:12:21 that a musical ? Mar 16 19:12:26 yup Mar 16 19:12:28 well kinda Mar 16 19:12:36 I think I just hummed that tune Mar 16 19:12:44 :) Mar 16 19:12:56 StingRay_: if you've been doing Android dev for long enough.. you realise view recycling is needed but its also a pain in the ass Mar 16 19:13:16 indeed, I like view types though Mar 16 19:13:29 to have multi-view cycling Mar 16 19:13:48 in this case.. i want to get the y-offset of a position in a listview of which the view has been recycled Mar 16 19:14:13 xorgate, i dont understand. what about position? thats what i need to make the view display Mar 16 19:14:39 shot what about it? you are in an adapter, yes? Mar 16 19:15:05 no, i am in a class Mar 16 19:15:21 :( Mar 16 19:15:24 lol Mar 16 19:15:28 a class that acts as a fragment Mar 16 19:15:37 :( Mar 16 19:15:44 ok look Mar 16 19:15:52 activity > fragment > listview > adapter Mar 16 19:15:58 right Mar 16 19:16:07 getView() is part of the adapter Mar 16 19:16:13 onCreateView() is part of the fragment Mar 16 19:16:27 yes Mar 16 19:17:10 you done? Mar 16 19:17:44 so the position you refer to, should be the index into the backing data of the listview's adapter Mar 16 19:19:35 can you tell me how i can access that position? Mar 16 19:19:50 in an adapter, getView() is called by the listview Mar 16 19:20:09 Does anyone have an idea why my TextView background is white and not #f3f3f3 even though I call setTheme(...) in onCreate of my activity? https://dl.dropbox.com/u/22760184/screenshots/Bildschirmfoto%20vom%202013-03-16%2020%3A15%3A37.png [Theme.Sherlock.Light] Mar 16 19:22:38 StingRay_: http://www.youtube.com/watch?v=sA_0cvd1EUM&feature=share&list=PLegDGs7z3yoM56EuIyWNXleT-nnq6P66A&t=30sb Mar 16 19:22:40 StingRay_: http://www.youtube.com/watch?v=sA_0cvd1EUM&feature=share&list=PLegDGs7z3yoM56EuIyWNXleT-nnq6P66A&t=30s Mar 16 19:23:02 yeah thats the tune I was humming Mar 16 19:23:10 :) Mar 16 19:23:23 xorgate, yes but what about position? how do i access that directly/indirectly? Mar 16 19:23:34 is it a riddle? Mar 16 19:23:49 shotcaller it's unclear what you mean.. you get it as a parameter Mar 16 19:24:03 so it's anything from 0 to count-1 Mar 16 19:25:08 StingRay_: this takes me back, not heard/watched this for YEARS Mar 16 19:25:19 nor I Mar 16 19:25:25 but I knew the tune/quote Mar 16 19:25:39 I actually forgot it's a load of kids Mar 16 19:25:52 <3 oldschool Mar 16 19:31:52 if i try to set the inflater with getActivity() it says i cant make a static reference Mar 16 19:45:02 I've implemented an account picker extending DialogFragment to get the users email. Mar 16 19:45:14 I only want to show the dialog if I don't have the users email. Mar 16 19:45:25 Should I save the users email in shared prefs and then only show the dialog if the email is in shared prefs? Mar 16 19:46:06 if the email is not in shared prefs, I assume Mar 16 19:48:41 xorgate, your method just gives me a nullpointer when i set the adapter http://pastebin.com/ezKukzff Mar 16 19:48:55 Chainfire: true about the not part, but is this the way to do it? Requesting and saving the users email that is? Mar 16 19:50:05 I guess? I'm not sure exactly what you're doing. Are you fetching the email address from Android accounts? Mar 16 19:50:19 Chainfire: yes Mar 16 19:50:32 shotcaller: getView is for an adapter Mar 16 19:50:55 shotcaller: you attempting to make a fragment into an combined listview and adapter ? Mar 16 19:50:58 Chainfire: I'll use that email to query an appengine endpoint and see if there is a phone number and if not I'll prompt the user for a number and so on... Mar 16 19:51:30 StingRay_, if i change getView to onCreatView ill lose the position parameter Mar 16 19:51:45 do you know what an adapter is ? Mar 16 19:51:50 and a listView ? Mar 16 19:51:55 and a fragment ? Mar 16 19:52:02 hum. Question. In an Activity with an ActionBar, is onNavigationItemSelected() called in onCreate()? ... it certainly looks that way. Mar 16 19:52:04 and how they are all different ? Mar 16 19:52:17 hmm snot, I'm not actually familiar with AccountManager Mar 16 19:52:35 i was just taking the other guy's advice, and yes i know what they are Mar 16 19:52:42 and if yes: say that i put another fragment into the container. Mar 16 19:52:50 how do i get that fragment 'back' on screen rotation? Mar 16 19:53:00 but it doesn't seem there's a permanent ID, so I'd store account name (which is probably an email address) in a sharedpref Mar 16 19:53:06 pretty much as you suggest Mar 16 19:53:10 shotcaller: then you know why what your doing is a little odd and wont really work without you writing most of what is core to an adapter and listView Mar 16 19:53:43 Chainfire: account name is an email and that is what I'm about to do, just wanted to confirm that I wasnt doing something silly here, thanks for the info Mar 16 19:53:59 shotcaller: in other words, why not use a listView with an adapter ? Mar 16 19:54:31 if you're crazy about privacy you could encrypt it (meh), I'd normally go for a less-descriptive permanent ID, but as there doesn't seem to be one, I'm not sure how else you would do this. Mar 16 19:54:32 StingRay_, thats what Im doing Mar 16 19:54:44 so err, go for it :) Mar 16 19:54:45 the adapter has its own class Mar 16 19:55:15 then why are you implementing or attempting to implement getView on an activity Mar 16 19:55:17 ? Mar 16 19:55:21 seems a bit odd Mar 16 19:55:31 xorgate told me to do it Mar 16 19:55:33 Hi Mar 16 19:55:47 shotcaller: I assure you he told you it's part of an adapter Mar 16 19:55:51 not a fragment Mar 16 19:55:57 read upwards in this chat Mar 16 19:55:58 ;) Mar 16 19:56:05 I'm having a problem where I'm setting a minimum height on a listview row, but it only get's applied when the row is scrolled out, and then into, the visible area Mar 16 19:56:16 i've tried invalidating the row but that doesn't help Mar 16 19:56:31 Chainfire: thanks, also thanks for all the stuff you are releasing to the android community :) Mar 16 19:56:44 shotcaller: I even remember his Activity > fragment > listview > adapter <----- thats where getView is implemented Mar 16 19:57:45 oh thats what he was saying? come to think of it, LazyAdapter does extend baseAdapter Mar 16 19:58:56 every adapter kinda extends baseAdapter Mar 16 19:59:01 :) Mar 16 19:59:14 this all started when i couldnt use (ListView)findViewById(R.id.list); inside a fragment. it all went downhill from there Mar 16 19:59:47 cause that fragment has no view Mar 16 19:59:55 so it has no list to find Mar 16 19:59:57 :) Mar 16 20:00:06 Chainfire: gotta sec for a quick photography question? Mar 16 20:00:23 g00s ? Mar 16 20:00:35 Chainfire: you're into digital photography, right ? Mar 16 20:00:44 somewhat, yes Mar 16 20:00:52 * g00s just guessing, by your app ;) Mar 16 20:01:35 ask away, feel free to PM if its too offtopic for the chan ;) Mar 16 20:01:52 ok - well, if i put a typical digital camera in Program mode (i usually use M, but anyhow) … does the camera select an aperture based ONLY on exposure, or exposure AND obtaining a suitable depth of field as determined by the autofocus system ? Mar 16 20:02:39 g00s: depends on the system Mar 16 20:03:05 but it will also do an ev eval and meter it Mar 16 20:03:17 but in M mode it will do nothing :) Mar 16 20:03:23 or should do nothing Mar 16 20:03:32 maybe color curves :) Mar 16 20:03:39 afaik Mar 16 20:03:48 g00s yeah it depends, it's like an auto mode that gives you more features. Some cameras will let you use it to make sure your DoF is between X and Y. Mar 16 20:04:06 g00s I'm not an expert on P though, it's too much automatic for my taste, so I never really use it Mar 16 20:04:45 with most P modes you can set speed or aperture priorites though ? or can on my cameras Mar 16 20:04:56 i'm using an old camera and really struggling with getting that tack sharp image; not sure if my lens sucks, or i'm constantly getting the DoF wrong, or what Mar 16 20:05:16 ok, cool - thanks Mar 16 20:05:36 g00s: you have a g10 ? Mar 16 20:05:40 g9 Mar 16 20:05:41 thats not old :) Mar 16 20:05:48 oh well that aint old either Mar 16 20:05:49 for digital it is :) Mar 16 20:06:11 a film camera from 30 years ago could still be awesome ;) Mar 16 20:07:05 g00s look on the internets what aperture your lens is sharpest at, use a tripod and remote release, and if still not tack sharp, make sure to check if your lens front or back focusses Mar 16 20:07:07 I have a V OLD medium format film somewhere Mar 16 20:07:29 manual shutter timing :) Mar 16 20:07:33 Chainfire: yeah, i did that … its 4.5. use tripod, custom timer, etc Mar 16 20:11:15 huh, wonder why canon replaced VxWorks with DryOS Mar 16 20:12:58 StingRay_ & Chainfire thanks guys Mar 16 20:13:20 can someone please clarify what's going on here http://pastebin.com/286MTATJ Mar 16 20:14:21 coco89[a]: something is going on. is it what you intend? :P Mar 16 20:14:34 cha cha, what is your Intent :P Mar 16 20:15:51 the app works fine, it's an app to write strings to an NFC tag Mar 16 20:16:43 it's creating an intent i can see that but i just dont understand it Mar 16 20:19:55 g00s? Mar 16 20:21:53 anyone :'( Mar 16 20:31:09 I'm having issues understanding this line pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); Mar 16 20:38:25 anyone? Mar 16 20:38:57 what bit ? Mar 16 20:39:58 I'm used to the of intent in = new Intent (com.foo.foo); startActivity (in); I'm not too sure what pendingIntent is and how it differs Mar 16 20:40:14 you read the docs ? Mar 16 20:40:20 yeah, still confused Mar 16 20:40:43 so you know what a pendingIntent is ? Mar 16 20:41:10 It's an intent with inbuilt permissions or something :S Mar 16 20:41:16 http://developer.android.com/reference/android/app/PendingIntent.html Mar 16 20:43:08 hmm Mar 16 20:43:11 what's a target action Mar 16 20:44:15 the action to be performed by the available recepient I would think Mar 16 20:44:28 or an identifier for that action Mar 16 20:44:37 dunno, not really read it :) Mar 16 20:44:41 sure it says Mar 16 20:44:45 If I add a new row to a listview. And that row has a minheight (configured in XML). How do I force android to take that minimum height as the actual height Mar 16 20:44:50 instead of ignoring it until the user scrolls Mar 16 20:45:56 StingRay_: When we say getActivity which activity are we acftually getting and why? Mar 16 20:46:10 Why is there a new Intent in the parameters Mar 16 20:46:20 and what's with the getClass() and flags Mar 16 20:46:38 They don't really break it down in the docs Mar 16 20:46:44 your asking questions that are answered in the docs and the page I just linked Mar 16 20:47:18 oh? Mar 16 20:47:28 new intent is for if you need a complete intent fired and captured by something else (like your app) afaik Mar 16 20:47:45 the flags are all in the activity class and described Mar 16 20:48:07 woutifier:do you have your list items xml to wrap_content? Mar 16 20:48:48 StingRay_: fired by what/ Mar 16 20:49:04 also coco89[a] your asking a VFX artist, so the way I may explain something is probably not programatically accurate lingo :) Mar 16 20:49:22 fired by the complete event of whatever you asked to do something Mar 16 20:49:46 like me saying to the room, here is the location of the orange, deliver it to this address when you get it Mar 16 20:50:20 deliver being the intent that is used on completion along with any extra data that in this case is the address Mar 16 20:51:03 but I ask the room/channel, I dont exactly know who will fetch this orange or when, but I do know the delivery address is my house Mar 16 20:51:09 Ah I see. StingRay_ it always makes more sense when people describe it like that Mar 16 20:51:24 that maybe a bollox explination of it btw, like I say, I'm a VFX 3D artist Mar 16 20:51:49 StingRay_: no it's perfect that makes much more sense! Mar 16 20:53:10 StingRay_: thanks a lot Mar 16 20:53:12 brb dinner Mar 16 20:53:56 g00s Chainfire canadiancow xorgate Napalm - someone tell me I did not just spout "bollox" there Mar 16 20:54:18 cause I seem to be missing an orange ! Mar 16 20:54:38 StingRay_: i was just about to ask about the orange but i've gotta go for dinner so was gonna ask later :P Mar 16 20:54:58 orange is your NFC op I would imagine Mar 16 20:55:28 I see Mar 16 20:55:41 dont have to be an orange Mar 16 20:55:52 Thanks will be back in a sec maybe if i sketch it out I'll understand it even more :P Mar 16 20:56:16 could be a kill order/hit contract for you Mar 16 20:58:08 Hey guys, quick question from very lil android/java background: I want to create a list with a textbox and 2 buttons in each row. Now I could use listview, but that kinda gives me a headache handling the buttons within the rows. I also could just use a vertical layout and within that for each row a linear layout... whats best practice? Mar 16 20:58:50 depends on source of the rows and how many/do they change etc Mar 16 20:58:57 or to me it would Mar 16 20:59:34 sorta like a list showing created profiles for my app, however they are in a range of around 10 max Mar 16 21:00:07 I would still probably use a listView for ease of use Mar 16 21:00:17 but thats me personally Mar 16 21:00:18 hm ok... Mar 16 21:00:38 if data changes / if needs updates Mar 16 21:02:07 ray122: it's not a headache to handle the buttons, you just handle the onitemclick of your row& set your button clicklistener in there&base your buttons reaction on the item clicked? Mar 16 21:07:47 hi all im developing an app but mywebview seem not to want to open a websafe URL :/ Mar 16 21:08:43 the url is a rumbletalk chatroom that i want my app users to be able to use, i have opend it in browser with my s3 and it seems to work fine Mar 16 21:09:22 hum... is it correct that the SherlockDialogFragment does not implement the setTargetFragement-thing? ( @ JakeWharton ?) Mar 16 21:09:47 if yes, is there any other way of communicating with the fragment that created the dialog? Mar 16 21:14:00 hmm, ant 1.9 is out. they're still working on that ? :P Mar 16 21:17:32 g00s: where were you when I was spouting my orange bollox Mar 16 21:17:45 anyone >.> Mar 16 21:18:40 StingRay_: heh, i wasn't paying attention :P i also cleared my scrollbox, so i'll have to take your word you were spouting orange bollox XD Mar 16 21:19:16 it was a pendingIntent explination without sex or dildos Mar 16 21:19:24 :) Mar 16 21:20:14 but as always I dont really speak with authority on anything android dev, so wanted some1 to correct me if wrong :) Mar 16 21:22:53 tinloaf, SherlockDialogFragment just extends the support lib DialogFragment. Other than menu handling, it doesn't touch the Fragment API at all. Mar 16 21:24:20 What is the best way to implement a HTML5 based chat roon into WebView as currently ive put in the URL and all i get is a white page Mar 16 21:24:21 tl;dr if APIs are missing or not working, the issue is not with ABS Mar 16 21:29:32 So in terms of code which are the houses, orange and address again? Mar 16 21:31:10 hi Mar 16 21:32:26 peningIntent to this room, action "kill coco89[a]" return intent has flag/actions of "coco89[a] is dead" , I send to the room wait for "anyone to do the task and send me the "coco89[a] is dead" msg Mar 16 21:32:53 all messages in the form of intents Mar 16 21:32:56 :) Mar 16 21:34:57 StingRay_: I see, so what you're actually passing is PendingIntent object? Mar 16 21:35:22 which contains action and flags Mar 16 21:35:34 How can i make this: //service2.rumbletalk.net/k-16rSG3/ display in WebView guys? opening at a URL leaves me with a white screen Mar 16 21:35:36 and another intent Mar 16 21:35:44 another intent? Mar 16 21:35:47 the main point is I dont know who will kill you Mar 16 21:35:54 but you should get killed Mar 16 21:36:04 and I should get a intent back saying so Mar 16 21:36:11 StingRay_: oh can you also predict me, who will kill me? Mar 16 21:36:18 canvs2321: Working like a charm, I used a different method from an example on the internet and somehow it always crashed. By just setting the listeners it works - thanks :) Mar 16 21:36:41 I'm sure you can query what will handle an intent/action, I never have needed to though Mar 16 21:37:03 if some1 is going to kill you, best me not knowing :) Mar 16 21:37:16 w00t w00t Mar 16 21:37:21 thats what a little time out can do Mar 16 21:37:37 Napalm: I just use coffee and nicotine Mar 16 21:37:40 took a break and watched some "3rd rock from the sun" and im back and within 10 minutes solved my issue Mar 16 21:37:45 yup that too Mar 16 21:37:46 :d Mar 16 21:37:58 now for a victory smoke Mar 16 21:39:31 omfg i updated to a samsung 840ssd Mar 16 21:39:42 my system boots in 15 seconds Mar 16 21:39:59 monsti: windows? or mac? Mar 16 21:40:21 windows I bet Mar 16 21:40:24 monsti: if its windows, disable gui boot in msconfig Mar 16 21:40:29 starts up even quicker Mar 16 21:40:30 StingRay_: I see, I think I understand the concept now Mar 16 21:40:53 osx boots in about 18 seconds with my ssd's Mar 16 21:41:16 and suprisingly if I boot of a esata big4 lacie raid a little less Mar 16 21:42:06 I never turn off my machines Mar 16 21:42:29 pragma-: so what your saying is your 0 seconds beats ssd ...hmmmm Mar 16 21:42:59 pragma-: same but thats even more reason to get an SSD, when you do reboot, you want it quick Mar 16 21:43:25 ssd's are tricky though Mar 16 21:43:47 the sandforce controller ones are ok Mar 16 21:43:53 like sammy and intel use Mar 16 21:44:26 Napalm: windows Mar 16 21:44:30 SimonVT: yeah, I just realized I made a mistake again (my 'this' was not what I thought it was ;)) .. by the way: sorry for leaving so abruptly yesterday, my work 'interfered' ;) Mar 16 21:45:14 anyone able to help? ¬.¬ Mar 16 21:45:42 hirsty: if yes would be the answer, what is your question? Mar 16 21:46:28 What is the best way to implement a HTML5 based chat roon into WebView as currently ive put in the URL and all i get is a white page Mar 16 21:46:29 can some1 see if http://sqlfiddle.com/ allows you to build scheme when set to sqlite ? I dont know if it's my browsers / java Mar 16 21:46:41 http://service2.rumbletalk.net/k-16rSG3/ is the chat room url Mar 16 21:46:53 it autoptimizes when i open it on my s3 Mar 16 21:47:20 but when putting it in for the url for the WebView, it doesnt >.> Mar 16 21:47:33 hirsty: you want to code a chat? you are asking about html? you have a s3 issue? Mar 16 21:47:59 i have a chat, i want to implement into our app Mar 16 21:48:13 ok i got it Mar 16 21:48:19 there is a webview issue Mar 16 21:48:29 while the android browser handles it in a correct way Mar 16 21:50:05 why would you assume the browser is the same as the webview? Mar 16 21:50:16 yeah ;) Mar 16 21:50:26 especially on samsung devices Mar 16 21:51:16 i thought i read the other day that failure rates were quite a bit more dismal than we thought Mar 16 21:51:22 on SSDs Mar 16 21:51:39 basically - dont put anything you care about on SSDs ;) Mar 16 21:51:54 so monsti: how would i go about it? Mar 16 21:52:13 debug step by step Mar 16 21:52:53 thought webview would contain the same browsing functionality as the in built browser as the browser is native to the phone ¬.¬ Mar 16 21:53:22 hirsty: did you read what kaneda^ wrote? Mar 16 21:53:35 yes Mar 16 21:53:58 would a logcat help? Mar 16 21:54:39 g00s, all of the articles i've seen are from mid 2012, i'm waiting on new reliability tests Mar 16 21:55:03 g00s: kaneda^ I test a few Mar 16 21:55:18 basically any sandforce is good Mar 16 21:55:25 so you sammy8 series Mar 16 21:55:32 intel 3/5 series Mar 16 21:55:56 the failes are on drives with cheaper less GC friendly data management Mar 16 21:56:09 fails* Mar 16 21:56:45 i've read that there are easy ways to ensure corruption on SSDs Mar 16 21:56:52 like interupting disk checks on certain filesystems Mar 16 21:57:08 any truth to that? Mar 16 21:57:21 well…like most OS fs you can screw it if you really try Mar 16 21:57:40 but thats dependant on the controllers Mar 16 21:58:54 I've had this osx machine die (power cut) in the middle of data writes Mar 16 21:59:03 i think i'll stick with my spinning disk hdds until ssds come down in price at least Mar 16 21:59:05 corrupt file and/or index Mar 16 21:59:15 easy fix, but thats like any storage medium Mar 16 22:17:24 I still didn't find out why my textviews are not aligning correctly. Mar 16 22:17:43 got my app working. thanks guys :) Mar 16 22:19:21 agy2154: but does it look passable, thats the question :) Mar 16 22:20:21 I guess so. i mean Im using density pixels so it should adapt to diffrent screen resolutions but it doesn't... I actually tried putting px for the heck of it and it would use dp for px Mar 16 22:20:55 you on about text sizes ? Mar 16 22:21:07 should you not consider sp for that ? Mar 16 22:22:02 ohh it has nothing to do with font size... that stays the same Mar 16 22:22:12 maybe pt would work? Mar 16 22:22:23 would work with that ? Mar 16 22:22:38 only one way to find out one second..... Mar 16 22:22:42 "aligning" is a bit of an oddity Mar 16 22:22:50 without explaining it more Mar 16 22:24:06 Ill send you a picture of what I mean Mar 16 22:24:29 http://i.imgur.com/RJOewmY.png Mar 16 22:24:52 Btw... it isn't an imageview in a relative layout anymore... its only a relative layout with a background image Mar 16 22:24:58 and then the textviews are inside it Mar 16 22:26:00 agy2154: do you actually need to use a textview for that? It looks like it might be easier just to draw something like that directly, with the canvas apis Mar 16 22:26:16 well for something like that I guess your using the center of the imageView as the base coords for xy margins on the text ? Mar 16 22:27:12 and adjusting based of native size to display size ? Mar 16 22:27:45 StingRay_: Would i use the view itself for that? or do you mean splitting my textview up? Mar 16 22:27:54 JesusFreke: Im looking at that right now Mar 16 22:28:40 well my question is your positioning them based of left top of the relative layout ? Mar 16 22:29:01 StingRay_: yeah Mar 16 22:29:13 margin top and margin left Mar 16 22:29:17 and those position are based of the native res image pixel coords Mar 16 22:29:27 yes Mar 16 22:29:38 and you account for the native TO display size of the image ? Mar 16 22:30:07 StingRay_: no I thought that the dpi would account for that Mar 16 22:30:38 whats your scaleType for the imageVIew ? Mar 16 22:30:55 cause either way that would be variable unless you did NOT scale it Mar 16 22:31:01 hence thats probably why it's off Mar 16 22:31:16 xy Mar 16 22:31:20 pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); Mar 16 22:31:30 actually hold up Mar 16 22:31:33 i think i took it out Mar 16 22:31:37 in the XML right? Mar 16 22:32:05 up to you how you set it Mar 16 22:32:25 android:scaleType or ImageView.setScaleType() i think Mar 16 22:33:26 StingRay_: I had a scaletype untill I just decided to put the image in my background instead of an imageview so I can't use scaletype anymore Mar 16 22:33:28 So the action details is in the form of an intent which in this case is?.. The context is just there so that PendingIntent knows that it can only use the permissions of that context. What about the gross action which is either start an activity, service or broadcast. Where does it specify in the above example Mar 16 22:33:41 should I reveret back to my old situation with the scaletype? Mar 16 22:33:55 agy2154: you get my point though ? Mar 16 22:33:59 yeah Mar 16 22:34:04 dp is not doing nething to the image Mar 16 22:34:10 the available screen space is Mar 16 22:34:18 yeah I get it Mar 16 22:34:21 and you would have to convert that info to get your offsets Mar 16 22:34:24 ok cool Mar 16 22:37:07 So the action details is in the form of an intent which in this case is?.. The context is just there so that PendingIntent knows that it can only use the permissions of that context. What about the gross action which is either start an activity, service or broadcast. Where does it specify in the example: pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).ad Mar 16 22:37:07 dFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); Mar 16 22:44:36 hmm Mar 16 22:48:13 Is their a rainbow table or something for keystores? Mar 16 22:48:25 *there Mar 16 22:48:46 ^ Mar 16 22:48:49 agy2154: forget your password? heh Mar 16 22:49:09 JesusFreke: Yeah Mar 16 22:49:57 I don't think a rainbow table is really applicable for that Mar 16 22:50:08 It's not like the password is hashed and stored Mar 16 22:50:47 ohh Mar 16 22:52:04 If you know roughly the character set and length that you used, it *might* be brute forceable Mar 16 22:52:23 I'm not sure how long each attempt would take though Mar 16 22:52:52 hmm. maybe not Mar 16 22:53:10 assuming letters and numbers and at 8-char password, at 1 million attempts per second, that's going to be 30 days Mar 16 22:53:16 Yeah lol Its no use... I have a new app anyways Mar 16 22:55:42 * coco89[a] feels tempted to ask again :( Mar 16 22:57:32 coco89[a]: PendingIntent.getActivity is for activity intent... getService is for a service intent.. Mar 16 22:57:40 coco89[a]: I would have helped you if I could. Mar 16 22:58:25 JesusFreke: As for my proportioning, I might use a canvis and create text basied on the relativelayouts width and height which I will find with getMeasuredWidth() and Height Mar 16 22:59:47 JesusFreke: so .getActivity starts a new activity? Mar 16 23:00:05 JesusFreke: or did you mean something else with 'activity intent'? Mar 16 23:00:14 coco89[a]: it gives you a pending intent, that, when started, will start an activity Mar 16 23:00:44 agy2154: that's alright :) thanks though Mar 16 23:01:15 you can pass that pending intent off to someone else to let them start the activity, even if they wouldn't normally have the permissions needed to start it Mar 16 23:01:44 agy2154: the dpi in android is not a true reflection of the device dpi. There's another parameter you need to utilize in displaymetrics, forget the name.... Mar 16 23:03:01 kbs: is it a unit? Mar 16 23:03:04 agy2154: xdpi/ydpi are probably closer to what you want Mar 16 23:03:23 JesusFreke: I see, so .getActivity doesn't actually stick an activity into the pendingIntent? Mar 16 23:03:32 agy2154: the densityDpi in DisplayMetrics is quantized to one of a limited set of values Mar 16 23:03:56 coco89[a]: your question doesn't make much sense, I'm sorry Mar 16 23:03:57 agy2154: so, depending on the device -- it will be "off" compared to the actual physical device dpi Mar 16 23:05:25 agy2154: all the widgets that use hte "dp" unit, build off the densityDpi parameter. To co-relate (for instance) a 100dp wide line with actual pixels on the device, you need to use the xdpi as well Mar 16 23:05:33 kbs: but if he uses the size of the relative layout Mar 16 23:05:53 he should be able to maintain a constant text size in relation to the other parts of the image thingy he is showing Mar 16 23:06:06 without having to know the dpi Mar 16 23:06:33 JesusFreke: oh, I missed that -- hm. You are right, of course. Mar 16 23:06:51 I am trying to use a custom ViewPager but i keep getting an inflate exception. what could be the cause? http://pastebin.com/2AXSBLjg Mar 16 23:06:52 kbs: here's what he's trying to do http://i.imgur.com/RJOewmY.png Mar 16 23:07:18 and I suggested drawing the text directly with a canvas, rather than trying to use a TextView Mar 16 23:07:37 backpackz: exception trace Mar 16 23:08:21 agy2154: belated: yeah - that sounds reasonable to me Mar 16 23:08:30 In what sinereo would I use DisplayMetrics? Mar 16 23:08:37 With widgets? Mar 16 23:08:38 JesusFreke / agy2154 -- what JesusFreke said :-) Mar 16 23:09:20 JesusFreke: I understand that the pendingIntent is passed to an external application for it to start a new activity without the need of the needed permissions but how does it do this in the code. .getActivity is which activity specifically ? Mar 16 23:09:34 hope that makes sense lol otherwise i'm missing the point cmopletely :P Mar 16 23:09:53 JesusFreke, http://pastebin.com/H7JHh2cx Mar 16 23:09:56 coco89[a]: http://developer.android.com/reference/android/app/PendingIntent.html#send() Mar 16 23:10:06 coco89[a]: reading the documentation is always recommended :) Mar 16 23:10:32 Yeah... I it will be perfectly precise if i get the size of the relative layout and set the canvas to draw the text at that height width found Mar 16 23:10:37 JesusFreke: heh, I never understand the documentation but i'll try :P thanks! Mar 16 23:11:03 backpackz: I think you need to use mypackage.CustomViewPager in the xml Mar 16 23:11:19 oh :o Mar 16 23:12:24 Hi there. I've got a question about the use of AlarmManager.setRepearting. I am trying to register an alarm with ELAPSED_REALTIME. The documentation in the SDK says this won't be fired when the device is asleep, but it appears to still be firing when the device is asleep. Mar 16 23:14:02 My code looks like this: Mar 16 23:14:09 agy2154: seems like an neat physics app. (though, does the trajectory seems more like a circle rather than a parabola? :-) Mar 16 23:14:11 CodeCommander: It's just faking sleep. It doesn't want to put out Mar 16 23:14:30 Intent intent = new Intent(context, MyWidgetProvider.class); Mar 16 23:14:35 intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, widgetIds); Mar 16 23:14:40 intent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE); Mar 16 23:14:44 PendingIntent pending = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); Mar 16 23:14:48 alarmManager.cancel(pending); Mar 16 23:14:52 alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), interval, pending); Mar 16 23:15:00 pastebin perhaps Mar 16 23:16:00 http://pastebin.com/YqrtQpqN Mar 16 23:19:27 kbs: hahah ill fix the image later... thanks! Mar 16 23:19:32 Is there some sort of special exception for ACTION_APPWIDGET_UPDATE intents that allows them to be triggered when the device is asleep? Mar 16 23:21:55 no. Note that just because the screen is off doesn't mean the device is asleep. For example if your device is plugged in it won't sleep. or if another app has a wakelock. Mar 16 23:27:59 Thanks for the help today kbs and JesusFreke! Its getting a bit late! Mar 16 23:28:18 I Mar 16 23:28:24 I will see you later peace! Mar 16 23:29:49 kevinb, alright that makes more sense. Mar 16 23:30:28 So there is probably no way to keep the debugger attached while the device is "asleep", right? Mar 16 23:32:24 CodeCommander: you can print stuff out to logcat, and then check later Mar 16 23:34:18 There is a special place in hell for people who make their autocomplete engines aggressive by default Mar 16 23:34:34 I just wanted a freaking space character, tyvm Mar 16 23:36:06 JesusFreke: So if I am doing Log.v(...) then when I reconnect my debugger it will show me the stuff I missed even while it was disconnected? Mar 16 23:36:35 yes Mar 16 23:36:40 Log.* go to logcat Mar 16 23:36:46 and logcat is always on and collecting logs Mar 16 23:36:56 the only thing you have to be careful of is that logcat only has so much space for logs Mar 16 23:37:04 so older log entries will eventually get pushed out Mar 16 23:37:11 depending on how much logging is going on Mar 16 23:37:20 Alright cool. Mar 16 23:37:35 also dont log personal information in production builds Mar 16 23:37:37 Thank you both, that helps a lot. Mar 16 23:37:42 Okay. Mar 17 01:42:07 i'm really confused Mar 17 01:42:10 in my game, a player types answers to questions, three questions in a row. I save those in shared preferences until the third is answered and then I clear those preferences and passes the data to a server Mar 17 01:42:33 problem is, it seems it somehow skips writing to shared preferences Mar 17 01:45:10 nobody seems to be up Mar 17 01:55:53 MelvinKelvin: make sure you are calling apply() (or commit()) on the SharedPreferences.Editor object or they won't be saved Mar 17 01:59:36 kevinb: Hey I just wanted to know if the pendingIntent is passed to the external application, then where's the action and the activity that is supposed to be started up in terms of the code that folllow: pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); Mar 17 02:01:04 in that case there's no action specified (not sure if that defaults to ACTION_MAIN or not) and the component is specified by the "this, getClass()", so it's the class you're creating that intent from Mar 17 02:01:58 you can create the intent separate from the pending intent, specify an action and set a different component and whatnot Mar 17 02:08:09 kevinb: what do you mean by the component is that what gets started up, a class? Mar 17 02:09:06 yeah, Activities/Receivers/Services are sometimes referred to by "ComponentName" which is a combination of you're APK's package and the class name Mar 17 02:12:11 kevinb: I see so if it were an activity that was being started it would be getActivity instead? Also what does the .getActivity on pendingIntent do? Mar 17 02:13:23 sorry for the noob questions Mar 17 02:15:31 for standard Intents the Intent itself doesn't know if it's referencing an Activity, BroadcastReceiver or Service. Instead you use that intent along with something like startActivity, startService or sendBroadcast. PendingIntents are wrappers for intents that are to be used by another app. in order for that app to use the intent it needs to know if it's an activity, broadcastreceiver or service Mar 17 02:15:54 so PendingIntent.getActivity creates a PendingIntent that will call the passed intent via startActivity Mar 17 02:17:13 kevinb: oh my god thank you. Mar 17 02:17:34 That's exactly the explanation I needed which I wasn't quite getting no matter how many doc's I've looked at Mar 17 02:18:56 I get it now Mar 17 02:23:32 Where I can look for a widget that display a calendar like monthÂż? **** ENDING LOGGING AT Sun Mar 17 02:59:59 2013