**** BEGIN LOGGING AT Thu Dec 27 02:59:58 2012 Dec 27 03:00:04 lgfreitas - you can group Dec 27 03:00:06 but yeah Dec 27 03:00:15 if you want anything remotely complicated write your own launcher Dec 27 03:00:22 no thanks. Dec 27 03:00:28 :D Dec 27 03:00:34 trying to avoid that. Dec 27 03:01:02 a widget might work with its own area to display icons Dec 27 03:01:11 ron_frown: what do you mean by group? Dec 27 03:01:42 drag an icon ontop of another icon Dec 27 03:01:46 ah. Dec 27 03:02:15 thats an idea, can I control groups? Dec 27 03:02:35 jasta: .next() would block? Dec 27 03:02:47 yes; this would be in a thread. Dec 27 03:03:02 this is the part of the discussion where you can use any number of other sources of information to figure out how this basic pattern works ;) Dec 27 03:05:33 i see... well, looks doable. Now I can sleep properly :D tomorrow I'll look into it. Dec 27 03:05:43 Thanks for the ideas and information :) Dec 27 03:11:33 how much does logcat effect performance i wonder Dec 27 03:42:43 excuse me guys... Dec 27 03:43:05 i have the code that use runOnUiThread Dec 27 03:43:31 runOnUiThread is inside synchronized(listChatAdapter) Dec 27 03:44:24 does the runOnUiThread need to be place inside synchronized??\ Dec 27 03:46:09 here is the code: http://pastebin.com/hsVmv4bq Dec 27 03:46:34 anyone can help?? Dec 27 03:57:24 iqbalkhan, runOnUiThread posts an action to the event queue if current thread is not UI thread. Dec 27 03:57:48 so it does not need to be synchronized. Dec 27 03:59:06 okay gw dpt jawaban dari IRC Dec 27 03:59:17 sorry Dec 27 03:59:28 that's indonesian language :) Dec 27 03:59:31 sory Dec 27 04:00:02 ducky_h, thank u Dec 27 04:00:34 now my notifyDataSetChanged() it's working Dec 27 04:13:00 what are the AppBaseThemes that i could use for my app Dec 27 04:24:43 hey all, is there a way to prevent deletion of an app via the sdk? Dec 27 04:25:34 ? Dec 27 04:26:07 i have an app that could be installed by a parent.. but i only want the parent to be able to delete it Dec 27 04:27:27 not without changes to packagemanager Dec 27 04:27:29 which is os level Dec 27 04:27:40 anybody familiar with Android media player Dec 27 04:27:57 nope Dec 27 04:28:00 that's sort of what i suspected ron_frown Dec 27 04:28:19 12-27 05:26:07.089: E/RemoteViews(940): SetRemoteViewsAdapterIntent action can only be used for AppWidgets (root id: 2131165195) Dec 27 04:28:31 are you f**** sh***ing me?! Dec 27 04:28:51 so I can't put a dynamic list in the ongoing notifications? Dec 27 04:29:24 ron_frown is there a way for the app to know before it's deleted to do some sort of callback? Dec 27 04:29:41 no Dec 27 04:30:04 I mean if you modified packagemanager you could probably make it happen Dec 27 04:30:05 but Dec 27 04:30:09 agian rom level changes Dec 27 04:30:17 android touch events to implement dragging, is touch detection noisy on some android devices ? Dec 27 04:30:28 the object im trying to drag seems to jitter as it's moving Dec 27 04:30:37 yea, we're trying to do this on unaltered rom Dec 27 04:30:39 is that my bug or is the sensor just noisy Dec 27 04:30:50 k0nichiwa dont suppose thats on honeycomb Dec 27 04:30:57 3.0 had major drag/drop bugs Dec 27 04:31:27 im testing on a 2.3.7 device Dec 27 04:31:34 theres an easy way to test that, you know Dec 27 04:31:35 but this is just touch events on a view Dec 27 04:31:39 dragging an icon for example Dec 27 04:31:51 adb shell su -- getevent -lt /dev/input/event1 Dec 27 04:32:05 i seem to always be roote whn i adb shell Dec 27 04:32:14 that will let you see how the touchevents are coming in from the touchscreen driver Dec 27 04:32:16 thanks for that, awesome ... Dec 27 04:32:27 if i really want to test it i should log all the points i get and graph them Dec 27 04:32:36 if the graph isn't nice and smooth, noise Dec 27 04:33:05 you might just turning on touch points in debug menu Dec 27 04:33:21 what do you mean touch points ? Dec 27 04:33:28 is that some debug thing for developers ? Dec 27 04:33:37 i dont think i t urned them on in settings if such a thing exists Dec 27 04:33:53 i think it's Android 4.0 and higher only Dec 27 04:33:55 developer options -> "show touches" Dec 27 04:33:58 that could be Dec 27 04:34:19 thanks ill check that, didnt know such a thing existed Dec 27 04:34:29 like kevinb it may only be on older ones Dec 27 04:34:38 getevent is used to develop touchscreen drivers Dec 27 04:34:42 sooo Dec 27 04:35:01 do logcat calls slow down performance much ? Dec 27 04:35:14 i think they're not supposed to Dec 27 04:35:17 I am sure its optimized out Dec 27 04:35:43 I think the only reason framework shit uses if(DEBUG) because its a TON of noise Dec 27 04:36:52 DEBUG is som ekind of auto-defined constant tyu can use ? Dec 27 04:36:57 no Dec 27 04:37:02 they do create some garbage which later has to be collected, which can cause a pause. but if you're not logging excessively you're probably okay Dec 27 04:37:13 they usually have a constant setup at the top framework code Dec 27 04:37:18 you set to true Dec 27 04:37:19 even if logcat becomes a null-op when the usb is disconnected you still waste the time creating the strings that are sent to it Dec 27 04:37:22 and turns on all sorts of debugging Dec 27 04:38:09 rather tracing Dec 27 04:38:55 logcat doesn't become a null-op without usb. Dec 27 04:39:28 the Log functions are very expensive Dec 27 04:42:01 Hey guys.. anyone know why when I draw a bitmap image onto a canvas, it wont actually appear until I touch the screen/canvas again? Now, I can call the v.postInvalidate() and it shows up, but is there another way/reason? Dec 27 04:42:31 ondraw is implementation Dec 27 04:42:38 invalidate tells it to call ondraw Dec 27 04:42:59 Thanks. Dec 27 04:42:59 there are cases where draw gets called without YOU explicitly calling invalidate Dec 27 04:43:13 but invalidate needs to happen at somepoijnt Dec 27 04:43:52 Ah. That makes sense. I'm going to go look at my OnDraw again. Thanks! Dec 27 04:44:39 hey, i'm running the android emulator compiled from source; how do i install an APK file? Dec 27 04:44:55 adb install blah.apk Dec 27 04:45:51 thanks Dec 27 04:46:29 ok, I need some input here. I have an ongoing notification in which I want to put a couple of buttons for really quick access. The problem is that I do not know on beforehand how many buttons are needed as it is a configuration option by the user. Is there ANY way to add dynamic content to the notification bar? the only option is RemoteViews, but they only seem to be creatable from static Dec 27 04:46:29 xmls? (and yeah, you can't use setRemoteAdapter ...) Dec 27 04:48:50 setRemoteAdapter is just for scrollable widgets. for your case you could either add the button views to an existing viewgroup, or always have the max number of buttons and set the visibility of the ones that aren't used to gone . unless your max number of buttons is something really high Dec 27 04:49:12 0ne thing I've never doen Dec 27 04:49:19 widgets or ongoing notifications Dec 27 04:50:21 kevinb, that is actually pretty smart! albeit a crude hack, but I like it :) Dec 27 04:50:43 kevinb, I'm not sure it's possible to get a reference to the created view in the notification? Dec 27 04:51:25 not as a view no, but you can create/inflate the RemoteViews object when creating/updating the notification Dec 27 04:51:38 and I don't even know if that is "always" there or "created on the fly" when you watch it.. so i guess the best bet would be to just set visible/invisible Dec 27 04:51:44 and use the appropriate remote views method, rather than the view method, to change the visibility. Dec 27 04:52:01 yeah exactly Dec 27 04:52:14 but are there really no other way than inflating to creating a RemoteViews ? Dec 27 04:52:30 i think there is a public constructor but it's a pain to use Dec 27 04:53:29 RemoteViews(Parcel parcel) thats the only one I'm not sure about Dec 27 04:54:23 ron_frown: hope you didn't go to work today with that shiny new toy of yours :P Dec 27 04:54:38 newp Dec 27 04:54:44 went to work but nto with a huge knife Dec 27 04:54:55 thats good :) Dec 27 04:55:42 svearike: oh i think that's just the way it's created in the other process. basically you inflate the remoteviews, android parcels it, the notification bar (or launcher) unparcels it and creates the actual View tree from it. parcel is like serialize Dec 27 04:56:36 svearike: so just inflate it. but you can addView or setViewVisibility after inflating Dec 27 04:59:28 kevinb, yeah I'll try that, thanks for your help :) Dec 27 04:59:34 no problem Dec 27 05:06:28 ive added a text changed listener to a edittext widget. In the afterTextChanged(Editable s), can I get a pointer to the EditText field ? Dec 27 05:06:38 where do i find the adb command? i can't even find a platform-tools directory Dec 27 05:09:01 if you built emulator Dec 27 05:09:10 I am assuming you built entire android source? Dec 27 05:09:26 nevermind Dec 27 05:09:38 and find ./ -name "adb" Dec 27 05:09:38 haha Dec 27 05:20:01 why did they choose java for android? Dec 27 05:20:09 instead of native linux? Dec 27 05:20:15 because java is a largely java shop Dec 27 05:20:16 AND Dec 27 05:20:27 java already has the cross platform abilities for different architectures Dec 27 05:20:29 without having to recompile Dec 27 05:20:30 Java is a javashop? Dec 27 05:20:36 google Dec 27 05:20:39 sorry Dec 27 05:21:28 So they think they'll have to run android on different architectures besides ARM? Dec 27 05:21:39 they already do Dec 27 05:21:47 I thought they were all about optimizing for the primary case, and not edge cases... Dec 27 05:22:20 java is one of those things where avg joe is gonna potentially end up with better performance from java than c++ Dec 27 05:22:38 a c++ guru in optimization can build better stuff, at a definite time loss Dec 27 05:22:55 besides my opinions are specualtion anyway Dec 27 05:22:59 I am making assumptions Dec 27 05:23:03 you can build apps with c++ Dec 27 05:23:16 Yeah, I'm more baffled about the non-use of all the native linux out there. Dec 27 05:23:33 a maemo-like architecture, I thought, would be the mainstream mobile-linux architecture... Dec 27 05:23:33 meego tried that, and look how far they got Dec 27 05:23:51 Yes, but that's because that company made terrible business decisions (I think) Dec 27 05:24:02 meego had great libraries and stuff Dec 27 05:24:09 (they drop their users, hardware, and OS every generation...) Dec 27 05:24:16 Indeed, I'm still using my n900 Dec 27 05:24:19 the only way c++ native shit is going to fail unless it is the ONLY solution Dec 27 05:24:23 eg, apple Dec 27 05:24:26 because lets face it Dec 27 05:24:35 obj sucks balsl Dec 27 05:24:43 obj-c? Dec 27 05:24:49 I'm just starting to learn it.. Dec 27 05:25:02 I have an OpenGL-ES question Dec 27 05:25:13 Wish I could get my hands on a nexus 4 Dec 27 05:25:19 haha Dec 27 05:25:21 dnt we all Dec 27 05:25:22 I'd pay a little extra even (but not 2x the price) Dec 27 05:25:26 haha indeed Dec 27 05:25:59 i'm drawing static UI textures, all 4-vertex sets of tris as VBOs, like so: Dec 27 05:25:59 gl.glPushMatrix(); Dec 27 05:25:59 gl.glTranslatef(_angleUpX, _angleUpY, 0f); Dec 27 05:25:59 gl.glScalef(_arrowScaleX, _arrowScaleY, 1f); Dec 27 05:25:59 _upArrow.draw(gl); Dec 27 05:25:59 gl.glPopMatrix(); Dec 27 05:26:05 pastecode mayng Dec 27 05:26:17 and I do this for all the buttons, and it slows my framerate down like a boss Dec 27 05:26:25 runs fast w/o it Dec 27 05:26:37 is there a better way? Dec 27 05:29:04 I don't know... You'll have to think through it. What's happening when you hit a button? Why does it have to happen? etc.. Dec 27 05:29:21 the other way I was thinking would be to have a single UI texture of all the static stuff, but that would cause a lot of alpha blending Dec 27 05:29:45 well, they technically aren't buttons in the usual sense, all i'm drawinging there are the textures Dec 27 05:31:34 can u show your methode .draw(gl) code? Dec 27 05:31:52 sure, it's kinda long, is that ok to post? Dec 27 05:32:06 use pastecode Dec 27 05:32:12 what is that? Dec 27 05:32:13 c++ compiles so d*mn slow Dec 27 05:32:34 http://pastecode.org/ Dec 27 05:33:27 rgr, on it Dec 27 05:34:16 and link your code here Dec 27 05:34:33 anyone done profiling of their apps for perforamnce ? maybe even profiling of an app which uses jni coponents ? Dec 27 05:34:39 http://pastecode.org/index.php/view/0ffd3499 Dec 27 05:34:44 done Dec 27 05:34:46 i like that Dec 27 05:35:19 the translate and scales do not change once they are set Dec 27 05:37:30 i wonder if i could put android on an lg rumor touch Dec 27 05:37:35 code of RenderBMP class or only methode draw(..) Dec 27 05:38:20 ah, i'll post that too Dec 27 05:38:26 una moment Dec 27 05:38:27 o Dec 27 05:39:30 what a joke Dec 27 05:39:39 I see at least 5 nexus 4 ads on the walk to work Dec 27 05:39:42 renderbmp: http://pastecode.org/index.php/view/7fef35e6 Dec 27 05:39:43 and I can't fucking buy one! Dec 27 05:42:05 with the other parts it runs quite smoothly, but when I add the drawArrows function it slows down greatly Dec 27 05:42:24 ^without the drawArrows function it runs smoothly Dec 27 05:43:19 try glDrawTexfOES if u can Dec 27 05:43:34 googling it now Dec 27 05:44:28 oooh that would cut out a lot of work Dec 27 05:44:44 and would have saved me hours on the original devving 2 years ago when I started this project :p Dec 27 05:45:01 do all the pushes and pops slow it down? Dec 27 05:45:13 or could that be a problem? Dec 27 05:47:16 i dont think that Dec 27 05:47:52 that was my instinct too...ok, i'll give it a shot tomorrow when i'm awake and caffeniated :) Dec 27 05:47:55 thanks for the help! Dec 27 05:48:53 hey i had a hopefully quick q- I'm trying to allow pinch to zoom in a view pager. I've gotten it working, but I'm having trouble when the user pinches sideways-- the view pager intercepts the touch event and swipes to the next page. I want to do two things: stop the viewpager from intercepting touch events before some amount of vertical touch-slop occurs, and also send ACTION_CANCEL to the view pager if a second finger hit Dec 27 05:48:54 the touchscreen while it's half-paged. My understanding is that the tools I have to work with are OnInterceptTouchEvent, OnTouchEvent, and CanScroll, all in the ViewPager class. I can't quite get it working though and was hoping for some direction : ) Dec 27 05:52:53 my sdk manager wants to update stuff that is most current :/ Dec 27 05:53:50 sdk 21 -> sdk 21.0 Dec 27 05:54:09 platform-tools 16 -> 16.0 , etc Dec 27 05:55:33 hello Dec 27 05:56:10 how to access activity TextView from fragment? Dec 27 05:56:59 Cannot make a static reference to the non-static method findViewById(int) from the type Activity Dec 27 06:06:36 oi Dec 27 06:06:49 hi android devs .In my app i am trying to take a pic from camera and displaying in the imageview.Everything works fine but when i took pic from samsung galaxy s3 , it changes the orientation and displays the camera activity and onActivity result it displays the pic in the imageView but in a fraction of seconds it changes the orientation again removes the pic from imageview.It very weird how can i resolve this issue. Dec 27 06:09:56 Any ideas why messages that are meant to be logged are not being logged? Dec 27 06:10:06 ? Dec 27 06:10:14 perhaps be a bit more vague =) Dec 27 06:10:21 Good point :) Dec 27 06:10:31 calls to Log.d are not being displayed in Eclipse under the "logcat" tab. Dec 27 06:10:42 no filters in place? Dec 27 06:10:57 and correct device is selected? Dec 27 06:10:59 I had some, I removed them Dec 27 06:11:12 click ddms persepctive Dec 27 06:11:17 make sure device/emulator is selected Dec 27 06:11:26 seen that go wonky from time to time Dec 27 06:11:53 Perfect, thanks Dec 27 06:18:24 is it possible to use an outputstream and add to an existing txt file? Dec 27 06:18:56 Thanks again ron_frown Dec 27 06:19:00 nvmd, using append Dec 27 06:19:14 no problems Dec 27 06:19:33 i'm completely self taught and android has thrown me a TON of hurdles so figure if I can help others avoid em Dec 27 06:19:36 that much better Dec 27 06:20:05 Heh. That's my experience with Android as well. I hit the 200-hour mark yesterday. Dec 27 06:20:16 I have no idea how many hours Dec 27 06:20:29 and android keeps throwing hurdles :D Dec 27 06:20:29 I've basically reverse engineered a GOOD deal of the entire os in my porting adventures Dec 27 06:20:43 and then a shitload of other random stuff for our software Dec 27 06:21:07 * maslen is just a lowly student working on an MS thesis Dec 27 06:21:36 ui recommendations... I've got a entity thats fairly involved Dec 27 06:21:41 definitely too much info for one screen Dec 27 06:21:45 you guys think the Note II will be outdated quickly? Dec 27 06:21:48 (settings for the entity etc) Dec 27 06:22:03 internetishard: Sounds like it belongs in #android Dec 27 06:22:09 And do you think the stock android firmware (non-samsung) runs well on it? Dec 27 06:22:12 should I just create activity with viewpager and have the viewpager for all intents represent the one entity Dec 27 06:22:24 maslen: sorry, there's more brain in here though Dec 27 06:22:29 and diff frags display as different parts of the same? Dec 27 06:22:44 I almost need something like a wizard, but since not all the "screens" of the wizard are required Dec 27 06:22:52 I'd almost want them to act like a tabvirew Dec 27 06:22:53 view Dec 27 06:23:38 nevermind I think I just answered my own question =) Dec 27 06:23:58 :D Dec 27 06:24:41 oh I almost forgot Dec 27 06:25:19 my daily intellij love... intellij is badass... today the ide saved me a crapload of time, but I managed to get IOS project and android project building in teamcity Dec 27 06:25:22 sooo nice +) Dec 27 06:27:27 Hey I never really learned java fully but i've been programming for like over 10 years and I know everything about c++, what book should I read before I read a android dev tutorial Dec 27 06:27:54 if you understand programming concepts, I'd recommend just diving in Dec 27 06:28:00 honestly you can read and read and read Dec 27 06:28:14 but unless you have the actual context for half of that shit, its in one ear and out the other Dec 27 06:29:19 Miesco: I can dig up my teacher's slides if you're interested. I thought his Java course was really good. Dec 27 06:32:03 i read an interesting article today about Java being inspired from Obj-C ; from the guys who worked on Oak Dec 27 06:32:16 semantics of Obj-C/Smalltalk but Syntax of C Dec 27 06:32:23 C++ rather Dec 27 06:33:52 Miesco: i would recommend learning java first Dec 27 06:34:32 Which IDE do you use for android dev? Dec 27 06:34:58 hahahaha Dec 27 06:35:07 I highly recommend intellij ide 12 Dec 27 06:35:09 community Dec 27 06:35:10 idea Dec 27 06:35:14 it is sex. Dec 27 06:35:20 What's wrong with eclipse? Dec 27 06:35:30 where do I start Dec 27 06:35:38 compilation just randomly breaks Dec 27 06:35:39 What's wrong with netbeans? Dec 27 06:35:48 netbeans isnt updating android support is it? Dec 27 06:36:51 I use netbeans for c++, and for that on linux/mac Dec 27 06:36:54 I think its by far the best Dec 27 06:37:29 Why do you need ADT plugins? Dec 27 06:38:11 ? Dec 27 06:38:15 are you trolling? Dec 27 06:38:20 no Dec 27 06:38:27 I am new to android dev. Dec 27 06:38:53 ADT handles debugging, adb functionality, ddms, aapt ofr resource building etc Dec 27 06:38:57 you could do it all manually Dec 27 06:39:02 but I wouldnt recommend it =) Dec 27 06:39:31 Where can/would i run this command? android list targets Dec 27 06:40:16 lol Dec 27 06:40:17 XD Dec 27 06:40:18 for crying out loud... ongoing notification problem here again. anyone knows if it's possible to make the area scroll horizontally? I seem to recall the mobile does that when I plugin hearphones (it brings up a scrollable view of imagebuttons).. but how do I replicate it? Dec 27 06:40:23 tintin: Google has a very, very, nice tutorial. Follow it. Dec 27 06:48:06 what's a better option than Eclipse? Dec 27 06:48:22 emacs Dec 27 06:48:36 I'm a long-time user of Visual Studio, but there aren't any decent plugins for VS Dec 27 06:48:45 emacs is never a better option. Dec 27 06:48:52 option, yes. better, no. Dec 27 06:48:56 honestly eclipse... everything Dec 27 06:49:05 no experts on notifications in here :) Dec 27 06:49:05 everything is better Dec 27 06:49:19 intelliJ ... just say it :p Dec 27 06:49:26 * svearike silently adds a questionmark to his question Dec 27 06:49:56 does IntelliJ have the visual activity editor that Eclipse does? Dec 27 06:50:00 everyone knows my opinions on that Dec 27 06:50:04 its better Dec 27 06:50:07 if you mean layout editor Dec 27 06:50:12 yes, layout editor Dec 27 06:50:32 because editing XML by hand is ... barbaric. Dec 27 06:50:52 http://www.jetbrains.com/idea/img/version12/android-ui-designer.png Dec 27 06:51:01 bad example Dec 27 06:51:07 but drag drop works a lot better in intellij imo Dec 27 06:52:31 the free version of IDEA won't limit debugging or other essential features, will it? Dec 27 06:52:34 plus dark theme... forget about it... so much better on the eyes Dec 27 06:52:41 Pfhoenix for android development, no Dec 27 06:52:59 I use it daily basis, and I probably do more with android than most Dec 27 06:53:07 is jetbrains fast? Dec 27 06:53:15 try it Dec 27 06:53:30 g00s: Well I used to know java Dec 27 06:53:33 its different... understanding how modules fit together and facets etc Dec 27 06:53:41 its a bit diff, but worth the learning curve for sure Dec 27 06:53:46 free ... try ... never go back Dec 27 06:54:15 well, I'll download it and see how easily it setups for Android Dec 27 06:54:20 Eclipse was nearly a nightmare Dec 27 06:54:23 haha Dec 27 06:54:34 just install community, new project android, name it and crap Dec 27 06:54:35 hit run Dec 27 06:54:39 Do you still need eclipse for android apps? Dec 27 06:54:43 no Dec 27 06:54:54 the only thing stopping me from going hog wild with other IDEs is the potential for that much effort just to setup Dec 27 06:54:59 Is it the recommended choice still? Dec 27 06:55:02 honestly, I find something new to hate about Eclipse every day Dec 27 06:55:18 perhaps, but I know plenty fo google folk that use intellij =) Dec 27 06:55:38 eclipse used to have issues with my platform dev Dec 27 06:55:49 albeit platform source is a HUGE HUGE code base Dec 27 06:55:49 what sort of issues? Dec 27 06:56:08 open project and eclipse chugged along for a good 20 minutes then shit the bed Dec 27 06:56:23 oh, Eclipse had a problem Dec 27 06:56:26 that doesn't surprise me Dec 27 06:56:37 it looked like it was going to work lol Dec 27 06:57:08 so intelij has no problem for platform dev? Dec 27 06:57:24 So if you dont use eclipse anymore, what do you use? Dec 27 06:58:22 no... but platform dev is very different Dec 27 06:58:32 I dont anticipate many people needing that or having a problem with that Dec 27 06:58:59 what sort of platform dev do you do? Dec 27 06:59:06 custom OS? Dec 27 06:59:31 yeah Dec 27 06:59:38 very very specialized hardware Dec 27 06:59:49 lots of very specifc hardware intefaces Dec 27 06:59:51 g00s: How should I learn java again? Dec 27 07:00:10 Miesco thinking in java by bruce eckel is a great book and very available for free in ebook form Dec 27 07:00:25 Also is java gunna be thrown away by oracle or something? If I learn java will it go away soon? Dec 27 07:00:26 yeah but its pre java 5 Dec 27 07:00:33 what idea should i get ron_frown Dec 27 07:00:36 bruce doesn't give a shit about java anymore :) Dec 27 07:00:45 idea 12 community Dec 27 07:00:47 g00s: Is java bad now? Dec 27 07:00:53 g00s maybe so, I dont blame him to be honest Dec 27 07:01:01 as of late anything oracle touches turns to shit Dec 27 07:01:14 just like king midas, but in reverso world Dec 27 07:01:26 ron_frown: What did oracle do to java? Dec 27 07:01:48 they came and pissed off what I think of as the "governing body' Dec 27 07:01:53 ron_frown, is it free and how do i setup android sdk and jdk? Dec 27 07:01:54 people that come up with java standards Dec 27 07:01:59 then they start suing the fuck out of everyone Dec 27 07:02:06 even though java was open Dec 27 07:02:19 javas not going anywhere Dec 27 07:02:25 ron_frown, ? Dec 27 07:02:28 so i guess that oracle / google thing isn't over yet. round 2 Dec 27 07:02:33 haha Dec 27 07:02:37 Will android use a different language soon? Dec 27 07:02:43 Is intelliJ a open source software? Dec 27 07:02:50 yes' Dec 27 07:02:54 I'd *LOVE* to see google just say fuck it and go with mono Dec 27 07:03:13 I dont think they would, but like it or not, .net is a far superior platform Dec 27 07:03:15 and mono is mature Dec 27 07:03:33 Is 'f**k' allowed here? or is it a vulgur language? Dec 27 07:03:47 So should i say to watch your language? Dec 27 07:03:51 ron_frown, how do i setup ANDROID SDK FOR IDEA? Dec 27 07:03:52 no you shouldnt. Dec 27 07:03:56 install it Dec 27 07:04:11 Calm down and take it as family friendly channel. Dec 27 07:04:15 go into preferences and android and tell it where the sdk targets are Dec 27 07:04:22 I cuss around my family Dec 27 07:04:24 * ron_frown shrugs Dec 27 07:05:17 How come you used to have to use Eclipse and now you dont? Dec 27 07:05:53 just a matter of other IDEs supporting the Android SDK/NDK Dec 27 07:05:59 I dont mean to be un-appreciative of what eclipse has done etc... but just because something "techincally works" doesnt mean its not a pos Dec 27 07:06:40 oh, and ron_frown : I don't get all excited about dark themes because I've been using a dark theme in my editors for years now Dec 27 07:06:44 eclipse is VERY capable Dec 27 07:06:50 but it does a lot of things so so Dec 27 07:06:56 so much better for contrast and quick identification of symbols Dec 27 07:07:05 Pfhoenix as have I, but doing that in eclipse was meh Dec 27 07:07:32 eclipse is an IDE framework. If you have a rich client you would like to make for the desktop, and it is project-based, then eclipse is your huckleberry. Dec 27 07:07:34 setting Eclipse up was a pain Dec 27 07:07:36 idea is an ide Dec 27 07:07:37 how come a Button with a 9patch bg will expand as much as it can even though the height and width is set to wrap_content? o_O Dec 27 07:07:46 so, IDEA 12 comes with the latest Android SDK support? Dec 27 07:07:59 seems odd that I don't have to tell it where stuff is located on-drive Dec 27 07:08:20 it needs to know about platforms etc Dec 27 07:08:21 also, eclipse comes with some nice plugins like xtext … and if you want scala support, its free in eclipse but intellij costs $$$ Dec 27 07:08:24 but not adt Dec 27 07:08:38 yeah Dec 27 07:08:38 so it depends on what things you will do with eclipse; maybe outside android dev Dec 27 07:09:00 Is android developing hard or easy? Dec 27 07:09:10 Is learning android dev easy/hard? Dec 27 07:09:40 I think its easy Dec 27 07:09:48 depends on your aptitude. Dec 27 07:09:49 I've been doing it for quite some time now tho Dec 27 07:09:59 my attitude is SHIT Dec 27 07:10:01 oh aptitude Dec 27 07:10:02 haha Dec 27 07:10:04 i find it difficult , heh Dec 27 07:10:11 some things are easy for some and difficult for others Dec 27 07:10:20 I dont find it difficult, I just find it more time consuming than it should be Dec 27 07:10:25 i think there is too much unnecessary complexity, callbacks, legacy shit, etc Dec 27 07:10:25 I think it's easy *if* you know at least some Java, and you're willing to take a little time to actually learn how Android does things, rather than - say - trying to force your iOS or J2ME knowledge onto it Dec 27 07:10:59 Leeds - how best to explain concepts of intents and activitties to people with no prior android knowlege Dec 27 07:11:18 activities are easy... intents are a form of IPC Dec 27 07:11:22 inter/intra Dec 27 07:11:30 I rememebr trying to tell my boss I could effectively consume and use activities in other applications that were exported as if they were my activity Dec 27 07:11:33 he just didnt get it Dec 27 07:11:48 so its like a shared library? no. Dec 27 07:12:11 an intent is a "screen"? no Dec 27 07:12:30 of course I spent about 4hr trying to explain IOS's assinine signing/provisioning Dec 27 07:12:48 finally just ending the convo with you pay me the big bucks to know this shit, just trust me? Dec 27 07:12:49 haha Dec 27 07:13:29 I came from web devs Dec 27 07:13:39 I know C/C++/Java/PHP Dec 27 07:13:39 i came from the interwebs Dec 27 07:13:51 So why was the only way to make android apps was to use eclipse? Dec 27 07:14:00 Miesco: it's not. Dec 27 07:14:04 It seems, android dev is to much using xml file and editing xml Dec 27 07:14:09 an intent is a message, which can either be sent to an explicit destination, broadcast to allow the user to choose a single destination, or sent to all interested application components on the system Dec 27 07:14:12 tintin: it's nont Dec 27 07:14:22 my ancestors were not of this planet Dec 27 07:14:43 ron_frown: What do you mean? Dec 27 07:14:49 ron_frown: that explains some things Dec 27 07:15:00 your's probably werent either Dec 27 07:15:07 a message with an action of some sort, which can be as simple as "RUN THIS", or much more complex, depending on the options set and extra data attached Dec 27 07:15:22 is that so complicated? Dec 27 07:15:27 ok.. someone should be getting their ass kicked... who designed RemoteViews?! who said it was a good idea to allow Buttons but not to change their text? Dec 27 07:15:45 I have no problem understanding, just hard time explaining to someone who has a hard time understanding Dec 27 07:16:39 intent is like your voice. You speak out loud your intention and whoever listen to it will respond if they feel like it Dec 27 07:16:58 heh Dec 27 07:16:58 I dont subscribe to all the reptillian theory... but there are some impossible changes that have happened with human genetics and stuff ~20k years ago Dec 27 07:16:59 ron_frown: doesn't android dev use too much xml ? Dec 27 07:17:07 vs what Dec 27 07:17:10 something like xaml in .net? Dec 27 07:17:18 any xml is too much xml :D Dec 27 07:17:22 I concur Dec 27 07:17:30 but vs alternatives, I dont know Dec 27 07:17:35 I like qtquick using json Dec 27 07:17:37 ron_frown: Why xml instead of using json format data? Dec 27 07:17:47 android is old man, Dec 27 07:17:55 was json even out when android started ? Dec 27 07:17:58 well first of all json doesnt have standard types for a ton of string formats Dec 27 07:18:00 g00s: Why is android old? Dec 27 07:18:11 s/string// Dec 27 07:18:25 json is just now coming into its own Dec 27 07:18:41 evne like 5yr ago, people that were using json for api's were the bleeding edge social companies Dec 27 07:18:44 and really not much else Dec 27 07:18:54 android started in 2003 Dec 27 07:18:55 5yr is probably innacurate Dec 27 07:19:02 holy shit, its almost 10 years old :D Dec 27 07:19:03 my perception of time is completely and utterly jacked Dec 27 07:19:18 g00s which is sadder that ios was out prior, and still looks the same Dec 27 07:19:35 ios prior to 2003, eh :D Dec 27 07:20:01 ron_frown: json? or SOAP? Dec 27 07:20:03 So you mean to tell me that 4 years ago you could use vim to make android apps? Dec 27 07:20:12 Android was started in 2003, but even 1.0 bore very little relationship to that first thing, I think Dec 27 07:20:24 Miesco: I've been making Android apps in vim since around 1.0 days Dec 27 07:20:42 Leeds: Aw man, I was doing it wrong! Dec 27 07:20:44 think of all the people that have had to work with whats her face Dec 27 07:20:46 feel so bad Dec 27 07:20:56 hehe Dec 27 07:21:04 i think i know who ron is referring to Dec 27 07:21:11 she knows her shit, but god damn it Dec 27 07:21:17 shes rude as hell and short Dec 27 07:21:22 like BOFH Dec 27 07:21:23 haha Dec 27 07:21:27 So does android use xml because json wasn't invented then? Dec 27 07:21:33 why does it matter Dec 27 07:21:36 its not going to change Dec 27 07:21:39 her personal website has s&m stuff or something, it was crazy Dec 27 07:21:41 it gets compiled to binary xml Dec 27 07:21:42 tintin: json still isn't really 'invented' Dec 27 07:21:52 g00s: who? Dec 27 07:21:59 oh … nm Dec 27 07:22:05 Leeds: What do you mean? Dec 27 07:22:11 tintin: it's pretty much a pragmatic "if your data looks something like *this*, most parsers will vaguely understand it" Dec 27 07:22:23 g00s: yeah, no need to get personal... Dec 27 07:22:24 I feel like I am talking to my daughter Dec 27 07:22:37 why do cars have wheels,... so they can roll around... ok but why Dec 27 07:22:46 I dont know... squares wouldnt work? Dec 27 07:22:52 why? Dec 27 07:22:55 precisely Dec 27 07:23:44 android list targets , is it to run from terminal? Dec 27 07:23:44 JakeWharton you around buddy? Dec 27 07:26:49 ron_frown: What to do with JakeWharton ? Dec 27 07:27:04 ? Dec 27 07:27:06 haha Dec 27 07:27:12 android is old? then what is newer? Dec 27 07:27:30 tintin gotta be trollin Dec 27 07:27:39 Do you prefer mobile app develping or web developing? Dec 27 07:27:41 ron_frown: NO Dec 27 07:27:54 ron_frown: Someone said here that android is old. Dec 27 07:28:02 who cares if it is Dec 27 07:28:07 they are making huge progress all the time Dec 27 07:28:10 and its got the market share Dec 27 07:28:31 its like DOS in the 80s Dec 27 07:28:43 seems like Theme.Sherlock stomps on Theme.PageIndicatorDefaults Dec 27 07:28:44 boo Dec 27 07:34:03 wow Dec 27 07:34:07 that was surprisingly painless Dec 27 07:34:15 +1 to you, ron Dec 27 07:34:22 I'll be using IDEA until it shits on me Dec 27 07:34:23 np Dec 27 07:34:25 ahah Dec 27 07:34:29 ask if you have any questions Dec 27 07:34:34 there are some caveats in a few places Dec 27 07:34:38 such as? Dec 27 07:35:33 adding libraries is a bit diff Dec 27 07:35:38 adding library projects as well Dec 27 07:35:43 but not too painful Dec 27 07:37:45 So how many days will it for me to become and expert android developer? My Background: C/C++,Java,PHP,Javascript Dec 27 07:38:03 to become an expert Dec 27 07:40:33 a long time, if you feel the need to ask such a question Dec 27 07:40:43 ron_frown: wat Dec 27 07:41:02 fu JakeWharton Dec 27 07:41:13 you know how to delay JUST long enough for me to solve my own problems ;=) Dec 27 07:41:20 it's a gift Dec 27 07:41:33 undoubtedly how you still participate in opensource =0 Dec 27 07:42:21 it's just about the only way to participate in open source Dec 27 07:42:22 my vpi themes were stomping on sherlock themes Dec 27 07:42:29 i tried to answer everyone's emails initially Dec 27 07:42:33 but I found reference to someone else with same problem Dec 27 07:43:12 yeah you basically have to create your own theme, inherit from sherlock, and add in the VPI attributes Dec 27 07:43:17 yay Android Dec 27 07:43:20 haha Dec 27 07:43:21 well it works Dec 27 07:43:30 I dont care about the implementation that much +) Dec 27 07:44:56 heading to bed since i'm still on east coast time. adios Dec 27 07:45:02 guys, I'm current writing a media player. The idea is to make the media player store the last location played during error and play from the point which the player encountered error. Problem is when I get the the current position of the video on onError, it will always be 0. So, any suggestion at which point I can get the position? Dec 27 07:45:27 peace Dec 27 07:45:38 bye JakeWharton Dec 27 07:50:56 can you compile cyanogenmod in os x? Dec 27 07:55:46 ah nvm. Found it Dec 27 08:00:34 is there any third party stable embedded video player? Dec 27 08:04:04 anyone knows if I must define my activity in some strange way to make it work with RemoteViews / PendingIntent / setOnClickPendingIntent Dec 27 08:04:34 as far as I know, I've set everything up, but still the activity isn't fired up as it should Dec 27 08:06:52 oh nice, IDEA shows you what line the matching brace/bracket is for Dec 27 08:14:18 doesn't vi do that :P Dec 27 08:14:57 yeah I think you can even get eclipse to do that Dec 27 08:15:06 but yeah I suspect you are going to be very hapy with idea Dec 27 08:29:44 what is difference between pager and state pager? Dec 27 08:36:10 how to make a moon shape ? :) Dec 27 08:40:14 Cant believe how cool aide is Dec 27 09:11:47 okay, maybe i can talk in here, so my question is this: i've got some code in an app that populates a GridView using a ArrayAdapter as described in the docs. after i do gv.setAdapter(aa) i want to call some other code that sets the fontface on the child views of the gridview. strangely, when the activity first runs, the gridview seems to have 0 children and the font face setting code doesn't work. am i asking this in the right Dec 27 09:12:03 to verify, i put some logging statements and i can see that gv.getChildCount() is returning 0 the when i run it after setting the adapter. however, when i run it later on (say, by pushing a button on the actionbar, i can see that gridview has 6 children and the font face changing code works cleanly). specifically, i guess i'm wondering how to tell when android has finished drawing the child views of a grid view, how to know when Dec 27 09:12:31 maybe i need some sort of 'onHierarchyChangeListener' inside my ViewGroup. any suggestions from the folks here would be welcomed. Dec 27 09:17:33 aloha ... got hopefully a simple question ... i need to identify a specific device (doesn't need to be 100% unique), but i don't wan't to add additional permissions to the application ... i was thinking of generating an uuid and storing it somewhere, the question is where ... but it has to be somewhere where the user can't change it Dec 27 09:17:37 ideas? Dec 27 09:36:43 freakolowsky: the backend Dec 27 09:37:46 shared preference? Dec 27 09:38:17 this maybe? Dec 27 09:38:18 http://android-developers.blogspot.com/2011/03/identifying-app-installations.html Dec 27 09:38:40 'ello Dec 27 09:40:34 has anyone ported/released a jellybean camera update for the nexus 7? Dec 27 09:40:46 panorama was working before the latest OTA and now it force-closes Dec 27 09:41:05 (the camera app is not officially supported on devices without rear facing cameras) Dec 27 09:43:10 mm... Dec 27 09:43:24 it wasn't working for me before last ota Dec 27 09:44:34 Maziz: hmmm ... good idea ... thanks for the link Dec 27 09:45:08 cheers Dec 27 09:53:48 can I use compound layout xml file (textviews + imageviews) as drawable for tab state-list? Dec 27 09:57:41 Maziz, very interesting, thanks for sharing Dec 27 09:58:08 np Dec 27 09:58:36 Is it only me or is the background of my app light blue? Dec 27 09:58:41 hm Dec 27 10:02:54 Galaxy S3, a rotation animation is shown when going from a normal portrait activity to camera activity and coming back which is calling onDestroy method and all my layout got refreshed.Anybody know how can i stop this rotation Dec 27 10:02:55 ? Dec 27 10:07:01 android:configChanges="orientation" Dec 27 10:08:01 styling the progress spinner in the action bar is HELL Dec 27 10:10:09 How did the background of my app become light blue? http://62.168.145.82/app.png Dec 27 10:10:15 I dont have light blue in any of the image elements Dec 27 10:10:22 Is it some kind of default? Dec 27 10:13:03 Ubububu : this does'nt work? Dec 27 10:13:17 anli_: I see no light blue Dec 27 10:13:26 look at the plate Dec 27 10:13:28 Its white Dec 27 10:13:43 anli_, this is blue? Dec 27 10:13:47 i see grey Dec 27 10:13:48 Maybe gray then Dec 27 10:14:25 the white plate on gray background makes perfect design sense. Dec 27 10:14:34 consider it an accidental improvement. Dec 27 10:14:50 Android03: documentation: When a configuration change occurs at runtime, the activity is shut down and restarted by default, but declaring a configuration with this attribute will prevent the activity from being restarted. Dec 27 10:14:54 haha yeah Dec 27 10:15:25 oh and one more thing anli_, procent is not English Dec 27 10:15:32 percent is correct Dec 27 10:15:35 unless that's an intention Dec 27 10:16:01 Ubububu : ok i try once again. Dec 27 10:16:17 Its a gradient bg I see now Dec 27 10:16:28 Android03: try override onConfigurationChanged() Dec 27 10:16:39 I only asked about the background Dec 27 10:17:08 anli_, yes i know i just wanted to see if that's correct Dec 27 10:17:21 This is a "theme" thing, right? Dec 27 10:24:48 android:Widget.ProgressBar.Small Dec 27 10:24:54 is this available on SDK version 8? Dec 27 10:25:51 Ubububu : hey that stuff is also not working Dec 27 10:26:17 Ubububu : http://stackoverflow.com/questions/11957772/disable-default-animation-from-portrait-to-landscape : what is your comment on this Dec 27 10:26:35 Ubububu: They say it is not possible Dec 27 10:33:27 so much hate for intellij right now Dec 27 10:44:21 can anybody help me on this :Galaxy S3, a rotation animation is shown when going from a normal portrait activity to camera activity and coming back which is calling onDestroy method and all my layout got refreshed.Anybody know how can i stop this rotation Dec 27 10:51:35 I am trying to pass the sharedpreferences as an argument to doinbackground function in asynctask. I am already passing a string(url) to it so, I would need to pass the prefs also as a string. Can I simply use, prefs.toString() to convert it into string? Dec 27 10:55:22 http://stackoverflow.com/questions/14053518/passing-sharedpreferences-to-doinbackground Dec 27 10:55:29 this is the question. Dec 27 11:20:42 wheee, going to wrangle my N4 from customs. AFK Dec 27 11:32:08 suggest me a digital clock font for android? Dec 27 11:54:08 any tips on how to solve the exception "You cannot combine custom titles with other title features" after having introduced Holo theme Dec 27 11:55:43 I think it has to do with FEATURE_CUSTOM_TITLE Dec 27 12:07:51 hello everyone? Dec 27 12:28:45 falo: what's up Dec 27 12:39:34 I'm tired. Forgive me. What's the best way to do a "match_parent" height, but instead, achieve a 90% of area height? Dec 27 12:40:07 if not XML, then I'll adjust it programmatically... but I was just hoping for a quick solution. Dec 27 12:41:17 padding? margin? something like that Dec 27 12:42:35 that might do it. hmm Dec 27 12:42:48 maybe I'll have to get the height and then subtract some programmatically. we'll see Dec 27 12:42:54 IT... JUST... MIGHT .... WORK !!!!!! Dec 27 12:43:00 :P Dec 27 12:43:12 lol Dec 27 12:43:13 set a pct for the padding Dec 27 12:44:30 I've been using this "dip" and "dp"'s for too long now without knowing their relevance. Want to fill me in? Dec 27 12:44:51 I keep thinking "DPI" but never went and looked. Dec 27 12:45:01 When I tried to add a widget, I had to choose between completing that task either by using alarm clock plus or "docking mode", how are they related to widgets? Dec 27 12:45:24 :p Dec 27 12:46:39 I don't think they are... Dec 27 12:46:52 Do I have some app installed that is confusing android? Dec 27 12:47:04 Maybe I should just uninstall that alarm clock plus app Dec 27 12:47:07 My guess is that they are set up as a default receiver for something, similar to an mp3 player set to receive an mp3 by default? Dec 27 12:47:50 How can an app be registered as program for adding a widget? :) Dec 27 12:47:51 I wouldn't suggest confusing... but rather, that software is listening for certain requests and it is offering to handle the request for you.... Dec 27 12:48:09 But the system knows how to add widgets, doesnt it? Dec 27 12:48:16 It just adds them, so to say Dec 27 12:48:28 It had no problems doing it before Dec 27 12:48:29 That's a good question. Sure. Makes sense and all... who knows? o_O Dec 27 12:48:35 adding widgets to the launcher? Dec 27 12:48:57 strange Dec 27 12:49:07 widgets could only be added to the desktop Dec 27 12:49:12 given that you can replace the launcher, adding a widget isn't really a system thing Dec 27 12:49:33 ^^ listen to Leeds. He actually knows something. Dec 27 12:49:37 Well, I could add widgets when the phone was freshly installed, its kind of a system thing Dec 27 12:49:40 hehe Dec 27 12:49:44 no, it's a launcher thing Dec 27 12:49:46 ok Dec 27 12:50:05 When I had no launchers to choose between, which app was the launcher back then? Dec 27 12:50:48 the stock launcher :) Dec 27 12:51:01 Ah, does it have a name, how can I choose it? Dec 27 12:51:03 :) Dec 27 12:51:15 How can I make it permanent for every try of adding widgets Dec 27 12:51:32 what launcher are you using now? Dec 27 12:51:44 I have no widgets added by now Dec 27 12:51:49 wait, wrong Dec 27 12:51:59 I have one, its airplane mode, an icon sized widget Dec 27 12:52:26 um... Dec 27 12:52:29 I added it without specifying a launcher Dec 27 12:52:52 When I click that widget, it will look lit Dec 27 12:53:03 A green bar will lit up Dec 27 12:53:16 Hard to describe, the icon will change appearance however Dec 27 12:53:18 can I be bothered? Dec 27 12:53:21 what launcher are you using now? Dec 27 12:53:38 I dont know, I dont even know how a launcher can apply Dec 27 12:53:47 Maybe we are not talking about the same thing Dec 27 12:53:59 I am talking about widgets that will appear permanently on the desktop Dec 27 12:54:03 On an android phone Dec 27 12:54:10 are you developing a widget? Dec 27 12:54:23 I will, but the one I tried to add was not developed by me Dec 27 12:54:43 Maybe that widget had a strange property that widgets does not have normally? Dec 27 12:54:54 I try to add another one, one that comes with the phone Dec 27 12:55:15 ok, I'm going to walk away now before I get frustrated and rude Dec 27 12:56:03 I managed to add a widget that comes with the phone, so it is actually something wrong with the app I tried to add, sorry for making you upset Dec 27 12:57:12 I maybe use the word "add widget" in the wrong way, I refer to going into settings and click custoomize and then click "Widget" Dec 27 12:57:18 -o Dec 27 13:00:25 what phone are you using? Dec 27 13:01:39 htc evo 3d Dec 27 13:02:48 I think the app is misprogrammed, wonder if those widgets has been on a desktop ever Dec 27 13:03:04 Asking the guy that developed the app now Dec 27 14:16:16 well it seems my plugin made it through inspection :) for IDEA: http://plugins.jetbrains.com/plugin?pr=&pluginId=7146 Dec 27 14:20:38 Can I use shapes for buttons? Dec 27 14:20:42 xorgate what plugin? Dec 27 14:20:52 nevermind Dec 27 14:20:55 link =) Dec 27 14:21:15 is there a screenshot? Dec 27 14:21:18 yeah hold on Dec 27 14:21:24 I'm working on my first plugin Dec 27 14:21:32 perforce scm light Dec 27 14:22:14 so community can connect to perforce, but not provide anywhere near functionality of perforce plugin in ultimate Dec 27 14:23:23 ron_frown it looks slightly different now, http://i.imgur.com/JDvUf.png you can specify a list with description+regex_for_filename Dec 27 14:23:27 Hi, what can be issue when i click on Spinner item it does not show in spinner "window" .. like when you set text to spinner or so ? Dec 27 14:24:03 xorgate I dont quite get what its doing Dec 27 14:24:08 oh Dec 27 14:24:15 for example i name my activities Activity_bla.java so they all wind up in 1 column Dec 27 14:24:15 when you want to switch you can pop it up Dec 27 14:24:22 and find stuff easily Dec 27 14:24:25 yes like Switcher now Dec 27 14:24:30 I dont use switcher Dec 27 14:24:57 Can a shape only be set as background? I want to use it as element Dec 27 14:26:40 ron_frown whats your plugin do? Dec 27 14:26:42 Someone can give me ann advice what to do ? after selecting Item in spinner i dont see it seelected, my spinner window is clear Dec 27 14:27:04 source control provider Dec 27 14:27:12 ultimate has a perforce plugin Dec 27 14:27:24 but thats LITEARLLY all we'd use from ultimate over community Dec 27 14:27:32 so I figure write something that gets JUST the basics done Dec 27 14:27:52 check out on edit, check in and revert Dec 27 14:28:20 I dont want to piss intellij off, but we inquired about licensing just that one plugin and never got any responses Dec 27 14:28:34 figure this way I'm not jeopardizing their business for community Dec 27 14:30:06 er for ultimate Dec 27 14:31:21 hi again Dec 27 14:31:35 ONE MORE QUESTION ABOUT PUBLISHING AN APP ON GOOGLE PLAY Dec 27 14:31:36 ... Dec 27 14:32:13 regarding to "Deciding whether you app will be free or paid is important because, on Google Play, free apps must remain free." Dec 27 14:32:38 once its free Dec 27 14:32:40 what i have to do to be able to upload an DONATE VERSION of the same application, i meen is the same version, nothing new but with let's say 0.5 euro price for who wants to donate Dec 27 14:32:40 it stays free Dec 27 14:32:59 firstly, there are minimum prices, 0.5EUR might be too low... Dec 27 14:33:12 it was an example Dec 27 14:33:14 you need to use a different package name, mainly Dec 27 14:33:40 if the free package name is com.first.free.app Dec 27 14:33:49 the identifier of an app is the package name - if you view an app on the play store website, you can see the name in the URL... you need to have a different one for the paid and free versions Dec 27 14:34:08 only this? Dec 27 14:34:15 if you're clever, you set up the two versions to be able to share some data, so if your users 'upgrade' to pay, they don't lose their data Dec 27 14:34:17 i am able to use the same sign key? Dec 27 14:34:37 you can use a single key for as many apps as you like, 1 or many Dec 27 14:34:56 ok :) Dec 27 14:35:13 no,not for now, the user won't have any data Dec 27 14:35:16 and you *may* need to use the same key to be able to share data, I'm not sure Dec 27 14:35:22 is an simple app for now Dec 27 14:36:13 and you *may* need to use the same key to be able to share data, I'm not sure i don't understand what you're trying to tell my (sorry for my english) Dec 27 14:36:22 Guys, when you are talking here, please give ma advice, why after i choose an item from Spinner list , when list dissapears it isnt written in spinner itself ?: (:(:( PLEASE give me an advice Dec 27 14:36:41 @Dosp Dec 27 14:36:48 i work with sinner to Dec 27 14:36:52 i will send you the code Dec 27 14:36:57 as an pm on irc Dec 27 14:37:07 okey thanks Dec 27 14:37:16 i shall describe it there what happening Dec 27 14:40:11 ibancioiu: if you want to share data between two apps - and you said you don't want to - you might need to sign both apps with the same key Dec 27 14:41:00 ok Dec 27 14:41:07 i don't need to share data Dec 27 14:41:18 because the app is reading data from static file Dec 27 14:41:30 so the informations are inside the apk Dec 27 14:41:48 the user can't change anything yet Dec 27 14:42:38 still a good idea, I think Dec 27 14:43:25 one more thig Dec 27 14:43:39 if i create a new version of free app with some new staf Dec 27 14:43:41 any idea how to get that gd "home < back , etc " status bar to go the hell away on the tablet? its interfering with my Dialog ... ug. Dec 27 14:43:59 i have to change just de version code Dec 27 14:44:05 from for example 1 to 2 Dec 27 14:44:05 ? Dec 27 14:44:17 can I use compound layout xml file (textviews + imageviews) as drawable for tab state-list? Dec 27 14:44:29 and how to make a moon shape ? :) Dec 27 14:45:43 or i have to change something else to show update notify on gplay Dec 27 14:45:54 i didn't payed my dev account yet Dec 27 14:46:00 i will pay for it next week Dec 27 14:46:07 that why i ask you Dec 27 14:47:43 i have a question about android phones Dec 27 14:47:47 will it blend? Dec 27 14:49:24 o... bend? Dec 27 14:49:50 or do you intent to try to frappe one? Dec 27 14:50:47 ibancioiu: just upload a new version with a higher version code, yes Dec 27 14:51:18 ok Dec 27 14:51:20 thank you! Dec 27 14:51:47 Has anyone here worked with IABv3 using the test products such as android.test.purchased? I cannot get the test items to work like they did in IABv2. Dec 27 14:57:31 hey guys, I have a bit of a problem -- can't change anything inside of LayoutParams for my LinearLayout (say topMargin). However the log shows that topMargin really IS changed. I tried calling requestLayout and forceLayout on a parent of LinearLayout -- no use. Please help. Dec 27 14:57:31 hey guys, I have a bit of a problem -- can't change anything inside of LayoutParams for my LinearLayout (say topMargin). However the log shows that topMargin really IS changed. I tried calling requestLayout and forceLayout on a parent of LinearLayout -- no use. Please help. Dec 27 14:57:31 hey guys, I have a bit of a problem -- can't change anything inside of LayoutParams for my LinearLayout (say topMargin). However the log shows that topMargin really IS changed. I tried calling requestLayout and forceLayout on a parent of LinearLayout -- no use. Please help. Dec 27 14:57:36 sorry Dec 27 14:57:54 didn't mean to spam 3 times in a row Dec 27 15:00:32 I've asked my question here -- http://stackoverflow.com/questions/14056086/android-how-to-programmatically-change-not-set-for-the-first-time-linearlay Dec 27 15:00:37 any way to keep the 'soft' back button on the tablet from coming up with my dialog? Dec 27 15:01:00 yes, adjustPan Dec 27 15:01:13 android:windowSoftInputMode="adjustPan" Dec 27 15:01:23 thanks! Dec 27 15:03:01 guys, hadn't anyone have to deal with resetting some LayoutParams??? Dec 27 15:03:11 Has anyone here worked with IABv3 using the test products such as android.test.purchased? I cannot get the test items to work like they did in IABv2. Dec 27 15:04:57 /QUOTE LIST -h Dec 27 15:09:56 hey guys, I have a bit of a problem -- can't change anything inside of LayoutParams for my LinearLayout (say topMargin). However the log shows that topMargin really IS changed. I tried calling requestLayout and forceLayout on a parent of LinearLayout -- no use. Please help. Dec 27 15:20:43 hi everyone Dec 27 15:21:08 can we calculate the time an app was in foreground ... Dec 27 15:21:15 i need it for analytics purpose Dec 27 15:27:25 don't you get an event when it goes background ? Dec 27 15:32:21 in activities onPause() is called when an activity goes to background Dec 27 15:33:48 what if i have 2 variable ... one i instantiate with system time in onStart() when activity gets created , the other i instantiate when applicatation gets onPause()... Dec 27 15:34:21 but i am unable to do this because there is no onPause() method for a class in application scope Dec 27 16:17:29 Can anyone explain me how to use android support library v7? (I want to use gridlayout on older devices). If I just include the .jar, I get a class not found exception (The auto-generated class is missing). I tried importing the library as a eclipse project, but when trying to run my application, it says there's a missing apk... Dec 27 16:22:10 FelipeAbella, put it in the libs directory Dec 27 16:23:20 leslie, already tried, doesn't work. Looks the like the ".jar" itself doesn't include the auto-generated classes Dec 27 16:23:55 I'm not sure what auto-generated classes you're referring to Dec 27 16:24:11 do you mean R? Dec 27 16:24:34 leslie, yes Dec 27 16:24:48 ok. delete the gen, build and bin directories and rebuild Dec 27 16:25:03 make sure you refresh the project in Eclipse too Dec 27 16:27:53 leslie, I tried importing the library another way, putting it as a eclipse project instead of just including the .jar, looks like it generated the R files Dec 27 16:28:19 ok, but that might lead to ClassNotFound errors at runtime Dec 27 16:30:26 leslie, i see, but the .jar is still at the "libs/" (don't know if it's because I put it there on another attempt, and forgot to remove, or the eclipse itself just did) Dec 27 16:30:41 ok. that should be fine then Dec 27 16:31:10 what I usually do is add it to the libs directory, then in Eclipse, right click and go to Build Path -> Add To Build Path Dec 27 16:33:14 leslie, i see, it worked! =), the problem was that I tried to put the library as a dependency using the list "Required projects on the build path:" on "Java Build Path", I didn't see there was a list of android-specific library dependencies on section "Android" Dec 27 16:33:32 ahh ok Dec 27 17:09:11 I've got some views in a complicated layout that have onClickListeners set, but they're not getting triggered. It seems like something is maybe intercepting the clicks from them, but there is nothing apparent in the layout editor. I've got Hierarchy Viewer set up and running… anyone have any ideas how I might diagnose this? Dec 27 17:12:32 try setting the attribute clickable for your views - i.e. set to true for any view you want to interact with and false for all view that might overlap your clickable views. Dec 27 17:15:33 thanks, will give that a shot Dec 27 17:35:33 hi Dec 27 17:35:36 what is faster Dec 27 17:35:41 sqllite db or straight xml db ? Dec 27 17:35:46 i mean xml to file ? Dec 27 17:36:02 or even crazier, xml to slqlite Dec 27 17:37:54 for reading, sqllite Dec 27 17:37:58 for writing to file, sqllite Dec 27 17:38:11 xml is text processing and slow, even when compressed/processed Dec 27 17:38:41 hmm ... Dec 27 17:38:56 so i should not serialize to xml first then and instead use proper normalized db ? Dec 27 17:40:50 i've tried all launchMode's yet it does not seem to work :S → suppose App A has various activities, J & K. J is the initial one (to choose app mode), which calls K where the main things happen. if i click "Home" button in K, and then open the app again, it opens a new instance of A with activity J Dec 27 17:40:58 thanks a lot Dec 27 17:51:31 Hello everyone. Dec 27 17:59:02 does anyone here have experience with the in-app-billing version 3 example project? Dec 27 18:04:38 Could someone explain why List getAllPurchases() { in Inventory.java of IABv3 isn't public? Dec 27 18:19:17 hi Dec 27 18:26:17 hi Dec 27 18:26:38 alguien en español? Dec 27 18:31:46 CanihoJR: sóc català, pero algo de español sé (frecuentemente hay catalanadas, pero bueno :]) Dec 27 18:32:34 English, please Dec 27 18:35:15 SimonVT, ok, soz Dec 27 18:35:30 ty joancreus :) Dec 27 18:37:36 I have a spinner and one of the options is 'Custom'. when this is selected a dialog is shown which allows the user to input any value they want. When they select done, how would I set the spinners shown value to the users inputted one? the problem is that I can only select an existing item, I just want to set the value of the spinner. Dec 27 18:37:43 anyone here use in-app-billing version 3? Dec 27 18:48:22 brian_petersen: add it to the adapter, select its index Dec 27 18:48:25 Hi there. I'm trying to remove items on a ListActivity from the listview and the database. The item being removed from the listview is correct, but the one being removed from the database is the following, so when I try to remove the last item, I get fatal error. The code is the following: Dec 27 18:48:27 case R.id.menu_delete: Dec 27 18:48:27 SparseBooleanArray checkedItemPositions = lvCompras Dec 27 18:48:27 .getCheckedItemPositions(); Dec 27 18:48:27 int itemCount = lvCompras.getCount(); Dec 27 18:48:28 ArrayAdapter adapter = (ArrayAdapter) getListAdapter(); Dec 27 18:48:30 for (int i = itemCount - 1; i >= 0; i--) { Dec 27 18:48:32 if (checkedItemPositions.get(i)) { Dec 27 18:48:34 adapter.remove(adapter.getItem(i)); Dec 27 18:48:36 // TODO: remove item from database Dec 27 18:48:40 datasource.deleteItem(adapter.getItem(i)); Dec 27 18:48:42 // TODO: uncheck all items Dec 27 18:48:44 } Dec 27 18:48:46 } Dec 27 18:48:48 adapter.notifyDataSetChanged(); Dec 27 18:48:50 can anybody help me on this? Dec 27 18:48:52 lvCompras is the listview Dec 27 18:49:01 don't post code to channel Dec 27 18:49:06 sorry :s Dec 27 18:49:09 use a past web site Dec 27 18:49:22 example http://pastebin.com Dec 27 18:49:31 thanks for the hint, will do next time :) Dec 27 18:49:34 :) Dec 27 18:50:50 GreenTuxer: Object o = adapter.getItem(i); adapter.remove(o); datasource.deleteItem(o); Dec 27 18:51:10 If you remove adapter.getItem(i), then additional calls to adapter.getItem(i) wont return the same object Dec 27 18:51:21 that makes sense Dec 27 18:51:26 thanks a lot, I'll try that now. Dec 27 18:54:16 YES!! Thanks a lot, that solved the issue :( Just had to change Object into my class name (Compras) and it worked. Thank you very much! Dec 27 18:56:15 anyone here use in-app-billing version 3? Dec 27 18:56:44 would a 1024x600 7" tablet be hdpi? Dec 27 18:58:33 I'm getting this when I try to complete a purchase with inappbilling 3: java.lang.RuntimeException: Unable to instantiate receiver com.hi.Billingreceiver : java.lang.ClassNotFoundException: com.hi.Billingreceiver ..... any idea why inappbilling 3 would be trying to use BillingReceiver? Dec 27 18:59:38 Hi Dec 27 19:00:53 birbeck: sqrt(1024^2+600^2)/7 = 169.547777867 .. that's mdpi Dec 27 19:01:06 i figured it might be, thanks Dec 27 19:01:14 I ve a problem with my system storage 0.00b/0.OOb Dec 27 19:01:15 i didnt know that calculation Dec 27 19:03:47 SimonVT: where did you get that equation from? Dec 27 19:04:13 I don't know, just math Dec 27 19:04:53 well if its correct, thats handy to know... they should publish it in the docs Dec 27 19:06:19 7" is from e.g. bottom left corner to top right corner.. So you gotta get the number of pixels from bottom left to top right as well.. Then divide to get pixels per inch Dec 27 19:07:26 I believe it's the same way they do it when they publish the dpi of a device (since vertical and horizontal dpi isn't always the same) Dec 27 19:11:57 I'm trying to allow pinch to zoom in a viewpager containing images. ImageView has been extended to handle pinch to zoom, and viewpager is displaying them, but I'm having trouble when the user pinches sideways-- the viewpager intercepts the touch event and swipes to the next page. I want to do two things: stop the viewpager from intercepting touch events before some amount of vertical touch-slop occurs, and also send Dec 27 19:11:58 ACTION_CANCEL to the view pager if a second finger hits the touchscreen while it's half-paged. I'm a little lost as to how to achieve this-- any suggestions? Dec 27 19:16:10 Hello woooooorld! Dec 27 19:57:59 I need to read a book to refresh my java knowledge, is "Thinking in Java" too old? Dec 27 20:07:19 /facepalm Dec 27 20:07:31 been getting io exceptions trying to open a url, forgot to add internet permission Dec 27 20:10:39 Miesco: Thinking In Java is probably not too old. Dec 27 20:11:00 Miesco: Although I don't know what java version the last edition was updated for. Dec 27 20:11:15 java 5 is the free one Dec 27 20:11:31 as long as it covers the use of generics and collections it's probably good enough Dec 27 20:12:00 Yeah, that's what I was worried about :-). Dec 27 20:22:17 I'm missing something about string resources here... if I want to keep some String constants in res/strings.xml, how do I access them from code? Dec 27 20:23:12 I've seen comments that you just use R.string_resource_name, but R.java just contains ints, so that makes no sense. Dec 27 20:23:35 String mess = getResources().getString(R.string.mess_1); Dec 27 20:23:36 context.getResources().getString(int) Dec 27 20:24:03 Ah, okay, that's what I missed. Thanks. Dec 27 20:27:05 Is it possible to use the template system they made for Eclipse / IDEA from the commandline? Dec 27 20:27:34 that is to day, this one: http://developer.android.com/tools/projects/templates.html Dec 27 20:27:38 s/day/say/ Dec 27 20:29:03 <__kr> can anybody running jelly bean and who bought a paid app from play tell me if that app is encrypted using googles app encryption? (shell->ls data/data/app..) Dec 27 20:29:52 __kr: that requires root, which I do not have Dec 27 20:30:42 <__kr> actually no Dec 27 20:30:50 <__kr> shell -> vdc asec list Dec 27 20:30:57 <__kr> will list all asec container files Dec 27 20:31:01 <__kr> without root Dec 27 20:31:24 <__kr> asec files are the encrypted container files used by app encryption and move2sd Dec 27 20:33:41 __kr: yes, there's encrypted files Dec 27 20:33:44 err apps Dec 27 20:34:02 <__kr> are these the ones u moved 2 SD card or the ones u bought via play store? Dec 27 20:34:52 __kr: VFD sec list - permission denied Dec 27 20:35:30 df shows several sec partitions Dec 27 20:35:43 <__kr> speed, u running jellybean? Dec 27 20:35:47 yes Dec 27 20:35:53 current nexus 7 Dec 27 20:35:59 <__kr> and did u buy any apps that are listed from play store? Dec 27 20:36:00 both paid and free Dec 27 20:36:09 <__kr> i mean listed by VDC command Dec 27 20:36:10 angry birds Dec 27 20:36:18 VFD permission denied Dec 27 20:36:20 <__kr> aha so they reactivated app encryption then Dec 27 20:36:24 (not rooted) Dec 27 20:38:00 " The exercises are challenging, and the chapter on Collections is superb!" Dec 27 20:38:05 For _Thinking in Java_ Dec 27 20:38:26 Is that eckel? Dec 27 20:38:58 Is it possible to use http://developer.android.com/tools/projects/templates.html from the commandline? Eclipse is too big on my netbook, and IDEA is too slow. Dec 27 20:39:04 maslen: Yes Dec 27 20:40:03 Miesco: I read his C++ book, and I thought it was very good. My teacher also recommended his Java book. So I don't think it's going too far out to say that it's probably good :) Dec 27 20:43:08 I'm authenticating to a webservice using httpsUrlConnection and http basic auth, which works fine when the log in details are correct. When I test with wrong details, it should reply with an error in JSON format, but I geta 404 instead Dec 27 20:43:28 it works fine using cURL when I test with wrong credentials Dec 27 20:43:49 any ideas? Dec 27 20:44:07 AlCapwn: you sure the web service isn't actually returning a 404, check the headers in curl? Dec 27 20:45:00 AmandaC: do you know the curl param for showing that? Dec 27 20:45:36 actually, found it Dec 27 20:47:46 it's returning a 401, which is the expected response, and it also sends a JSON response giving the specific error code documented in the service's API Dec 27 20:48:31 AlCapwn: -D Dec 27 20:48:50 AlCapwn: not really sure, other than a possible typo somewhere? Dec 27 20:50:04 well, it works fine when using the correct details, when I try with the wrong ones, it throws a file not found exception as soon as I try to open the input stream Dec 27 20:50:36 the api url has a "/user" suffix for getting the user details Dec 27 20:52:23 * AmandaC can never keep the HTTP mess in her head for long, is there a way to get the exact code from the exception? Dec 27 20:54:31 ohh, there is a getErrorStream method in HttpsUrlConnection :D Dec 27 21:19:58 anyone know anything about the Dropbox app? looks like they have an Android API for using their web service, but is there an API for communicating to/from the actual app? Dec 27 21:20:10 pulling it down now to inspect the apk, but wondering if anyone actually already knows Dec 27 21:24:33 Hi, what methods of debugging can I use to figure out better why this error is being caused: Dec 27 21:24:34 12-27 14:23:31.827: A/libc(31947): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) Dec 27 21:24:51 I know the portion of code that is creating the error, but not quite why it's occuring. Dec 27 21:25:33 how do I enable and catch "slides", i.e. swiping your finger to slide e.g. a list element to the right? I don't know the correct terminology, so just knowing that would help me. Dec 27 21:26:49 alexander__b: i may be entirely wrong, but i don't think ListView supports that on its own Dec 27 21:26:59 you'll probably have to write it Dec 27 21:27:07 I'm not sure what to use. I know a lot of apps have it though. Dec 27 21:27:21 i'd make each cell a horizontal scrollview and go from there Dec 27 21:27:24 alexander__b: someone on the DevRel team wrote a simple Dec 27 21:27:28 err sample Dec 27 21:27:34 a simple sample? Dec 27 21:27:47 alexander__b: the "swype to dismiss" pattern you're talking about, right? Dec 27 21:28:11 AmandaC: for instance. though I want to use it to make an Intent and so forth. Dec 27 21:29:20 alexander__b: do you care about <4.0? Dec 27 21:29:58 AmandaC: yes. this is a very core application that essentially aims at *all* android phones. Dec 27 21:30:08 alexander__b: then: https://github.com/JakeWharton/SwipeToDismissNOA Dec 27 21:30:30 AmandaC: ty. Dec 27 21:36:27 Hello there, I'm trying to show a popup menu onLongPress, but not when the touch event is an ACTION_MOVE event .. Dec 27 21:36:43 currently im setting "isMoving" true on ACTION_MOVE Dec 27 21:37:03 and i check in my longpressListener if (!isMoving) { showMenu... } Dec 27 21:37:23 but i always seem to be getting "ACTION_MOVE" events.. Dec 27 21:38:05 even if i hold completely still.. does anyone know a way around this? Dec 27 21:39:38 Check how far is has actually moved Dec 27 21:40:10 This is usually compared to one of the ViewConfiguration#getScaled*Slop() methods Dec 27 21:40:38 hm i'll try that Dec 27 21:40:57 Go through the touch handling of e.g. ScrollView Dec 27 21:41:10 You'll see how it's done in the framework classes Dec 27 21:41:21 ah ok Dec 27 21:41:30 nice tip, thanks :) Dec 27 21:41:52 tip/hint .. Dec 27 21:42:19 yay I made it. Dec 27 21:42:53 this chan active? Dec 27 21:43:15 kind of :) Dec 27 21:44:06 kind of works. :p Dec 27 21:44:35 im just looking for ways to make myself believe im moving on with android development Dec 27 21:44:39 because ive hit a wall Dec 27 21:44:47 so joining an IRC makes me feel better about myself Dec 27 21:44:55 :p Dec 27 21:45:12 im trying to populate a spinner. lol. Dec 27 21:45:35 i should be able to help you with that Dec 27 21:45:59 Well ive just today started tinkering with android Dec 27 21:46:19 but the fact i have to manage 4 or so files for a simple app, is confusing me. Dec 27 21:46:59 But i have the LOTR soundtrack on in the background and im ready to try again :P Dec 27 21:47:20 lol i just watched the two towers about half an hour ago :p Dec 27 21:47:41 good choice, extended? :D Dec 27 21:47:46 yup :p Dec 27 21:47:53 the only way to do so Dec 27 21:48:12 blu ray gotta love christmas Dec 27 21:48:20 ! :D Dec 27 21:48:40 so in relation to my android troubles, i have a book to help me learn Dec 27 21:48:48 but I hate books so i thought i would try and make an app Dec 27 21:48:58 do you think a currency converter is a bad place to start? Dec 27 21:49:01 thats a good idea indeed Dec 27 21:49:11 yeah that might be good too Dec 27 21:49:36 i jumped to my "big project" almost immediatly .. which isnt that good for a start i guess :p Dec 27 21:49:40 lmao. Dec 27 21:49:44 I figure its just a bit of math Dec 27 21:50:17 but you'll still have to deal with the android framework stuff offcourse.. but the smaller the app the better to get the basics right Dec 27 21:50:56 the 4 files you're talking about, do you mean the manifest, layout, activity class and some strings.xml? Dec 27 21:51:18 Yeah it seemed like a tonne of fragmentation, certainly more than im used too Dec 27 21:51:26 but I guess that works best? Dec 27 21:51:43 sure Dec 27 21:51:51 Are there known problems with calling decodeRegion (of the BitmapRegionDecoder class) multiple times? Dec 27 21:52:45 sorry Firstmate i cant help you with that Dec 27 21:52:53 blargh Dec 27 21:53:16 Kieronboz: have you got any experience with java? Dec 27 21:53:30 Yeah I did a module on it last year Dec 27 21:53:58 I just dont remember it being this complicated, perhaps im already doing more than I did :P Dec 27 21:54:09 though, last year I made a multifunction train time calculator Dec 27 21:54:49 ok :) it really helps to be familiar with OO before getting started :p Dec 27 21:55:35 Yeah towards the end of it I was implementing reusable code into other files and calling on them, im just not used to needing it straight away. Dec 27 21:55:50 im primarily a web guy, so everything is usually in one place, lol. Dec 27 21:57:19 but alas, android! its just the spinner thats stopping me, lol. Dec 27 21:57:25 I wanted to populate it from an array Dec 27 21:57:48 http://pastebin.com/Tmf5V6jT Dec 27 21:58:00 oh an array Dec 27 21:58:15 well i figured that would be the best way, im an open book here Dec 27 21:58:47 1 input box, 2 drop downs, 1 output box Dec 27 22:00:11 here's some code i got from where i worked with an array -> Dec 27 22:00:11 http://pastebin.com/mRt9jqhk Dec 27 22:00:21 its a bit ugly but it worked Dec 27 22:00:37 you always have to create an adapter when working with Spinners Dec 27 22:00:39 Okay I purchased _Thinking in Java_ by Eckel Dec 27 22:00:47 for $45 on Amazon Dec 27 22:01:12 Right, ill take a look ty Dec 27 22:01:50 SpinnerItem is a custom class i made to make things easier, it just has 2 fields "String title" and "Object value" Dec 27 22:03:19 has anyone here ever used xtend instead of java? Dec 27 22:03:50 i remember something somewhere saying it had bugs regarding android but havent been able to confirm/deny it Dec 27 22:06:21 Okay ive added the element lol. Dec 27 22:06:43 Its going well! :p Dec 27 22:07:31 So with a string resource file, is this literally just the string.xml that hello world is built into, or is it a new resource you add Dec 27 22:07:37 to just contain the data you want? Dec 27 22:11:26 you can use the string.xml Dec 27 22:11:47 or wait :p Dec 27 22:11:48 Krob, does the "Spinner spinner =" whole section of code, go inside the in my main activity or elsewhere? Dec 27 22:11:50 arrays.xml Dec 27 22:12:26 in the main activity you can put the Spinner spinner = (Spinner) findById... Dec 27 22:13:22 you can put pre-defined arrays in arrays.xml -> entry 1 ... Dec 27 22:13:30 but, inside the or just anywhere? :-) Dec 27 22:13:41 So nobody knows if I can use these from the commandline, somehow? http://developer.android.com/tools/projects/templates.html Dec 27 22:13:43 but you can find more about taht on developer.android.com Dec 27 22:14:13 Ok, I take it i need to make arrays.xml? Dec 27 22:14:43 if you're not making your array from code Dec 27 22:14:53 sorry AmandaC i dont know either :( Dec 27 22:14:54 can I in an onClickItem check whether it was a "long tap" or quick tap? Dec 27 22:15:20 sorry onItemClick. Dec 27 22:15:32 alexander__b: i think you're going to have to use the onLongPressListener to know if it was a "long tap" Dec 27 22:15:37 alexander__b: I think onItemClick is only for single, rhort taps Dec 27 22:15:40 short even Dec 27 22:15:43 OK. thanks a lot. Dec 27 22:18:08 So how does the know to look in res/values/currencys.xml? Dec 27 22:18:50 Kieronboz: it doesn;t Dec 27 22:18:56 if you're using a decent IDE an R.java class is automagically generated to reference it Dec 27 22:19:32 damn autoscroll in this webchat thing isnt workign >_< Dec 27 22:20:07 i misinterpreted your question btw :p Dec 27 22:20:31 lol, my error lies with the Spinner spinner = (Spinner) area, "Spinner spinner = (Spinner) findViewById(R.id.spinner);" Dec 27 22:23:21 I am wanting to save my applications state and values when the user stops the application and restore it when the activity is created. How would you recommend saving all the data? I want to use a bundle and somehow save that to the internal storage, but I have not found a method to save the bundle. I'm open to any suggestions. Dec 27 22:23:59 a database Dec 27 22:24:58 Kieronboz: have you given your spinner the id "spinner"? Dec 27 22:25:42 :P, I fixed that bit, but still erroring now lol. Dec 27 22:26:16 anyone feeling like testing crap software? I wrote a scala makefile http://bdhf.me/oneoff/raw-file/tip/android-scala-makefile Dec 27 22:26:17 Krob: setOnItemLongClickListener(android.widget.AdapterView.OnItemLongClickListener) in android.widget.AdapterView cannot be applied. any idea what might be causing this? Dec 27 22:27:02 I have foo.setOnItemClickListener(bar.this); foo.setOnItemLongClickListener(bar.this); Dec 27 22:27:46 Ok fixed. Dec 27 22:29:43 alexander__b: does "bar.this" implement the onItemClickListener interface? Dec 27 22:29:56 and OnItemLongClickListener interface Dec 27 22:29:59 Krob: yes. Dec 27 22:30:04 getResources(), is this a function or something, because my error is here now. Dec 27 22:31:30 Kieronboz: probably something wrong in your xml files Dec 27 22:32:52 Your probably right Krob, http://pastebin.com/1CKVvNH0 line 25 is where its failing, can you see anything I have done wrong? Dec 27 22:33:06 Sorry about this, im a question asker-learner, lol. Dec 27 22:33:40 What is the best way to associate a theme to all the activities of an application, on startup, based on a shared preference (dark_theme ? true/false). I ask this because I'm doing PreferenceManager.getDefaultSharedPreferences(getApplicationContext());, getboolean and settheme BEFORE super.onCreate and setContentView. The issue is that I can see the theme changing, which doesn't happen on the apps I use, when they have that option... Dec 27 22:33:56 Krob: for the record, the onItemClickListener works fine. Dec 27 22:35:10 Kieronboz: you cant put java code in an xml file, you need to put it in your activity Dec 27 22:35:21 Yeah thats my activity lol. Dec 27 22:35:29 alexander__b: .. thats strange Dec 27 22:35:37 you cant put xml in your activity class either Dec 27 22:35:57 currency.xml looks like http://pastebin.com/kD7ZCQyZ thats the data in the array Dec 27 22:36:51 name="currencys_array" res.getStringArray(R.array.currency_array) Dec 27 22:36:53 your right korkut it does Dec 27 22:37:16 oh damn. Dec 27 22:37:43 alexander__b: http://stackoverflow.com/questions/13362263/onitemlongclick-works-onitemclick-not maybe this can help, its the other way around.. but it might be the same problem Dec 27 22:37:44 Ok so that massive blunder aside lol. Dec 27 22:37:58 yer using eclipse? Dec 27 22:38:03 yup Dec 27 22:38:17 any best practices to name strings.xml? Dec 27 22:38:36 avoid plural singular difference Dec 27 22:38:48 ? Dec 27 22:38:56 :) Dec 27 22:38:58 Krob: the problem there was only one of them were called. I can't even get it to compile. Dec 27 22:40:04 Hello Dec 27 22:40:18 Krob: forgot an import. think I've fixed it. thanks. Dec 27 22:40:22 so can Spinner spinner = etc, go in the activity_main.xml Dec 27 22:41:03 does anyone have some links to tutorials of doing animation on canvas? I'm trying to do a simple image rotation animation Dec 27 22:42:44 alexander__b: you're welcome Dec 27 22:44:58 can anybody help me, please, on the theme situation I asked a few minutes ago? Dec 27 22:48:29 Ah, I figured out the problem XD Dec 27 22:48:33 Such an embarassing one Dec 27 22:48:45 GreenTuxer: in your manifest.xml in your application tag -> android:theme="@style/lightTheme" Dec 27 22:48:49 I assumed the param to Rect constructor was (topleftX, topleftY, width, height) Dec 27 22:48:51 ah you found it :p Dec 27 22:48:57 But it's actually (topleftX, topleftY, botx, boty) Dec 27 22:49:03 ah sorry wrong person >_< Dec 27 22:49:16 Such a silly mistake :( Dec 27 22:49:17 happy to know you solved your problem :p Dec 27 22:49:40 Krob, but the theme can be light or dark, it depends on the sharedPreference boolean value Dec 27 22:51:02 hm sorry ive never done stuff like that Dec 27 22:51:59 but i have to get going.. Dec 27 22:52:03 goodnight everyone Dec 27 22:52:22 thanks :) Dec 27 22:52:26 goodnight Dec 27 22:54:17 right if i want to load an array, say with String[] cCurrencys = getResources().getStringArray(R.array.cur_array);, but I dont do this in activitymain.xml do I, because theres no xml tags set, so where should I add them too? Dec 27 22:55:20 do you guys all use java naming conventions in your apps? Dec 27 22:55:33 or do you guys randomnly assign names to variables? haha Dec 27 22:56:39 kaikai: depends on my mood Dec 27 22:57:02 anyone who works for a company? Dec 27 22:57:09 who has dealt with company naming conventions? Dec 27 22:57:11 * p_l keeps to his own naming conventions. No camelCase, for example Dec 27 22:57:34 keeping with java naming convention is for corporate work :) Dec 27 22:57:43 amanda, p_l do you guys know what standards some companies use? Dec 27 22:57:46 ahhhh :) Dec 27 22:58:04 so all corporations require java naming convention or no? Dec 27 22:58:13 depends on the company Dec 27 22:58:20 kk ty Dec 27 23:05:56 this may be an iompossible request, but I just got my app error free, but its force closing, and I wondered if anyone can read these logs like matrix code? Hah. Its here anyway; http://pastebin.com/ShzYMWsa Dec 27 23:07:52 How is all of my favorite people? :) Dec 27 23:08:30 * Zharf looks around and asks who? Dec 27 23:09:04 everyone Dec 27 23:09:10 i just saw MK802 Dec 27 23:09:11 https://www.miniand.com/products/MK802%20Android%20Mini%20PC Dec 27 23:09:19 now i want to get into android dev Dec 27 23:09:21 Anyone know a way to use xml selector states to change the state of other buttons instead of doing it through an onclick method? Dec 27 23:09:32 ContextWrapper.java:89 Dec 27 23:09:51 Kieronboz, MainActivity.java:8 ? Dec 27 23:10:13 Bitgod: ug007 looks better siince it has bluetooth built in Dec 27 23:10:16 ok so the problem is there Zharf? :P Dec 27 23:10:24 Kieronboz, highly likely Dec 27 23:10:34 but chinese post ate my packages Dec 27 23:10:48 Zharf, is 8 a line indicator? Dec 27 23:10:49 so wait until next year if you wanna order Dec 27 23:10:58 Kieronboz, yes Dec 27 23:11:12 korkut Dec 27 23:11:14 i dont need BT Dec 27 23:11:19 its going to be for digital signage Dec 27 23:11:23 plug into a tv, done :) Dec 27 23:11:32 it is handy though :D Dec 27 23:11:42 yeah? you gonna offset our cost? Dec 27 23:11:49 $30 vs $60 ;) Dec 27 23:12:04 i guess dual core is better heh Dec 27 23:12:15 strange Zharf line 8 was auto generated lol Dec 27 23:12:17 well, I thought you'd be using it for entertainment purposes Dec 27 23:12:23 yeah ill get that one Dec 27 23:12:32 korkut: if you call signs entertainment sure :P Dec 27 23:12:40 anyway Dec 27 23:12:48 Kieronboz, but did it make sense? Dec 27 23:12:48 in order to prepare for it Dec 27 23:13:00 i have a existing tablet (thrive 10.1") Dec 27 23:13:05 what ALL do i need to begin dev? Dec 27 23:13:13 <= new Dec 27 23:13:13 protected void onCreate(Bundle savedInstanceState) { seems fine lol Dec 27 23:13:17 android-sdk :) Dec 27 23:13:38 Bitgod: start by learning some Java Dec 27 23:14:01 er, Dec 27 23:14:07 what tools do i need, software wise Dec 27 23:14:26 if this works and i can sell signage, i can donate to the dev community ffs :P Dec 27 23:14:40 Kieronboz, all the onCreate's I've see have been public, not protected Dec 27 23:14:50 not sure what the effect of having it protected would be.. Dec 27 23:14:52 can you compile and run hello world on your pc? Dec 27 23:15:03 in java ofc Dec 27 23:15:26 Bitgod: do you know Java already then? Dec 27 23:15:37 leed: no but id like the tools in mean time :P Dec 27 23:15:40 Ok ill try that Zharf as soon as i get of my phone, (also my emu lol.) Dec 27 23:16:27 Bitgod, do you know any languages? Dec 27 23:16:55 english :) Dec 27 23:16:59 j/k i know .net and c# Dec 27 23:17:04 ok Dec 27 23:17:08 Is it possible to use xml selector states to change the state of other buttons instead of doing it through an onclick method? Dec 27 23:17:13 also some 6502 assembly Dec 27 23:17:18 I recommend intellij IDEA then ;) Dec 27 23:17:30 this has to be for ANDROID DEV Dec 27 23:17:32 not pc java Dec 27 23:17:37 I know Dec 27 23:17:43 the first tool you need is *JAVA KNOWLEDGE* Dec 27 23:17:48 that Dec 27 23:17:51 Bitgod: isn't .net and c# part of the same package? Dec 27 23:18:08 Winslow: yea Dec 27 23:18:09 .net isn̈́t really a language Dec 27 23:18:10 ;) Dec 27 23:18:12 i meant vb.net and C# :P Dec 27 23:18:22 after learning java the language, make sure you know how to avoid getting kicked by GC. What goes well on big machine is slow as fuck on mobile Dec 27 23:18:26 bitgod: go download java sdk first and set it up Dec 27 23:18:41 then download android-sdk Dec 27 23:18:44 ahh gotcha okay. Cuz I've done C# and I never understood if/how .net was seperate Dec 27 23:19:01 these are the bare minimums Dec 27 23:19:14 java6 sdk! Dec 27 23:28:02 which is faster? .getText().toString().trim().isEmpty() or .getText().toString().trim().length() == 0 ? Dec 27 23:28:17 GreenTuxer: tiem it Dec 27 23:28:23 time it* Dec 27 23:28:37 time it? Dec 27 23:28:48 yes Dec 27 23:28:54 Try both and see which is faster Dec 27 23:29:04 oh ok, didn't understood at first :) Dec 27 23:29:23 Sorry, English isn't my native language and I'm annoyed at being unable to start my own company Dec 27 23:29:42 why are you unable? Dec 27 23:31:11 GreenTuxer: doesn't matter use whichever makes sense Dec 27 23:31:12 probably bullshit us laws Dec 27 23:31:32 bitgod, you mean the laws that put you in jail for being a pedophile? Dec 27 23:31:47 hello all. According to http://en.wikipedia.org/wiki/Android_version_history and android api docs, the SIP api are present from android 2.3. Can i assume that phones with 2.3 have those api or is common for stock images from operators to drop them? Dec 27 23:32:05 thanks korkut Dec 27 23:32:13 hip2p: I don't know how to fill in the form D: Dec 27 23:32:18 huh, i was talking about deepy's issues Dec 27 23:32:25 deepy, what form? Dec 27 23:32:33 maybe i can help Dec 27 23:32:44 does anyone know if in the AndroidManifest.xml it's valid to use ".SomethingInMyPackage" syntax for things like intent actions? Dec 27 23:32:48 I could use e-identification, but I forgot the pin code to my bank card since I've spent hte last 2 years in Ireland Dec 27 23:33:10 Bitgod: Swedish one. SKV 4620 I think Dec 27 23:33:20 oh, no clue on those :( Dec 27 23:33:28 That makes two of us, heh Dec 27 23:34:08 I wonder if I should add in 'app development' in the description of my business Dec 27 23:34:36 korkut, ok Java JDK and IntelliIDEA installed Dec 27 23:34:44 now to read 'setting up existing ides' :) Dec 27 23:35:04 Can you 'unlock' a text input when a spinner is selected? Dec 27 23:35:24 yer so green ya need moving, which ide do ya plan to use Dec 27 23:35:26 Is it only me or does it take forever to switch between files in adt? Dec 27 23:35:40 A lot of toolbar flickering has to take place first Dec 27 23:35:42 since yer a newb you'll use eclipse, ok? Dec 27 23:35:56 I know many professionals that use it Dec 27 23:36:04 and download eclipse bundle Dec 27 23:36:08 yes Dec 27 23:36:09 of course Dec 27 23:36:50 anli: sorry i was talking to bitgod Dec 27 23:36:50 Did you have anything of value to say? :) Dec 27 23:36:53 haha Dec 27 23:36:56 Then I understand Dec 27 23:37:02 Sorry Dec 27 23:38:38 k now using sdk manager, getting my packages Dec 27 23:38:59 korkut, im fine w/ intellijIDEA Dec 27 23:39:05 im not NEW at programming :x Dec 27 23:39:20 Hey gang. Does setting a ViewPager's visibility to GONE make its views eligible for GC? I've got a FragmentPagerAdapter that has a few large fragments, and I'm trying to clean up resources when the various fragments are shown / hidden to prevent OOM. Dec 27 23:39:27 whatever floats your boat, as long as ya rtfm it is good Dec 27 23:39:49 Is there a way to make adt faster on switching between editors? Dec 27 23:40:11 Chronax don't think so. GONE means that it's not regarded for any UI placement Dec 27 23:40:21 I use makefiles for android, no idea Dec 27 23:40:22 since you could also set it to visible again it needs to be there Dec 27 23:40:29 s/don't think so/no/ Dec 27 23:40:42 heh, thanks SimonVT. Dec 27 23:41:10 Any advice for how I can clean up / GC a not-visible Fragment's view and restore it when it becomes visible again? Dec 27 23:41:23 Kinda toying with unbindViews() and then re-drawing when the fragment is visible again. Dec 27 23:41:59 unbindDrawables(), rather. Dec 27 23:42:44 Downloading Android SDK Platform-tools, revision 16.0.1 Dec 27 23:42:46 Installing Android SDK Platform-tools, revision 16.0.1 Dec 27 23:42:46 Stopping ADB server failed (code -1). Dec 27 23:42:46 fun :P Dec 27 23:42:52 Basically I've got a few Fragments that display some big bitmaps, and it seems silly to keep them all on the heap when the fragment isn't visible. Dec 27 23:43:10 ignore it Dec 27 23:43:24 Is there a way to set a string to have a display value, and a different like hidden value? Dec 27 23:43:24 you don't need adb running right now Dec 27 23:43:32 sort of show Euro, but value of 1.1 Dec 27 23:43:53 Kieronboz: using strings for conversion is plain wrong Dec 27 23:44:51 Ok but I dont really have the knowledge to do anything else Dec 27 23:45:15 Kieronboz what are you trying to achieve Dec 27 23:45:16 strings are used mainly for localization Dec 27 23:45:28 Anybody? Dec 27 23:45:43 im just making my first practice app, a currency converter, so far i have this http://puu.sh/1G7lx Dec 27 23:45:43 clean up bitmaps themselves Dec 27 23:45:58 but the value really ought to be EURO, GBP, USD, etc Dec 27 23:46:07 and have 1.5 etc, BEHIND that face value Dec 27 23:46:27 you keep the value in a numeric variable Dec 27 23:46:27 keep them inside a hashmap Dec 27 23:46:32 and format as a string for display Dec 27 23:47:39 okay, just with me trying to learn, I dont really know what those things are, lol, so I will have a google. Dec 27 23:52:19 Ok so there doesnt seem to be a clear cut way to make a 'hashmap' or 'store them in a numeric variable' so could someone expand if my learning-idea is so terrible lol. Dec 27 23:52:57 Kieronboz decide a 'base' currency, if the user inputs another currency, convert to your internal Dec 27 23:54:06 menounderstand. But im trying! lol Dec 27 23:54:12 So set default to say GBP 1.0 Dec 27 23:56:56 Kieronboz: I;m sorry but I suggest you read soem "getting started with programming" guides Dec 27 23:57:14 use of variables are pretty much THE simplest concept in programming Dec 27 23:57:15 why do there seem to be so many people defining their own standards when it comes to the NDK? Dec 27 23:57:32 is this the Wild West of Android or something? Dec 27 23:57:44 and if you don;t undertsand them, anything else on top of it will be impossible Dec 27 23:57:59 then maybe an android tutorial Dec 27 23:58:15 I have done programming before, just im primarily a web developer Dec 27 23:58:25 about a year ago I last did java Dec 27 23:58:30 the concpets of variable are exactly the same Dec 27 23:58:47 newvalue=othercurrency * conversionvalue Dec 27 23:59:12 label.settext(vale.format("£00.0")); Dec 27 23:59:20 or somethign along those lines Dec 27 23:59:43 GOOGLE DRIVE Y U NO PLAY NICE Dec 28 00:00:04 Drive has an activity that responds to ACTION_GET_CONTENT but it's exported=false Dec 28 00:00:20 non-sharing bastards Dec 28 00:00:38 belgianguy: ndk was an afterthought Dec 28 00:00:38 The main issue im having is they need to set both currencys before they begin Dec 28 00:00:54 thats how currency conversion works, isnt it. Dec 28 00:00:58 Kieronboz: well, that's done to the UI design Dec 28 00:01:06 or just set defaults Dec 28 00:01:28 I thought I was plodding along nicely, but spinners arent the way to go? Dec 28 00:01:45 Kieronboz whats the problem exactly.. Dec 28 00:01:52 korkut: I was trying to find some "templates" on how to structure my projects, but I keep seeing different ways Dec 28 00:02:02 hey, does anyone know where the AndroidManifest parser lives in the android source tree? Dec 28 00:02:03 they seem forn for choosing one of many options, what lead you to think they weren't? Dec 28 00:02:22 s/forn/fine/ Dec 28 00:02:41 xorgate, I know its hard to read tone in text, but if im annoying you in some way please ignore me, I dont mean to anger anyone, I just ask questions to learn thats my style Dec 28 00:02:57 gandhijee_: it lives in the bowels of ant configuration Dec 28 00:03:03 Kieronboz it just seems you are a loose cannon.. without an actual question we can answer Dec 28 00:03:26 belgianguy: what are you using NDK for? Dec 28 00:03:46 using a C library probably Dec 28 00:04:23 well loose cannon implies unintentional damage, lol, I never really asked anything, I just showed my work so far and I was told there are better ways to do it, so im investigating those now Dec 28 00:04:23 korkut: well yeah I assumed that with NDK but I mean't more about what he is actually programming Dec 28 00:04:30 through probing people. :-) Dec 28 00:04:59 Winslow: a c++ lib Dec 28 00:05:29 Kieronboz i would expect your app to ask me 'what currency do you have now' and i will say 'euro' then it asks me 'what currency to convert to and i say 'US dollar' Dec 28 00:05:32 and then it calculates Dec 28 00:05:40 belgianguy: I've never used NDK. I thought NDK was for if you wanted to program an app in C++ or something Dec 28 00:05:43 0.9 and 1.2 don't make much sense Dec 28 00:06:18 Well the 0.9 values were supposed to display either euro or USD, then the 1.9 would be say usd is 1.9 of a euro Dec 28 00:06:31 thats what I was going for Dec 28 00:07:47 ok then i would expect to enter a currency and be shown a list of other currencies and their exchange rate maybe Dec 28 00:09:47 sure, I agree. Dec 28 00:19:02 so xorgate aside from having zero functionality; http://puu.sh/1G89t Dec 28 00:19:21 something like that Dec 28 00:20:56 Okay, let me ask my question a different way. Is it bad to manually unbindDrawables() for a Fragment, and then re-draw / inflate the view each time a Fragment is hidden and shown again? Dec 28 00:21:02 Sorry for asking again; internet died here at work. Dec 28 00:21:06 So as far as detecting these multiplier rates goes, what would you recommend I go away and learn? to impliment it. Dec 28 00:21:51 Kieronboz you could hardcode them, or if youre more advanced get them online in your app Dec 28 00:22:08 I am absolutely not advanced. :-) Dec 28 00:22:16 this is my first app. Dec 28 00:22:17 Kieronboz, did my suggestion help? Dec 28 00:22:28 yes Zharf it runs now :P Dec 28 00:22:33 cool Dec 28 00:25:10 What im not partcularly taking too easily xorgate, is that I have the currency titles set in an array, how can i declare variables that are only used, when their 'owner' is chosen? Dec 28 00:25:22 would it be ifs? if euro set to 1.6? Dec 28 00:25:50 i would make something like a class that has a mTitle and a mValue Dec 28 00:25:55 and one of the currencies has mValue = 1 Dec 28 00:27:07 and then you add them to a List like this: mCurrencies.add(new Currency("Euro", 1.132)); or whatever Dec 28 00:27:46 then you fill your spinner with the titles Dec 28 00:27:59 and you know which one was selected, and thus what its exchangerate is Dec 28 00:28:40 I feel out of my depth, but I cant think of an easier way to learn how to do this. Dec 28 00:28:42 lol. Dec 28 00:29:43 what progging experience do you have? Dec 28 00:30:13 well plenty of web, php asp sql, etc. then I did one module on java last year Dec 28 00:30:19 I made a train time calculator Dec 28 00:30:24 route planner kind of thing Dec 28 00:30:34 Kieronboz: have you run through the android app tutorials yet? Dec 28 00:30:34 im at university now Dec 28 00:30:51 Anoia, do you mean the ones on the official android dev site? Dec 28 00:31:03 yes Dec 28 00:31:17 Yeah i got the input message then printing out the input working Dec 28 00:31:18 i think the issue here is more about how to structure his data Dec 28 00:32:26 if there were guides I would follow them but I dont think i can generically 'learn android' Dec 28 00:32:31 its all hello worlds and stuff Dec 28 00:33:58 I'm using Sqlite Database Browser as a way to look through my tables using a GUI Dec 28 00:34:08 however, this build isn't working right Dec 28 00:34:32 I used a previous version and it worked great, so I dunno Dec 28 00:34:46 is there something else you'd recommend? maybe an eclipse plugin? Dec 28 00:37:37 Ok while I will probably hate the descicion, what do you recommend I do xorgate, hobble on? go read a book? I will try to just do your suggestion, though i wont enjoy being told im not ready :p Dec 28 00:38:00 I think im just taking part in a steep learning curve lol. Dec 28 00:38:33 Kieronboz if you know what a class is, read about ArrayList and try to stash your Currency objects in a list Dec 28 00:38:37 then you're almost there Dec 28 00:39:23 well if your referring to the class pertaining to the main activity then i think i can try, otherwise, not. lol (obligatory xorgate name bump) Dec 28 00:39:43 Kieronboz think about what your data is Dec 28 00:39:55 you have a few Name/Value combos Dec 28 00:41:11 okay I have added my public arraylist() so ill look into populating it now :-) Dec 28 00:41:19 if you click the button, you check your input currency's value and your output currency's value. Do the correct multiplication and output the new number Dec 28 00:42:21 Yeah the logic is clear to me, just the functions to use not so much - but thats why im learning it lol. Dec 28 00:42:49 'functions' ? Dec 28 00:43:02 sorry i mean functions in the generic term Dec 28 00:43:04 stuff Dec 28 00:43:13 methods Dec 28 00:43:35 so i ssume your pics are screenshot of actual (non-working) apps? Dec 28 00:43:46 yeah on the N4 Dec 28 00:44:03 ok and those things are Spinners ? Dec 28 00:44:06 yup Dec 28 00:44:17 so the spinner has some sort of onSelect or something Dec 28 00:44:20 populated via arraylists, populated by strings Dec 28 00:44:39 I did it with android:entries="@array/cur_array" Dec 28 00:45:15 oi Dec 28 00:45:49 the selection was going to be an OnItemSelectedListener Dec 28 00:45:59 yes that is correct Dec 28 00:46:49 so in your activity you implement OnItemSelectedListener Dec 28 00:46:53 http://developer.android.com/guide/topics/ui/controls/spinner.html <- the bit of code at the end Dec 28 00:47:29 Is there any problem with manually invoking something like unbindDrawables() for a Fragment, and then re-drawing / inflating the view each time a Fragment is hidden and shown again? I've got a few Fragments in a pager with huge bitmaps, and I don't want them all on the heap. Dec 28 00:48:01 Kieronboz you could make a second array with values, corresponding to your (poorly named) cur_array Dec 28 00:48:03 ah thats good thanks xorgate, though this code goes into the class file doesnt it? Dec 28 00:48:49 it goes into the activity Dec 28 00:48:59 and in onCreate you setOnItemClickListener(this); Dec 28 00:49:04 on the spinner Dec 28 00:49:38 this word activity is throwing me off, its not activity_main.xml is it Dec 28 00:49:59 activity is the term used for one particular 'screen' in which you can perform an action Dec 28 00:50:01 :( Dec 28 00:50:19 so in this case, mainactivity.java Dec 28 00:50:38 yes, in it is a line setContentView(R.layout.activity_main) Dec 28 00:50:55 after that, you get a handle on the spinner with findViewById(R.id.id_of_spinner) Dec 28 00:51:27 I have a content provider and a sync adapter in my app Dec 28 00:51:30 but this is android fundamentals which you should know Dec 28 00:51:48 should know. Dec 28 00:51:49 :p Dec 28 00:51:53 is it best for the sync adapter to go through the content provider or direct to the database? Dec 28 00:52:04 as in: go learn it Dec 28 00:52:21 if via the CP, how do I tell it that it's the sync adapter and shoudl go direct Dec 28 00:52:21 I just feel im so close? lol. Dec 28 00:52:47 you are, just need to know what to do Dec 28 00:53:08 i.e. need to learn how android 'works' internally Dec 28 00:53:31 I hope Beginning android 4 application development has a chapter on that! Dec 28 00:53:53 i'd just go to the docs online Dec 28 00:53:55 it's all there Dec 28 00:54:15 http://developer.android.com/reference/android/app/Activity.html start here Dec 28 00:54:36 Guess I should turn the LOTR soundtrack off now. Dec 28 00:54:38 When I run my app, I in addition to the titlebar gets a bar with the icon of the application together with the app name, that cant be part of the style since I have cleaned all styles in my project... Dec 28 00:55:12 oh, may be a menu thing maybe Dec 28 00:56:34 this is an incredibly long page Dec 28 00:57:09 there's a lot involved :) Dec 28 00:57:11 most of it is specifics :) Dec 28 00:58:26 ok I see the oncreate thing the guide is referencing now Dec 28 00:59:58 Is it maybe an action bar I am looking at, the new bar I have not seen when I coded for android a year ago Dec 28 01:00:13 Icon + text on black background, top placement Dec 28 01:00:49 anli its probably the actionbar, how did you create the project Dec 28 01:01:16 Hm, I dont remember the params I used Dec 28 01:01:34 Ah, I dont have a getActionBar() call Dec 28 01:01:46 Does anyone know if the maven packages that gradle makes for Android libraries with resources is usable from anything other than the android gradle plugin? Dec 28 01:01:51 Need to use api level 11, seems to be 8 now Dec 28 01:03:02 yeah, was able to hide it with code if I raised to level 11 Dec 28 01:03:20 Ok, action bar seems hocus pocus so I dont want it :) Dec 28 01:03:31 it's pretty nice actually Dec 28 01:03:39 Ok xorgate, I have read the activity page, whilst skipping over each variable listed below as theres maybe 600 of them, lol. Dec 28 01:03:42 and you can use action bar sherlock to fake it on old versions Dec 28 01:03:52 Indeed Dec 28 01:03:58 ♥ ABS Dec 28 01:04:35 Kieronboz ok now what? Dec 28 01:04:55 I need to use the listener in the class thing dont I Dec 28 01:05:02 try to catch a click on a spinner, showing a message Dec 28 01:06:43 showing a message: Toast.makeText(this, "Hello world", Toast.LENGTH_SHORT).show(); Dec 28 01:07:22 So when they pick Euro, "Currency 1 chosen" Dec 28 01:08:20 whatever, just try to catch the click Dec 28 01:08:36 one step at a time Dec 28 01:10:15 are there any tools to observe total allcoations per process on android ? Dec 28 01:10:48 k0nichiwa yeh i think you can access them easily from eclipse Dec 28 01:11:09 ddms might be a starting point Dec 28 01:13:03 hmm my listener is displaying an error after adding it to class Dec 28 01:13:08 ive done all my imports Dec 28 01:13:21 whats the error Dec 28 01:13:45 http://puu.sh/1G9m6 Dec 28 01:13:57 Im adding the code line by line Dec 28 01:15:24 ok the code without being obstructed by the error? Dec 28 01:15:35 prefer pastie or in here? Dec 28 01:15:38 not sure about this error Dec 28 01:15:39 pastie Dec 28 01:15:40 dont want to spam. Dec 28 01:15:59 http://pastie.org/5586592 Dec 28 01:16:21 im looking up what args are now, because ive implimented them but I havent got a clue what they are Dec 28 01:18:32 public void onItemSelected( AdapterView adapterView, View view, int i, long l ) Dec 28 01:19:33 arg2 had no type Dec 28 01:19:58 okay i see. So what does long represent# Dec 28 01:20:00 ?* Dec 28 01:20:25 http://developer.android.com/reference/java/lang/Long.html Dec 28 01:20:40 int position, long id Dec 28 01:20:45 gotcha Dec 28 01:21:32 so the code i was learning from with all the arg0 arg1, etc, those instances are now naturally errors Dec 28 01:21:47 And i hate to ask another, but Im not sure how to fix them, do they become 'i' Dec 28 01:22:02 no that is just their name Dec 28 01:22:07 a variable has a type and a name Dec 28 01:22:22 in our case, the name matters not, just the type Dec 28 01:22:29 right yep Dec 28 01:22:51 So do they all need to be created as local vars? Dec 28 01:23:00 when overriding a method you can rename the parameters. eclipse sometimes autocreates these methods and uses horrible names like arg0, arg1, etc. i recommend not using those names and using things like position and id Dec 28 01:23:07 setOnItemSelectedListener() wants as parameter an object that has the methods onItemSelected(those-params) and onNothingSelected(parent) Dec 28 01:23:28 kevinb yes another reason to use intellij :0 Dec 28 01:23:31 right cheers guys Dec 28 01:23:53 so you change arg2's type from to 'int' Dec 28 01:24:13 int arg2; then? Dec 28 01:24:19 int arg2, Dec 28 01:24:25 because there's another after it Dec 28 01:24:42 just change it to onItemSelected(AdapterView parent, View view, int position, long id Dec 28 01:24:58 even better Dec 28 01:25:07 i like even better, thanks Dec 28 01:25:27 so arg0 is position and 2 is the id? Dec 28 01:25:43 arg0 is parent, arg1 is view, arg2 is position, arg3 is id Dec 28 01:26:02 if you're ever not sure of parameter names and eclipse isn't being helpful you can search developer.android.com for the method name (or class) Dec 28 01:26:11 http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html Dec 28 01:27:13 ok awesome. Dec 28 01:27:36 String strchosencur = (String) position.getItemAtPosition(id); is still complaining Dec 28 01:27:46 Did i impliment it correctly? Dec 28 01:27:49 getItemAtPosition wants a position not an id Dec 28 01:28:00 and is a method of parent not position Dec 28 01:28:31 I need to make a variable for that too now Dec 28 01:28:53 no, it's the first parameter in onItemSelected Dec 28 01:29:21 (i.e. your spinner) Dec 28 01:29:35 Oh! curSpinner? Dec 28 01:29:36 lol Dec 28 01:29:54 think about what is happening Dec 28 01:29:54 http://pastie.org/5586618 Dec 28 01:29:59 Im laughing so hard right now, out of exhaustion and incompetence Dec 28 01:30:29 you told the spinner to tell the activity to execute code when an item is selected Dec 28 01:30:29 you guys are doing great, thanks btw. Dec 28 01:30:36 yep Dec 28 01:30:46 that's called a callback Dec 28 01:30:54 so onItemSelected() is the callback Dec 28 01:31:03 but more than 1 spinner could exist Dec 28 01:31:05 I agree Dec 28 01:31:10 so it also tells you which spinner it is Dec 28 01:31:21 with the find by id yeah Dec 28 01:31:30 position Dec 28 01:32:01 'spinner X had a selection of position Y, figure it out' Dec 28 01:32:14 ok Dec 28 01:32:23 so Toast it and try Dec 28 01:32:39 unfortunately I still have errors regarding a token Dec 28 01:33:12 specifically, here http://puu.sh/1G9Mn Dec 28 01:33:44 also, I would like to buy you a beer. (is there an app for that?:-D) Dec 28 01:34:01 looks like a bracket mismatch Dec 28 01:34:35 deleting the final } got rid of the error on that line Dec 28 01:35:29 Ok me throwing }{ in everywhere certainly isnt helping Dec 28 01:36:06 Can I specify a border in the layout xml for a LinearLayout? Dec 28 01:36:47 anli: no Dec 28 01:36:53 anli: use a drawable or a 9patch Dec 28 01:37:00 or a style? Dec 28 01:37:42 Hm, I could always use another LinearyLayout with a height of 1 pixel Dec 28 01:37:46 Kieronboz it looks legit Dec 28 01:37:50 With a certain background color Dec 28 01:39:15 Will styles.xml from values, values-11 and values-14 happen be used only one per app? Dec 28 01:39:29 So they do not accumulate or something Dec 28 01:40:37 Kieronboz no problems here http://i.imgur.com/bomDk.png Dec 28 01:40:59 strange Dec 28 01:42:49 maybe ill rewrite it Dec 28 01:42:55 Kieronboz can you see what eclipse thinks is the matching bracket for }); ? Dec 28 01:43:32 its setonitemselectedlistener, paired with that one Dec 28 01:44:56 maybe you need to fix your import Dec 28 01:45:25 is there any way to get sdcard path without hardcoding if getExternalStorageDirectory() returns my internal? Dec 28 01:45:40 deleting all imports then adding again didnt work either :/ Dec 28 01:45:56 Kieronboz write curSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() Dec 28 01:46:06 not just OnItemSelectedListener Dec 28 01:46:40 xorgate, i've looked at the dms (dds? whatever) perpsective in eclipse, i dont think ive seen allocations per process, is there some trick? Dec 28 01:47:03 are you talking about the one where you press a "start" button to start tracking ? Dec 28 01:47:33 k0nichiwa idunno.. it's been a year since i used eclipse.. but i'm pretty sure there's a tool to monitor the allocations Dec 28 01:48:00 yeh added the adapterview. and no joy either. Ill start the section again Dec 28 01:48:39 Kieronboz paste the entire .java in https://gist.github.com/ Dec 28 01:49:21 https://gist.github.com/4393802 Dec 28 01:49:40 lol Dec 28 01:49:45 ok move that top part into onCreate Dec 28 01:49:50 and after setContentView Dec 28 01:49:58 Did i do so badly you laughed Dec 28 01:50:06 the spinner part i mean Dec 28 01:50:28 you see you are writing action code inside the class 'declaration' Dec 28 01:50:53 Kieronboz i never would have guessed without the full picture Dec 28 01:52:39 so like this https://gist.github.com/4393822 Dec 28 01:52:55 I think i cocked up the brackets now though, so i will dig through those lol. Dec 28 01:53:00 no Dec 28 01:53:20 you are not grasping what is happening in setOnItemSelectedListener Dec 28 01:53:41 its saying when something is picked in spinner, set it to this? Dec 28 01:53:48 you tell the spinner to call back to a certain object on item select Dec 28 01:54:01 the spinner sits in waiting Dec 28 01:54:04 until you select Dec 28 01:54:05 ok yeah Dec 28 01:54:10 and then it asks, who do i tell Dec 28 01:54:16 you made an object for this Dec 28 01:54:28 new AdapterView.OnItemSelectedListener Dec 28 01:54:32 which has some specifics Dec 28 01:54:33 yes i did Dec 28 01:54:49 for example 'public void onItemSelected(bla)' Dec 28 01:55:00 this is part of the listener Dec 28 01:55:14 it's part of the definition (!) of the listener Dec 28 01:55:44 Ok i think i understand now. Dec 28 01:57:59 ok so the Spinner = spinner line goes into the oncreate yeah? Dec 28 01:58:12 yes, after setContentView Dec 28 01:58:22 ok no errors there lol. Dec 28 01:58:57 So does curSpinner.setOnItemSelectedListener still need brackets wrapping onitemselected, and nothingselected? Dec 28 01:59:22 think so Dec 28 01:59:52 much easier to do this, but https://gist.github.com/4393838 line 16 is in the correct place now isnt it? Dec 28 02:00:06 Im getting sleepy but im determined to finish this lol. Dec 28 02:00:13 no you ignore my comment about placing it in onCreate Dec 28 02:00:33 When you said top part, I thought you meant the top section of the code outside of the public void Dec 28 02:00:58 on onCreate you find the spinner, but do nothing with it Dec 28 02:02:06 yes i was being imprecise Dec 28 02:02:55 ok slightly less errorly now Dec 28 02:03:20 http://puu.sh/1Gapw still not sure ive done it right Dec 28 02:03:27 but at this stage im blaming exhaustion lol Dec 28 02:03:37 let me fix it Dec 28 02:04:07 the onCreate() method is practically your main() method Dec 28 02:04:58 I see Dec 28 02:05:19 https://gist.github.com/4393859 Dec 28 02:06:17 you are a god amongst men Dec 28 02:06:37 well i wouldnt call them men :) Dec 28 02:07:33 Can i concatinate in toast? Dec 28 02:07:42 personally i prefer to let my activity implement OnItemSelectedListener and do mySpinner.setOnItemSelectedListener(this); Dec 28 02:07:55 it expects a string Dec 28 02:08:03 you can put any string you want Dec 28 02:08:49 So how would I concatinate in java, "Chosen" after the spinner variable? Dec 28 02:08:51 lol Dec 28 02:08:57 USD Chosen Dec 28 02:09:04 or Selected Dec 28 02:09:05 strBla + " chosen" Dec 28 02:09:16 ah pretty simple Dec 28 02:09:20 i forgot the + Dec 28 02:10:09 it's pretty important to understand why what you did, did not work Dec 28 02:11:22 It all needed to go within the oncreate Dec 28 02:12:19 I feel like ive progressed a tonne but i have caught the click now havent I Dec 28 02:12:21 lol Dec 28 02:12:43 yessir Dec 28 02:12:57 and its only 2:12am Dec 28 02:13:23 3:12 here Dec 28 02:13:29 pm? Dec 28 02:13:51 holland, am Dec 28 02:13:57 your nick anything to do with circuitry or just a name Dec 28 02:14:18 both :) with my desire to disagree Dec 28 02:14:30 awesome Dec 28 02:14:52 I need to force my EditText to open numbers Dec 28 02:15:40 it has inputType Dec 28 02:15:49 its numbdecimal isnt it Dec 28 02:15:51 or something Dec 28 02:16:29 nailed it Dec 28 02:16:55 RIGHT Dec 28 02:17:32 so to confirm I have set the first variable StrChosenRace (now known as chosencur, as a string containing Euro Dec 28 02:18:41 using strings as identifiers is normally frowned upon Dec 28 02:19:00 unless yiu use standard defined currency codes Dec 28 02:19:09 you need to convert the input to a number Dec 28 02:19:18 anyway you can measure the distance between you and the wifi router? Dec 28 02:19:27 of which "Euro" is not Dec 28 02:19:34 a hack i can think of is using the signal strength as a radius Dec 28 02:19:36 find some triangulation software Dec 28 02:19:39 kaikai: a yape measure Dec 28 02:19:41 kaikai no i could stand in front Dec 28 02:19:48 mhm Dec 28 02:20:02 so theres no way to measure like the Dec 28 02:20:12 travel time between router and cellphone? Dec 28 02:20:16 kaikai: signal strength is not equidistant radially Dec 28 02:20:18 and then in that way get distance? Dec 28 02:20:35 anoia: i understand, a wood wall would provide a better signal strength the a metal one Dec 28 02:20:47 anythinh in the way will attenuate the signal Dec 28 02:21:11 andost arials have ellipsoid propogation anyway Dec 28 02:21:14 just trying to create a simple app to mess with my sisters head when playing hide and seek or something rof Dec 28 02:21:34 right i need to do that thing you said ages ago Dec 28 02:21:38 gps may ne better :P Dec 28 02:21:49 gps is only accurate in a minimum of 300 feet =[ Dec 28 02:21:52 arraylist Dec 28 02:21:58 it may be accurate below that but still Dec 28 02:22:16 kaikai: about 3 normally Dec 28 02:22:17 Kieronboz first, think of a way to couple "Euro" and 1.23 Dec 28 02:22:25 and "GBP" and 1.0 Dec 28 02:22:26 not accurate enough for me haha, so is there anyway to know when router sends signal so I can compare it to when its received? Dec 28 02:22:29 inside is worse though Dec 28 02:22:38 ok Dec 28 02:22:43 give me a minute. :p Dec 28 02:22:44 kaikai: nope Dec 28 02:22:53 (actually i already told you how :) Dec 28 02:23:02 anyone here use IntelliIDEA? Dec 28 02:23:10 where is the android SDK on hd? Dec 28 02:23:14 Bitgod sure do Dec 28 02:23:14 did you, lol Dec 28 02:23:23 where ever you installed it :p Dec 28 02:23:27 youcd need a roundtrip, but mwasuring speed of light needs a bit more precision Dec 28 02:24:01 sorry about my typing, i'm using the phone Dec 28 02:24:13 hello all. According to http://en.wikipedia.org/wiki/Android_version_history and android api docs, the SIP api are present from android 2.3. Can i assume that phones with 2.3 have those api or is common for stock images from operators to drop them? Dec 28 02:24:40 i cant find the sdk packages i installed Dec 28 02:24:43 * Bitgod gets mad Dec 28 02:24:57 anoia: its fine, ehh ill keep looking, or I can manaully do it and walk around the house measuring wifi haha Dec 28 02:25:05 nextime if you can check, do that Dec 28 02:25:07 i think its default in a hidden file c:/users//.android Dec 28 02:25:09 WIN7 intelliJ user - Android SDK is under my program files (x86) Dec 28 02:25:11 if not, assume it's there Dec 28 02:25:18 ok its under appdata for me lol Dec 28 02:25:29 kaikai: sorry :( Dec 28 02:25:52 the above one is for the AVD Dec 28 02:25:57 Lets see here, I have a linearlayout thats vertical, I want the top view and bottom view to have a height thats wrapping content and the middle view have the rest of the screen space, how do I do that? Dec 28 02:26:00 the data you want is just not practical Dec 28 02:26:19 I have tried layout_weight of 1 to middle view and layout_height of 0px Dec 28 02:26:27 maybe with more acces points, you can triangulate Dec 28 02:26:42 xorgate, would a second array tie up with my first, through ID's or something? Dec 28 02:26:44 xorgate: of course i will check, but as i'm in a pre-explore step on how to write my app, i'm thinking if i will need to include pjsip or i can safely assume that the vast major of the case i will have voip api Dec 28 02:27:09 Kieronboz that's why i suggested making a class for it Dec 28 02:27:18 and so avoid to compile pjsip with the ndk Dec 28 02:27:54 right Dec 28 02:28:44 nextime but if you're careful you can also make an array of numbers Dec 28 02:28:51 and keep it in sync with the titles Dec 28 02:29:16 well either choice is likely going to test me so which would you recommend lol Dec 28 02:29:25 s/nextime/kieronbox/ Dec 28 02:29:25 :D Dec 28 02:29:31 for ease now, make another array Dec 28 02:29:34 class keyed on the id Dec 28 02:31:20 ok will make an array now Dec 28 02:31:50 and then if the n-th item was clicked you know it belongs to the n-th value Dec 28 02:32:03 just like that ;) Dec 28 02:33:54 is there a library or package i can look up to see what it is you think I should do lol Dec 28 02:33:55 okay, new question Dec 28 02:34:06 how would I get the ping of the router and phone? Dec 28 02:34:09 Kieronboz que Dec 28 02:34:12 or response time* Dec 28 02:34:25 que? Dec 28 02:34:44 queue? Dec 28 02:34:51 or you saying something else Dec 28 02:34:51 lol. Dec 28 02:36:19 ¿Qué? Dec 28 02:36:41 not even gonna pretend to know what your talking about now Dec 28 02:36:42 lol Dec 28 02:37:01 its spanish for 'what?' Dec 28 02:37:08 Ah Dec 28 02:37:15 ive just had a brainwave Dec 28 02:37:39 there is no universal value in currency, the rate obviously changes every time the currency does Dec 28 02:37:54 yes Dec 28 02:38:02 but it matters not Dec 28 02:40:04 because bacon is always a nickle. Dec 28 02:45:42 started force closing on my nexus now Dec 28 02:45:57 look at logcat Dec 28 02:47:04 it was because i changed the layout order Dec 28 02:47:15 I wanna do Convert This much "" From "" To "" Dec 28 02:47:28 If I set the layout_weight of one element to 1 and the other elements in the same LinearLayout has a layout_weight of 0, the one having 1 should take up the remaining space, right? Dec 28 02:47:54 Provided it has a layout_height of 0px (this is all vertical) Dec 28 02:50:42 Ok layout is all set, xorgate you have anything to read in regards to pairing up the array i added with the 1.0 values? Dec 28 02:51:05 no just be precise Dec 28 02:51:39 in that the arrays have same length, and every item has a corresponding item in the other array, at the same index Dec 28 02:51:42 then you're good Dec 28 02:52:42 But why would they be comparable, one is Euro and one is 1.1 Dec 28 02:52:46 :p Dec 28 02:53:08 thats not what i said Dec 28 02:55:48 So i need to do now curSpinner * tarSpinner Dec 28 02:55:59 or whatever it is Dec 28 02:56:26 no you fetch the input from the user, this is a number Dec 28 02:56:40 then you see what the string is in the first spinner Dec 28 02:56:44 then you match it to a value Dec 28 02:56:48 from your array Dec 28 02:56:57 then you do the same for the other spinner Dec 28 02:57:42 so you have inputValue, inputCurrencyValue and outputCurrencyValue Dec 28 02:58:07 output = (inputValue / inputCurrencyValue) * outputCurrencyValue Dec 28 02:58:21 are you guys talking about currency conversions? Dec 28 02:58:31 or is this an arbitrary problem? Dec 28 02:58:45 its more of a lecture Dec 28 02:58:47 lol Dec 28 02:59:58 ok so my edittext has an ID of inputvalue, whats the library to save that value? **** ENDING LOGGING AT Fri Dec 28 02:59:58 2012