**** BEGIN LOGGING AT Sat Oct 20 03:00:03 2012 Oct 20 03:29:14 Is the guy here who was trying to use a custom font and having trouble having it rendered properly on some devices? Oct 20 03:44:35 So, I've started trying to learn a little about Android programming but I'm having some issues Oct 20 03:44:47 I'm trying to change the text in a TextView object Oct 20 03:45:10 From what I've read that means going TextView testText = (TextView) findViewById(R.id.textView1); then changing testText Oct 20 03:45:18 Correct Oct 20 03:45:28 But as far as I can tell you can only create that in the "onCreate" method. Oct 20 03:45:36 And then it becomes private to that method. Oct 20 03:45:47 So I can't use it on a button press that calls some other function Oct 20 03:45:53 Move the scope of the TextView testText outside of the onCreate Oct 20 03:46:05 just get a handle to it in the onCreate Oct 20 03:46:32 Ah, put it between the functions in MainActivity? Oct 20 03:46:38 If that does not make sense you may want to look at some java tutorials Oct 20 03:46:53 * Striker121 had tried putting it below the import packages originally Oct 20 03:46:54 usually you put it at the top, under the class declaration Oct 20 03:46:57 It's been awhile Oct 20 03:47:39 Ah, right. Variables go there, then normally you'd put things under the class declaring of public void MainActivity (stuff) Oct 20 03:47:44 public class ActivityEntryPoint extends Activity { set fields here (ie TextView mTestTextView) then methods etc etc } Oct 20 03:47:52 yeah Oct 20 03:47:59 Coming back to me now, thanks a bunch Oct 20 03:48:22 The other thing is that when you inflate a view, Oct 20 03:48:28 Just gotta get a button and some bluetooth communication up. Hopefully that's fairly easy. Oct 20 03:48:31 Inflate a view? Oct 20 03:48:43 you may find you need to use a LayoutInflater to inflate a view later on Oct 20 03:49:07 What do you mean by "Inflating" a view? Oct 20 03:49:29 uhh its kinda complicated more than I care to explain if you're not implementing something like that Oct 20 03:49:41 Haha, okay then. Oct 20 03:49:47 but what I want to point out is that the method findViewById works in the activity because you've called setContentView(layout) Oct 20 03:50:14 and as a result its really layout.findViewById so later on if you do something where you inflate a view, remember to prefix the findViewById with the view name Oct 20 03:50:23 as in mView.findViewById() Oct 20 03:50:26 Yep, I had worked that one out, that was why I thought I had to use it under onCreate Oct 20 03:50:46 usually that's where you get the handles ;p Oct 20 03:50:50 Actually, should I put a "setContentView" before the testText declaration? Oct 20 03:50:59 on Oct 20 03:51:02 *no Oct 20 03:51:02 It isn't giving me an error at the moment, but it makes sense to me Oct 20 03:51:18 you have to call setContentView before using findViewById Oct 20 03:51:35 but the TextView should (in this case) be a class scoped variable Oct 20 03:57:54 testing Oct 20 03:59:03 Lasserix, I try running the code but it crashes on the emulator, no errors given Oct 20 03:59:12 Anything particularly obvious you could think I might have done? Oct 20 04:04:35 copy into pastebin Oct 20 04:05:55 http://pastebin.com/bxjTEXrR Oct 20 04:06:20 Oh...and one possibly relevant declaration, one second Oct 20 04:06:51 Ah Oct 20 04:07:18 Would having something in activity_main that doesn't connect to any declaration (I line of code outside of them) cause a crash? Oct 20 04:07:25 I can't imagine why it wouldn't give me an error Oct 20 04:07:57 problem is Oct 20 04:08:20 you can't use findViewById if there is no layout to find it in, that's what I was trying to explain earlier Oct 20 04:08:37 * capella wonders if anyone else is frustrated with eclipse IDE ? and what my options are: netbeans? Oct 20 04:08:38 Ie setContentView must be called first Oct 20 04:08:44 so Oct 20 04:08:52 Striker121> Actually, should I put a "setContentView" before the testText declaration? Oct 20 04:08:53 <lasserix> on Oct 20 04:08:53 <lasserix> *no Oct 20 04:09:17 That explains the confusion then :) Oct 20 04:09:26 Or am I thinking through this wrong still? Oct 20 04:09:32 http://pastebin.com/pEw3sbBB Oct 20 04:10:55 Ah, that makes more sense Oct 20 04:11:00 I gota run an errand but if you're still stuck i should be back later Oct 20 04:11:02 goodluck Oct 20 04:11:13 I was wondering how setContentView would work outside of the class functions (It doesn't) Oct 20 04:11:14 Thanks Oct 20 04:17:00 capella netbeans lmao Oct 20 04:18:57 ?? :) Well Eclipse is bugging me ... Oct 20 04:20:24 is netbeans a technically incorrect choice? or more a matter of personal preference? Oct 20 04:25:44 if you use netbeans you will be a minority so I hope you know what you're doing Oct 20 04:27:22 I use intellij and it owrks fine Oct 20 04:27:22 :D Oct 20 04:29:27 ah! ive seen that as an option also ... my host OS is WIN but im developing fennec for mozilla, so I have to use an ubuntu VM ... Eclipse in Ubuntu has many annoying habits ... if I try jworks can I run it under WIN Oct 20 04:29:28 (i can google this of course) Oct 20 04:34:42 drazak_: is IntelliJ better than Eclipse? (just trying to find a half decent IDE to do some programming in..) Oct 20 04:34:49 I like it Oct 20 04:35:07 Am using win7 and appinventor, and have been trying to zipalign my app for the past two hours Oct 20 04:36:35 I had a bunch of issues with App Inventor Oct 20 04:36:51 hey ewong! another mozillian works his way in ! Oct 20 04:36:52 * Striker121 is currently in the process of learning to program Android via Eclipse now Oct 20 04:37:21 am using eclipse for another app Oct 20 04:37:47 capella: :) Oct 20 04:38:30 * capella thinks any IDE like Eclipse that comes with a CLEAN button knows it's gonna get confused a lot :P Oct 20 04:38:44 but whats the better alternative? Oct 20 04:40:51 * capella looks into IntelliJ Oct 20 04:44:02 ditto Oct 20 04:47:42 looks interesting Oct 20 04:48:19 hi, what would you guys recommend for xml parsing? DOM or SAX Oct 20 04:48:29 downloading... :) Oct 20 04:49:25 ditto as well Oct 20 04:49:56 heh - copycat Oct 20 04:49:58 capella which one are you downloading..? the ultimate one or the community one? Oct 20 04:50:14 oh - community didnt see ultimate Oct 20 04:51:17 DOM or SAX in android for xml parsing ? ? Oct 20 04:51:31 http://www.jetbrains.com/idea/features/editions_comparison_matrix.html?IU Oct 20 04:52:00 DOM B) Oct 20 04:52:16 * capella but what do I know :P Oct 20 04:53:46 no issues with memory on device with DOM capella ? ? Oct 20 04:54:36 well honestly? Im used to DOM parsing for projects like Firefox ... android is my laest excursion so Im partially biased Oct 20 04:54:44 (and perhaps uninformed) Oct 20 04:55:06 no problem Oct 20 04:55:25 found a useful resource while strolling on Interwebz about this Oct 20 04:55:29 but thats why i found this room - for a neweer / better perspective :P Oct 20 04:55:30 going with SAX Oct 20 04:55:45 here is the reference http://steveliles.github.com/comparing_java_xml_parsing_mechanisms_for_android.html Oct 20 04:56:35 stuff like this is easy to find - http://allu.wordpress.com/2006/12/28/difference-between-sax-and-dom-parsers/ Oct 20 04:56:37 memory requirements might affect my perspective while doing native android apps Oct 20 04:56:55 firefox is grandfathered on me DOM Oct 20 04:57:23 I one tried parsing a 800 MB file with DOM Oct 20 04:57:31 it was a disaster Oct 20 04:57:41 heh Oct 20 04:57:49 wrote a tailor made parser in C++ for the task Oct 20 04:58:05 and you can imagine the rest ;-) Oct 20 04:58:10 smooth as silk Oct 20 04:58:21 yah .... um hm Oct 20 04:59:30 because I was expecting that in future I might have to parse much bigger files based on the schema, so tailor made parser was not a bad idea in my opinion Oct 20 04:59:54 you wrote a C++ routine to support markup navigation under android ? oh - maybe ubuntu lets you do that Oct 20 05:00:26 no, it was for someother thing Oct 20 05:00:35 I thought C++ and JAVA developement for android dont play well together Oct 20 05:00:39 oic Oct 20 05:00:40 not even remotely related to adnroid Oct 20 05:01:01 there is NDK when there is a will Oct 20 05:01:10 :-P Oct 20 05:01:15 yah - havent gotten there yet personally Oct 20 05:02:33 well, you would definitely get there when you want to Oct 20 05:03:05 ok - i get you now... DOM was bad in the past for you, and like me, you're moving into android and thinks SAX is better choice now Oct 20 05:03:07 Might be true for both of us Oct 20 05:03:40 yup Oct 20 05:04:21 And for C++ for Android ... I considered Source-ery? (I think it was) Oct 20 05:04:30 even on PC with memory greater than what we have on droids, it sucked big time and I ended up writing my own parser Oct 20 05:05:16 but now I have small files to take care of, so it won't hurt if I use best of the DOM, SAX or anyother contender in the field Oct 20 05:05:55 I suppose ill stick to DOM until i hit a wall and find out why not :) Oct 20 05:07:00 yeah you can but I have banged my head on the wall once, so not much worthy for me to retry :-P Oct 20 05:14:13 Hi, I am creating an app where user can capture photo from camera and upload on facebook. I was wondering that how to do it properly.. Should I first save the file in /sdcard/tmp and upload the file from there, and then delete the file from tmp? Any better way to implement this? Oct 20 05:15:50 there is presumably some way of making a temporary file that you want automatically cleaned up. Oct 20 05:16:01 i've no clue though Oct 20 05:16:21 SpeedEvil, ok thanks Oct 20 05:16:30 you don't want the file to persist if your app gets I terrupted halfway through Oct 20 05:17:26 one more thing.. I am sure android tmp directory works the same way as tmp directory in Linux, right? Oct 20 05:17:45 that is file gets deleted on reboot Oct 20 05:23:06 subhojit777: you may also want to look at the cache dir Oct 20 05:23:28 subhojit777: every app gets its own cache dir (somewhere near /data/packagename/cache/) which is chmod protected Oct 20 05:23:39 subhojit777: but if the os is low on space, it will dig thru cache dir's and delete things Oct 20 05:24:16 those i believe are kept across reboot, so they can be used to save cellular bandwidth Oct 20 05:24:51 clever, right.. Oct 20 05:30:05 ewong - Im liking the windows intelliJ IDE @first glance Oct 20 05:34:11 how can i get the root view of a dialogfragment, not of the parent activity? Oct 20 05:34:28 intelliI install on WIN7 similar to Eclipse install on Ubuntu Oct 20 05:34:36 it's a dialog. getrootview returns the *activity*'s root view, not the dialog's Oct 20 05:41:57 auugh. i didn't realize that dialogfragments get spliced into the activity's view heirarchy Oct 20 05:44:38 well .. isnt that how it works? hang the dialog off the root kinda thing? Oct 20 05:45:29 * capella assumes alert boxs and such are similar? Oct 20 05:45:55 right, i guess it makes sense. wasn't expecting that though; i thought with fragments that they were their own thing. Oct 20 05:47:20 no ... not like switching to another app or anything ... ? Oct 20 05:56:06 I have overridden the onTouchEvent() method in my activity. But it is not fired when I swipe over a viewFlipper in my activity. It works everywhere else in my activity. What could be wrong? I'm trying to recognize swipe to flip views in the viewFlipper. Oct 20 05:56:46 also this view flipper is inside a frameLayout Oct 20 06:01:28 i don't know much about flippers, but something is consuming the touch event before the activity sees it Oct 20 06:01:38 probably the viewflipper, if i had to guess Oct 20 06:03:39 is it a good practice to reuse a layout + activity when one can, or its better to have two different activities ? ? Oct 20 06:06:05 Looney know fragments? Oct 20 06:06:41 will see into it lasserix Oct 20 06:06:57 principle of fragments is a unit of reusable ui Oct 20 06:07:03 ahh Oct 20 06:07:05 nice Oct 20 06:57:22 having some weird issues with my fragment (first one ive made), it doesnt seem to be visible at all in the ui Oct 20 06:58:55 http://privatepaste.com/802f656a06 is the code Oct 20 07:07:44 aha!, i want onCreatView not onCreate! Oct 20 07:13:51 this is still open O.o http://code.google.com/p/android/issues/detail?id=29472 Oct 20 07:14:06 no owner :) Oct 20 07:38:27 Is there a way to set a linemark in ecclipse so I can jump back to a particular line with a click? Oct 20 07:43:54 lasserix: eclipse has bookmarks Oct 20 07:44:38 too much overhead, was looking for something like setting debug points but thanks Oct 20 07:46:05 like click next to line number, scroll to somewhere else change something, click thingy next to line number jump back / removes marker Oct 20 07:47:26 You can probably set a keyboard shortcut or something Oct 20 07:47:42 for the bookmarks? Oct 20 07:49:30 yes Oct 20 07:49:32 hmm maybe if i can jump to nearest breakpoint Oct 20 07:53:23 no jump to bookmark or anything, anyways thanks not a huge deal just little time savers like that add up over a life time you know? ;p Oct 20 07:58:57 W/Watchdog( 167): *** WATCHDOG KILLING SYSTEM PROCESS: com.android.server.am.ActivityManagerService Oct 20 07:59:06 this vm image is a bit too slow!! Oct 20 08:04:33 so is my VMWare's Ubuntu... Oct 20 08:05:40 capella: thats less likely to commit suicide when it see's how slow it is! Oct 20 08:06:51 still "snapshots" come in handy ... ive fragged the VM by being impatient :( Oct 20 08:07:36 * capella is basically a WIN guy - but not WIN8 ... that doesnt count Oct 20 08:08:41 if your using LVM on the host, you can snapshot the whole os without using a vm Oct 20 08:08:51 but root on lvm is a bit more tricky Oct 20 08:11:30 E/AndroidRuntime( 1516): java.lang.RuntimeException: Unable to instantiate service com.angeldsis.aewatcher.GCMIntentService: java.lang.IllegalAccessException: access to class not allowed Oct 20 08:11:40 hmmmmmm, not sure what the cause is :S Oct 20 08:29:11 found it, i had to declare the class as public Oct 20 08:33:19 I am trying to get the soft keyboard to hide when a user clicks anywhere on the action bar, i'm using ABS. Is there an R.id. i can add to my keyboardtogglevisibility observer? Oct 20 08:36:01 lasserix: the only thing you will find in R.id is the stuff in R.java, which you can read inside gen/ Oct 20 08:37:41 ahh yeah there are just a lot of them, was hoping someone knew root of ABS actionbar Oct 20 08:37:43 but thanks Oct 20 08:39:04 if its not in R.java, then there must be some other way, that doesnt involve R Oct 20 08:39:49 ahh I can just probably call the hide method in the option items selected in the activity Oct 20 08:39:51 thanks Oct 20 08:41:40 hmm how to get a handle on the overflow button Oct 20 08:42:31 my app hasnt even gotten to the soft keyboard yet Oct 20 08:43:05 simple stuff Oct 20 08:43:28 is there a way to prevent notification spam- from apps such as FLCommando Oct 20 08:43:43 clever: http://pastebin.com/DQmpdvJt Oct 20 08:44:09 you might want to use this, because getting the keyboard to hide when you click outside of the edit text (anywhere) can be a pain to call the hide method Oct 20 08:44:17 the argument passed is the view root in your xml Oct 20 08:44:26 *in the future if you are using edittexts Oct 20 08:45:09 Sculptor if you go into settings->apps->apps causing you can uncheck show notifications Oct 20 08:46:57 thanks. so simple Oct 20 08:47:30 morning Oct 20 08:47:37 how could i animate the alpha of a custom view? Oct 20 08:47:53 i know how to make an animator, i don't know what to use for the property Oct 20 08:49:21 oh duh, there's an AlphaAnimation object Oct 20 08:49:27 hehe Oct 20 08:57:22 Question: when creating an app, is there a way to listen for the "call connected" from the caller's phone once a callee is dialed? Oct 20 08:59:31 even if there is, it won't work on some networks Oct 20 08:59:42 e.g., CDMA doesn't give a connect indication to the phone at all Oct 20 09:01:18 I only need it to work on my network (GSM). You know of any way rooted or not? Oct 20 09:15:36 I just read something that may sound promising... Is it possible to run a loop once a call is started, pull the last call out of the call history, and check it's length to determine whether or not a current call has been connected? Oct 20 09:22:10 <[Zondr3]> Anyone here who has developed with NFC tags and Android? Oct 20 09:47:39 hi Oct 20 10:14:28 hi RobinB Oct 20 10:15:01 quiet in here this morning! Oct 20 10:15:05 * RobinB sips a tea Oct 20 10:15:50 well let me shoot you a question then Oct 20 10:15:52 http://pastebin.com/PjGVBztk Oct 20 10:16:20 this snippet is doing not what it is expected to do Oct 20 10:16:26 what does it do? Oct 20 10:16:33 xmlAnswer is a String Oct 20 10:16:58 read an xml and store it to a String Oct 20 10:17:27 yes, but what does it do? :) Oct 20 10:17:42 no exception Oct 20 10:17:48 not Log.d response Oct 20 10:18:01 hmm Oct 20 10:21:15 I hate that everyone uses this bufferedreader/readline loop to slurp entire response Oct 20 10:21:48 ok, so what do you propose Oct 20 10:22:05 and if the response is indeed xml document, then for the love of god, pass the inputstream as is to the documentbuilder's parse Oct 20 10:22:23 when you convert it to string first you can mess up xml encoding in the process Oct 20 10:22:40 documentbuilder Oct 20 10:22:48 do I smell DOM ? ? Oct 20 10:22:52 or was it documentbuilder.newDocument().parse() Oct 20 10:23:10 indeed. hate it if you want, but at least it is there and does the job correctly. Oct 20 10:23:55 :'( Oct 20 10:24:23 So if I'm building for my Galaxy S3 device (android version 4.0.4) I set intelliJ to use SDK for Android 4.0.3 (API 15) instead of SDK for Android 4.1.2 (API 16) right? Oct 20 10:25:16 capella: sort of irrelevant. minSdk is the key that determines compatibility. Your targetsdk can be sort of whatever as long as you promise to not use features that weren't present at minsdk level Oct 20 10:26:06 the interpretation for targetsdk is that it is what you tested the application to work correctly with. It also exposes you the new methods, and makes you deal with new deprecations in some way, of course. Oct 20 10:26:35 hmmm i build using api 16 but got error Failure [INSTALL_FAILED_OLDER_SDK] while trying to adb install / run Oct 20 10:26:53 maybe you did not do the minsdk thing then. Oct 20 10:27:10 (first time trying with intelliJ / when I used Eclipse the code worked ok) Oct 20 10:27:35 * alankila shrugs. It's not been a problem to me, but I only use eclipse. Oct 20 10:29:27 could be a situation where intelliJ fails to import something from my eclipse project Oct 20 10:29:42 * capella shrugs too ... continues hacking @ it Oct 20 10:33:35 man, these fuckers at morgan kaufman want to charge $90 for a drm'd ebook Oct 20 10:49:12 Good material http://com.odroid.com/sigong/nf_file_board/nfile_board_view.php?bid=98 Oct 20 10:49:52 Hi guys Oct 20 10:51:37 If I want to design a background image for my app, and for all 4 device sizes (normal, large, extra large...) I guess that I must to design it in 4 different sizes in photoshop, but... what sizes for each sreen size? I mean, what is the width x height size for normal, and for large, etc.. Oct 20 11:02:56 Hey! I've been trying to play some videos through the VideoView widget, but everything I try and no mater what video file (mp4,3gp) it says "Cannot play video". Any tips? Oct 20 11:03:42 Sepho: hmm... consider making the image as 9patch, and create renders in few different DPI Oct 20 11:23:59 hello guys, I have master fragment (ListFragment) with list of events and after click on item in list I open detail fragment (using replace(...) method of EventTransaction), but after click on back button in detail fragment, application gets closed instead of returning to master fragment (I do call addToBackStack(null) for that transaction), any ideas? Oct 20 11:33:31 jay_gridley: what do you mean by clicking the back button in the fragment? Oct 20 11:33:52 click on hardware back button Oct 20 11:33:56 ah Oct 20 11:34:21 maybe I should implement UP navigation in this case, right? Oct 20 11:34:30 well, what do you want to accomplish? Oct 20 11:34:43 do you want it to go back to the empty detail fragment? Oct 20 11:35:05 no, want it to go back to master fragment with list of all events Oct 20 11:35:35 I'm assuming you have a two-column layout Oct 20 11:36:17 but you have one big container? Oct 20 11:36:59 yes, one container, both fragments inside of it (developing for phone this time) Oct 20 11:37:20 I think it's customary to have one activity per fragment in the phone case Oct 20 11:37:31 instead of one container activity for all fragments Oct 20 11:37:46 at least, the fragment example on developer.android.com does this Oct 20 11:38:06 no that defeats the whole point Oct 20 11:38:13 they do that because its a introductory tutorial Oct 20 11:38:36 lasserix: why does it defeat the point? Oct 20 11:38:37 I think is should use fragments instead of activities for master-detail scheme Oct 20 11:38:47 a fragment is a logical unit of reusable ui Oct 20 11:39:04 lasserix: yes, and it can still be even if you use one activity/fragment in the phone case Oct 20 11:39:17 the whole point is to be able what used to take seperate activities to do in one Oct 20 11:39:42 as long as you manage your fragment stack it is far more convient to use the activity as a host to fragments Oct 20 11:39:56 instead of creating excess activities per fragment Oct 20 11:40:16 lasserix: if you design your fragments properly (as they indicate in that example) then it won't matter if you have 1 activity per fragment or 1 activity holding all fragments Oct 20 11:40:17 have the same opinion as lasserix Oct 20 11:40:19 at least in the principle of reuse, why create unnecessary activities when you don't need them? Oct 20 11:40:20 or 2, or 8, or whatever Oct 20 11:41:02 right but again why create unnecessary activities if you can handle your fragments in one activity? Oct 20 11:41:12 lasserix: because activities provide benefits? such as multiple entry points in your app Oct 20 11:41:46 that doesn't translate into one activity per fragment though? Oct 20 11:42:30 lasserix: it doesn't have to, no, but the amount of extra work is small and it forces you to design your fragments properly Oct 20 11:42:54 i guess so, sorry I just thought the whole point of fragments was less overhead Oct 20 11:43:02 guys, can we go back to my problem? :-) I need a way how to navigate back to master fragment from detail fragment using hardware back button Oct 20 11:43:19 I mean I use a home->browse->browse detail->content list/page and on my old froyo phone no problems with all of them in one activity Oct 20 11:43:24 jay: sorry, Oct 20 11:43:49 you can ovveride on the back button and then do a total fragment stack pop Oct 20 11:44:17 jay_gridley: this should just work though, the way you describe it Oct 20 11:44:37 jay_gridley: if you have 1 fragment container, replace a fragment and add it to the stack Oct 20 11:44:38 I think it should be default Android behavior, that back button press returns to master fragment, am I wight? Oct 20 11:44:52 jay_gridley: could you pastebin your fragment transaction code? Oct 20 11:45:04 yy, wait a sec Oct 20 11:45:04 is there a way to compile an android library projekt to a binary output? Oct 20 11:45:06 jay: if you use the fragment back stack then it acts as a stack, first in first out Oct 20 11:45:12 *first in last out i mean Oct 20 11:45:42 so if by master fragment you mean the fragment at the bottom of the stack, you have to pop each fragment off until you get to it Oct 20 11:46:10 however if you have 3 > fragments on the stack, the user will probably be more familiar with going fragment at a time, like clicking back and forward on a web browser Oct 20 11:46:23 http://pastebin.com/DBT4zEfm Oct 20 11:46:25 ie: hitting back on your web broswer only goes to your homepage if your homepage was the last website Oct 20 11:46:37 the way how I create detail fragment Oct 20 11:48:27 this code is in your list fragment right? Oct 20 11:48:34 yes Oct 20 11:48:35 jay_gridley: that looks right Oct 20 11:48:51 jay_gridley: could you try adding the 'initital' fragment to the back stack as well? Oct 20 11:48:58 ie, the fragment you want to return to Oct 20 11:49:18 I am putting it on stack too Oct 20 11:49:55 What's the code for adding the list fragment? Oct 20 11:50:25 inside of MainActivity I create master fragment (putting it on stack during transaction), and inside of master fragment I create detail fragment (also putting it on stack - as you can see on pastebin code) Oct 20 11:50:41 FragmentManager fragmentManager = getFragmentManager(); Oct 20 11:50:41 FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); Oct 20 11:50:41 fragmentTransaction.replace(R.id.fragment_container, new EventListFragment()); Oct 20 11:50:41 fragmentTransaction.addToBackStack(null); Oct 20 11:50:41 fragmentTransaction.commit(); Oct 20 11:51:15 in your main activity if you have to call getSupperFragmentManager() Oct 20 11:51:21 http://pastebin.com/4piaWUYn Oct 20 11:51:24 jay_gridley: that also looks right Oct 20 11:51:25 *getSupportFragmentManager Oct 20 11:51:38 lasserix: no, it depends whether you use the support library or not Oct 20 11:51:46 Are you sure? Oct 20 11:51:47 if you're targeting 3.0+ this is fine Oct 20 11:51:48 I do not Oct 20 11:52:26 jay_gridley: but hmm, this should just work Oct 20 11:52:48 I've implemented the exact same thing a number of times and it works the way it's supposed to Oct 20 11:52:49 I know, but it does not, for some uknown reason Oct 20 11:53:17 jay_gridley: are you calling finish() on the activity by accident anywhere? Oct 20 11:53:42 jay_gridley: also, this has nothing to do with your bug, but you should not push a new fragment from the current fragment Oct 20 11:53:55 since it couples your fragments to one specific layout Oct 20 11:54:27 ie, if you want to show the fragments side-by-side now, then you'll need to add that to the code of masterlayout Oct 20 11:54:32 *masterfragment Oct 20 11:55:01 you should instead have a callback interface implemented by the activity that contains the fragment Oct 20 11:56:00 so detail fragment should be created and replaced by MainActivity instead of master fragment> Oct 20 11:56:11 ? Oct 20 11:56:16 yes Oct 20 11:56:30 ok, will do that Oct 20 11:59:21 jay_gridley: but as far as your bug is concerned, don't really know as this should work based on the code you've shown Oct 20 12:00:42 I have the same problem with PreferenceFragment, back button in PreferenceFragment closes app instead of return to MainActivity Oct 20 12:01:27 to MainFragment, right? Oct 20 12:01:35 not MainActivity Oct 20 12:03:08 no no, MainActivity (extends FragmentActivity), I have MainActivity that creates ListFragment or PreferenceFragment Oct 20 12:03:21 ListFragment is thaht master fragment with list of events Oct 20 12:03:46 yeah, but considering MainActivity contains the fragment stack Oct 20 12:04:02 you can't really return from a fragment to an activity Oct 20 12:04:06 that makes no sense Oct 20 12:04:40 I see, I put it wrong way, PreferenceFragment should return to ListFragment Oct 20 12:05:09 which was in MainActivity before and then replaced by PreferenceFragment Oct 20 12:06:16 My application allows users to save little notes which get put into an SQLite table, how do i stop special characters from crashing my application? Oct 20 12:08:16 hi, I have android-15 emulator, but it's very slow even on i5 cpu Oct 20 12:08:47 I have tried -gpu on, but it doesn't work Oct 20 12:11:41 ankhwatcher you can use unicode on your sqlite table Oct 20 12:12:03 you have to set it, and it doesn't catch all characters because the entire unicode is not used .. Oct 20 12:24:52 MDijkstra: I have fixed my problem by overriding onBackPressed method to pop fragment from stack Oct 20 12:25:09 but Android should do the same on its own Oct 20 12:31:36 jay: it does Oct 20 12:31:59 something's funky with your code :/ Oct 20 12:32:04 :-D Oct 20 12:32:08 possibly Oct 20 12:32:45 I'm thinking there is something going on because you don't load new fragments in your main activity Oct 20 12:33:07 ie use an interface to call back to your main activity and load the requested fragment Oct 20 12:34:43 hi all: quick question: starting a animation within onBackPressed () doesn't work althou it works if the animation starts in the onClick () os a view OnClickListener. Any ideas why? Oct 20 12:35:05 lasserix: ok, will look into it Oct 20 12:35:09 jay: here try this: do NOT add the first fragment to the backstack Oct 20 12:35:17 don't add your master fragment to the backstack Oct 20 12:35:23 i don't in mine and it works fine Oct 20 12:35:39 alankila: Still here? Fyi - I got the linux/eclipse developed app to build and run under WIN/intelliJ by hand porting the source vs. using the auto-import feature Oct 20 12:35:45 since it loads upon the activity loading you don't need it on the backstack, you only want new fragments replacing it to be on the stack Oct 20 12:35:53 so comment out that line and see if it works, Oct 20 12:36:00 * capella thinks intelliJ is better than eclipse already :P Oct 20 12:36:06 capella: hm. Oct 20 12:38:15 Off-topic, but... Anyone here using stackoverflow? Can someone tell me how to add comments to a post instead of an answer? :-/ Oct 20 12:38:51 I like it - have posted replies Oct 20 12:41:12 mr_lou: there is an "add comment" link, but it requires at least 50 rep Oct 20 12:41:23 http://stackoverflow.com/faq#reputation Oct 20 12:41:24 Ah, so that's why I can't comment yet. Oct 20 12:41:30 * mr_lou just signed up yesterday. Oct 20 12:41:48 Thanks tdignan Oct 20 12:42:18 Well I have 46 now, so... soooooon. :-> Oct 20 12:44:58 oh cool - just got that too - i have one reply / reputation .... gotta work on that Oct 20 13:03:05 this might sound a bit newb, but the underlying cli interface and sh are always present in android right? I mean even without a terminal emulator ? Oct 20 13:06:41 actually, I think the question more what I'm interested in... how do I run cli commands from an app I created.. anybody know of any handy source code I can look at that they may have found helpful at some point ? Oct 20 13:08:49 I want a gridview that displays images/videos chosen from the device galleries.My plan is to store the chosen images uri's in a db and than use a CursorAdapter to retrieve and display each of them. How can i deal with files that were removed from the device? is it possible to change the row count during getview()s? Oct 20 13:10:42 davieslacker: I think the Process lets you execute commands Oct 20 13:10:56 Process class * Oct 20 13:11:50 davieslacker: have a look at the CatLog source code, it calls into logcat and displays the output in an activity Oct 20 13:12:33 ah.. is that part of the sdk samples ? Oct 20 13:14:13 I'm pretty new to this, so I'm kind of hoping for a project that'll just load up in eclipse for me to browse Oct 20 13:16:06 davieslacker: just choose new Project from samples Oct 20 13:16:56 davieslacker, n/m that feature dissapeared :-( Oct 20 13:17:12 what's the difference between android 4.1 and google api's ? cause they both say 4.1 beside them ? Oct 20 13:17:31 import something from ANDROID_SDK/samples Oct 20 13:18:14 very little, GoogleAPIs provides things like support for athenticating google accounts Oct 20 13:18:20 other misc stuff Oct 20 13:18:27 ah, cool Oct 20 13:19:12 maps as well, iirc Oct 20 13:20:57 yeah Oct 20 13:21:13 anyone here have experience with gles? i want to pass input to my gl thread and ive ended up creating my own input queues, which seems too much work for something this simple, is this really the proper way to pass input to a game? Oct 20 13:22:58 hi all Oct 20 13:24:36 balls2thewall: GLES isn't really simple Oct 20 13:24:55 balls2thewall: in general you'd also have your game logic and rendering on separate threads Oct 20 13:24:56 not gles, but passing input to the gl thread Oct 20 13:25:32 currently i have input functions in the activity adding any event to sort of a master queue and the gl thread reading the queue each frame Oct 20 13:25:51 balls2thewall: I'm guessing you could just post to the looper for the GL thread Oct 20 13:25:56 if you receive input Oct 20 13:26:35 but in general once your GL project grows to non-trivial size Oct 20 13:26:40 you want multiple threads anyway Oct 20 13:26:54 and you can't really avoid synchronization Oct 20 13:27:49 hi, who wants to have a discussion about the GPS? Oct 20 13:34:22 is the GPS speed reading quite accurate? Oct 20 13:34:46 and also, if so, is the accuracy quantified anywhere? Oct 20 13:48:11 The answer is the classic "it depends" Oct 20 13:48:14 oh hey belacan Oct 20 13:48:17 Largely on the chipset Oct 20 13:48:28 hey hey lasserix Oct 20 13:48:39 hows it goin Oct 20 13:48:57 I wouldn't use it for scientific measurements or surveying :-) Oct 20 13:49:00 i've learned the progress of development is much like a game of shoots and latters, good otherwise ;p Oct 20 13:50:21 lasserix: haha how so? Oct 20 13:51:04 well everyday rolling the dice make some progress, sometimes you have a good day and climb right up the board on a latter, other days a trivial bug sends you nearly back to the first tile Oct 20 13:51:27 exagerating a little Oct 20 13:54:38 Hi everyone. I have an app in which I'd like to let the user to be able to take a picture and then either press Upload or Cancel when the picture has been taken. How would I design it so that the two buttons always are at the bottom, taking up 50% of the width, and that the picture is scaled (with its proportions kept) above the buttons? I'd like to have it like this: http://i0.simplest-image-hosting.net/picture/uuz685.png Oct 20 13:55:10 More accurate: sometimes you realize the whole way you were going about things was crap, but then you start fresh and realize some insight and things end up 1000% better and you make a huge leap forward. Oct 20 13:55:20 my experience anyhow Oct 20 13:55:26 not all setbacks are bad Oct 20 13:56:32 Kottizen, this is pretty trivial layout. A single RelativeLayout would do this Oct 20 13:56:51 scaling mode is achieved by configuring ImageView Oct 20 13:58:59 mrenouf totally agree, that's the whole dynamism of chutes and latters ;p Oct 20 13:59:10 if it says in in eclipse after loading a source sample, Unable to resolve target 'android-7' is it speaking of Android 2.1 (API7) ? Oct 20 13:59:24 davieslacker, yes Oct 20 13:59:35 thanks Oct 20 13:59:42 it means the project is set to target API7 but you dont have that SDK installed Oct 20 14:00:14 installing it now, just figured it would have the android version or say api in the error... that's the only thing that threw me Oct 20 14:00:18 ADT: always talking in confusing terms. :-/ Oct 20 14:00:34 and I hate the fact you got to map between these numbers and api level integers, too, while at it. :-p Oct 20 14:00:40 you shouldn't really target API7, unless you know what you're doing Oct 20 14:01:04 alankila, just think in terms of API level. its all that matters. not 4.1, 4.1.1, 4.1.2, etc Oct 20 14:01:20 I am actually a good googler... I just like to get it from the mouth (fingers) of the people on irc sometimes... if I'm a bother at any point, just tell me to stfu.. lol Oct 20 14:01:43 mrenouf: I'm really just wanting to look at this source, I doubt I'll be targeting it much Oct 20 14:02:03 I just wish there wasn't 3 names for everything. ICS, 4.0, API14 ... or something Oct 20 14:02:12 its basically the source to a simple kind of console execution program Oct 20 14:02:33 of these I'd most rather drop 4.0 and rather talk about ICS revision 1, 2, 3, 4 ... Oct 20 14:02:33 yeah, great for newbs like me.. just throw me off a bit more.. Oct 20 14:02:44 but its like that with everything I suppose Oct 20 14:03:04 I mean even MS, Linux, Mac, they all have internal names for their stuff Oct 20 14:03:10 a few years from now we'll be hard pressed to remember if eclair or froyo was first though Oct 20 14:03:11 Kottizen: Oct 20 14:03:17 did you get an answer? Oct 20 14:03:41 (unless we know the alphabetic ordering, of course) Oct 20 14:03:48 ;p Oct 20 14:04:27 Belacan: Oh, yes, mrenouf recommended RelativeLayout, so I'm looking into that Oct 20 14:05:08 you should also be able to do it with linear layouts Oct 20 14:05:25 I'm using a linear layout right now Oct 20 14:05:41 But I can't really figure out how to make it look the way I want - let me give you a screenshot + code Oct 20 14:07:54 Belacan: http://pastebin.com/3jTS0Cxp and http://katja.kottnet.net/phone/2012-10-20_16-06-05.png Oct 20 14:08:14 Kottizen, make a gist of the layout xml and I'll suggest an edit Oct 20 14:08:44 mrenouf: Please see http://pastebin.com/3jTS0Cxp and http://katja.kottnet.net/phone/2012-10-20_16-06-05.png Oct 20 14:10:05 Kottizen: try adding a weight to the image Oct 20 14:10:17 not sure how to scale it Oct 20 14:10:25 but that should push the buttons down Oct 20 14:11:56 Belacan: That worked, thank you! :) ( http://katja.kottnet.net/phone/2012-10-20_16-11-22.png ) Oct 20 14:12:15 Boom Oct 20 14:12:16 Kottizon the aspect ratio kinda looks off Oct 20 14:12:37 there are some attributes to specify in the ImageView to preserve the aspect I believe Oct 20 14:12:45 i think its just a weird image size lasserix Oct 20 14:13:00 i guess.. Oct 20 14:13:08 It's my phone, it produces images of those dimensions Oct 20 14:13:12 weird Oct 20 14:13:19 what is it? a windows phone? Oct 20 14:13:22 HTC One X Oct 20 14:16:18 Kottizen, http://pastebin.com/zkfu18xN Oct 20 14:16:53 mrenouf is that how you typically ident? Oct 20 14:16:56 *indent Oct 20 14:16:59 attach the buttons to the bottom, the attach the image to the top, left, right and above buttons Oct 20 14:17:08 lasserix, stock formatter, yeah Oct 20 14:17:14 oh Oct 20 14:17:15 usually 2 space Oct 20 14:17:22 just used a scratch project Oct 20 14:17:42 looks cleaner than tabs hmm Oct 20 14:17:42 not really important ;-) Oct 20 14:17:50 tabs... blech! Oct 20 14:17:55 lets not go there Oct 20 14:18:48 I would recommend not making the buttons fill the width though Oct 20 14:18:53 you say that but I think it's actually the difference between a post office worker trying to make out an address reading illegible, to partially illegable, to readable, to so clearr legible you actualllly travel to the future slightly Oct 20 14:18:55 on larger screens they will be comically wide Oct 20 14:19:10 lasserix, lol Oct 20 14:19:12 *clearly Oct 20 14:19:19 Ctrl-Alt-F man... Oct 20 14:19:25 ? Oct 20 14:19:41 er, Ctrl-Shift-F ? Oct 20 14:19:43 yeah Oct 20 14:19:52 Eclipse, IDEA whatever you use. just autoformat Oct 20 14:19:59 oh shit Oct 20 14:20:17 you can even set it to reformat on save Oct 20 14:20:35 then make sure everyone on your team uses identical settings. Oct 20 14:20:49 interesting Oct 20 14:21:19 Our place is fanatical about enforcing a string style and formatting rules Oct 20 14:21:23 consistency is king Oct 20 14:21:45 oh yeah Oct 20 14:21:57 can't really make a masterpiece on a dirty canvas Oct 20 14:22:22 mrenouf: Good point... I'll fix that Oct 20 14:22:33 unless you are going for postmodern or obsfucation ;p Oct 20 14:23:31 Anyone know how to swap two fragments on the stack without invoking the fragment underneath? Oct 20 14:24:07 maybe if i just use an empty temp stack holder fragment Oct 20 14:58:29 hi Oct 20 14:59:15 anyone knows what is wrong with my app: Oct 20 14:59:24 this is the log: Oct 20 14:59:26 http://pastebin.com/FL4xXsv8 Oct 20 14:59:29 (not much) Oct 20 15:01:08 is it because of " Unable to instantiate activity " ? Oct 20 15:11:09 hello. does anybody know how can I make the spinner to look exactly the same in any device I am using my app to? The style looks completely different, and also on devices with 2.2 and 2.3, when user opens the spinner, the width goes through all screen's width, but that does not happen in devices with 3 and 4 system. I have already put in xml the attributes android:dropDownWidth="wrap_content" and android:spinnerMode="dropdown" b Oct 20 15:13:08 dioHere: you have to style the spinner Oct 20 15:13:35 dioHere: there are about 4-8 png files you have get/change/create by yourself Oct 20 15:13:45 monsti: I did exactly what the guy said in this page. http://www.mokasocial.com/2011/03/easily-create-a-default-custom-styled-spinner-android/ Oct 20 15:13:57 so? Oct 20 15:14:01 no luck Oct 20 15:14:04 nothing changed Oct 20 15:14:17 the guy maybe setup some global theme Oct 20 15:14:58 BulleTime: your startup activity cannot be found by /is not visible to the Android runtime Oct 20 15:15:43 monsti: What I did is I copied the .9.png images (for states normal, selected, pressed) and pasted them in all drawable folders. and then continued with his tutorial Oct 20 15:16:13 dioHere: did you copy the xml files? Oct 20 15:16:32 did you setup the stype in 1) a theme or 2) at the spinner you want to theme? Oct 20 15:16:49 s/stype/style Oct 20 15:18:05 the res/drawable/btn_dropdown.xml is exactly the same as his. Oct 20 15:18:11 Oh I just noticed something Oct 20 15:19:00 I have initialized the theme not inside /res/values/themes.xml but inside /res/values/styles.xml Oct 20 15:19:28 does that matter in any way? In manifest there is a reference for the styles.xml Oct 20 15:20:25 does anyone know a way to bind with LDAP from an android app? Oct 20 15:21:15 dioHere: you have to read more about styles/themes Oct 20 15:22:39 monsti I did this because I thought it was a style and not a theme. besides inside values folder there is no themes.xml. I am supposed to create it by my own? Oct 20 15:22:53 dioHere: most likely Oct 20 15:22:54 Name of xml files in values/ doesn't matter Oct 20 15:22:59 dioHere: it depends Oct 20 15:23:18 dioHere: 1) do you want an activity where all your spinners have the same style? if yes - create a theme Oct 20 15:23:39 dioHere: 2) do you want ONE spinner different - all other default - create a style Oct 20 15:26:38 monsti thank you. I was kind of aware about that. But I am kind of confused. Inside manifest there is this line android:theme="@style/AppTheme". As I said I created the "theme" (because I want it to be a theme) inside the styles.xml. But manifest says that it is a theme. Sorry for the confusion Oct 20 15:27:18 dioHere: yeah that's a bad name :) Oct 20 15:28:03 stupid ui question: the ICS fragment-y menu that comes down in, say, maps when you click on the upper left actionbar item that shows maps, local, nav, etc... wtf is that called? It's not quite a context menu. Oct 20 15:28:48 so monsti will I have to create a themes,xml file, then continue with the tutorial for the code. But then how can I reference this in manifest? Oct 20 15:29:46 @theme/AppTheme ? Oct 20 15:30:14 dioHere: do this for the activity in the manifest Oct 20 15:30:16 then try Oct 20 15:30:56 agargiulo and the theme will apply automatically in the spinners right? Because when I am setting the spinner I am not setting any attribute for a theme Oct 20 15:31:11 hi guys Oct 20 15:33:03 looks like what I'm looking for may be actionprovider Oct 20 15:33:46 or popupmenu. anyhow. Oct 20 15:33:47 monsti is it correct to say android:theme="@theme/spinnerTheme" under the line android:theme="@style/AppTheme" in the manifest? Oct 20 15:38:53 There is no such thing as @theme. I think the code was correct from the beginning Oct 20 15:38:59 but still not working Oct 20 15:49:02 dioHere: I don't know, I was making an educated guess Oct 20 15:49:50 agargiulo unfortunate;y there is no such thing as @theme. there is only @style in the manifest Oct 20 15:50:22 then I don't know Oct 20 15:50:45 I'm still a n00b with android dev Oct 20 15:53:08 so, has anyone done anything with java/android and LDAP? Oct 20 16:18:01 Hello, anyone know of a good way to swap two fragments on the backstack without invoking the fragment underneath? Oct 20 16:30:53 why is eclipse so broken Oct 20 16:31:01 because it's written in java. Oct 20 16:31:07 i know :/ Oct 20 16:31:16 Somewhat offtopic: I'm preparing my Nexus 7 for selling and care about good wiping. I did a factory reset and currently fill the whole storage with random data until it's full and will do a fectory reset then again. Should be secure enough, or? Oct 20 16:33:25 Kamaze: should have set up encyrption then wiped it Oct 20 16:33:28 then you wouldn't have to fill it Oct 20 16:33:34 even after a factory reset Oct 20 16:33:43 but honestly, a wipe would have been sufficient Oct 20 16:33:57 yeah, thought about that too, but I'd read something about people beeing stuck within encryption mode and beeing unable to remove encryption Oct 20 16:34:04 and, there is a #nexus7 channel you can ask in Oct 20 16:34:28 but yes, what you're doing will be more than secure enough Oct 20 16:34:31 I'd call it overkill Oct 20 16:36:21 so, I was told by Sasmung support that the USSD factory wipe bug doesn't affect Galaxy Gio. So I tested it. At inital page load, the dialer comes up with the code, but the code doesn't run. BUT, after closing the dialer and refreshing the page, the code is run without prompt. Oct 20 16:36:53 Just out of curiosity, does that work on devices that Samsung claims it has fixed? Oct 20 16:38:36 protip: use slightly more harmless code like *#350# that just reboots the machine rather than does the factory wipe. (note: the above does also factory wipe!) Oct 20 16:44:18 btw delac, we did a little experiment at our company Oct 20 16:45:11 an employee made a webpage calling some harmles ussd code, and encoded the url as QR-Code and printed several copies of this QR code without further description Oct 20 16:46:07 then he just put this QR code on some tables and counted how many people accessed the webpage Oct 20 16:46:12 over 200 requests Oct 20 16:46:26 Kamaze: ha :) Oct 20 16:47:02 that's lot's of factory wiped phones :) Oct 20 16:47:06 resulted in a nice discussion on or mailinglist Oct 20 16:47:11 *our Oct 20 16:47:49 which can be summarized as: "u mad?" Oct 20 16:51:42 but I still would like to know if the refreshing the page runs the code even on "fixed" phones. I'm goign to contact Sasmung on monday and yell them about the bug. They did claim that the bug does not affect Gio, but when I tested it, I got my phone wiped Oct 20 17:01:14 what is a bread crumb title in the fragment back stack? Oct 20 17:08:46 These > Are > Breadcrumb > Titles > Each > Representing > A > Fragment Oct 20 17:09:05 Visual indicator of the backstack Oct 20 17:11:20 I am probably not understanding well enough, but is there a way to set them or how are they used? Oct 20 17:13:10 https://developer.android.com/reference/android/app/FragmentBreadCrumbs.html Oct 20 17:13:27 You set them on the transaction Oct 20 17:14:18 I'm having a serious dilemma with swapping two fragments. So Fragment Browse launches one of two Content Fragments (data as pager or in a list) and both have an action bar action to swap with the other content fragment. Since I have to pop off the current fragment, the browse fragment is "invoked" (it can be momentarily seen and its corresponding callbacks are fired) which screws up some Oct 20 17:14:18 my code. Oct 20 17:15:54 *I pop off the current fragment so that when the user presses back it goes to Browse, instead of the last content fragment. Oct 20 17:17:19 But now I realize I can just pop off up to the fragment underneath the first content fragment but I was hoping there'd be a simle method call I could use to swap on the backstack Oct 20 17:17:27 *simple Oct 20 17:17:33 thanks for that info SimonVT Oct 20 17:50:58 Anyone know how to solve the "R cannot be resolved issue"? Oct 20 17:51:11 hi Oct 20 17:51:15 I'm trying to simply build the BluetoothChat example from Android Oct 20 17:51:29 clean project, delete gen, rebuild Oct 20 17:51:32 try build all Oct 20 17:51:36 Already did Oct 20 17:51:47 Only thing I'm not sure of is "delete gen" Oct 20 17:52:00 What do you mean by that? Oct 20 17:52:00 well, i don't use eclipse so it might do it for you Oct 20 17:52:05 Ah Oct 20 17:52:07 but try deleting the gen folder Oct 20 17:52:17 yourproject/gen Oct 20 17:52:23 my call of an async task crashes from a button: https://gist.github.com/3924193, but works fine in the onCreate method (outside the button), why ? Oct 20 17:52:25 it's where R.java is Oct 20 17:52:57 the error message is: Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Oct 20 17:53:14 maxagaz: when you're displaying a toast, it needs a context. you're giving it the onclicklistener context in that case Oct 20 17:53:15 not ok Oct 20 17:53:33 Interesting, now it isnt helping but building isn't givening any errors either Oct 20 17:53:37 It just seems to do nothing Oct 20 17:53:39 sampullman: the Toast is commented Oct 20 17:53:44 * Striker121 looks around to see if a window got exited Oct 20 17:54:08 well, the error is pretty obvious Oct 20 17:54:19 you're trying to update the ui from a thread Oct 20 17:54:40 don't update the ui in the background method of the asynctask Oct 20 17:55:11 you know, all of the people who make that bug would have been protected by one very simple little assertion, if they'd added it to the aosp. Oct 20 17:56:54 Interesting Oct 20 17:56:59 what software do you guys use to make nice icons Oct 20 17:56:59 Now whenever I try to build Oct 20 17:57:02 Nothing happens at all Oct 20 17:57:17 No error, no nothing. No new Gen file is created Oct 20 17:57:18 haha, nice Oct 20 17:57:22 inkscape Oct 20 17:57:34 did you accidentally delete the whole project folder? Oct 20 17:57:57 Nope Oct 20 17:58:02 Just the Gen folder Oct 20 17:58:08 * Striker121 is gonna just reload the example Oct 20 17:58:10 sampullman, nice. can you use it to convert from vector to bitmap formats as well Oct 20 17:58:12 well, maybe restarting eclipse will help Oct 20 17:58:21 Sculptor, yes Oct 20 17:58:29 first class Oct 20 17:58:30 thanks Oct 20 17:59:11 Gah, I really wish I didn't have to deal with this stuff with bluetooth Oct 20 17:59:21 All I want to go is "open Connect to UUID" "Send stuff" Oct 20 17:59:31 App Inventor was actually that simple in that regard Oct 20 18:00:27 Gahhhh Oct 20 18:00:40 Anyone else want to open their BluetoothChat example for 4.01 and take a look? Oct 20 18:00:59 Because I can't imagine this is a problem only I'm having and that none of the normal ways are working :( Oct 20 18:01:06 sounds tedious Oct 20 18:01:21 Indeed Oct 20 18:01:41 I wish I'd atleast get a specific error message for why it wouldn't build Oct 20 18:02:32 ill take a look Oct 20 18:02:34 are there any good podcasts for android development? Oct 20 18:03:35 Ah, interesting Oct 20 18:03:58 If I open main.xml, even though it has no errors listed on the explorer, it has a message at the bottom saying "The project target (Android 4.1) was not properly loaded." Oct 20 18:04:15 Maybe it should tell the USER that.... Oct 20 18:04:24 * profligacy -Are there any good podcasts for android development? Oct 20 18:04:33 Striker: it builds just fine for me Oct 20 18:04:55 Strange Oct 20 18:05:00 installs/works just fine too Oct 20 18:05:06 Does that 4.01 error sound like anything to you? Oct 20 18:05:13 err, fc after bluetooth connect Oct 20 18:05:17 AVD says that 4.0.1 is installed fine Oct 20 18:05:28 Interesting... Oct 20 18:05:43 i installed it from the command line Oct 20 18:05:51 eclipse must be doing something funny Oct 20 18:06:16 did you make sure to update the project? dunno how eclipse handles that Oct 20 18:06:46 What do you mean by updating it? Oct 20 18:06:58 to make it work, all i had to do was: Oct 20 18:07:05 android update project -p . -t 9 Oct 20 18:07:08 ant debug Oct 20 18:07:22 in the folder it was installed Oct 20 18:07:30 *copied Oct 20 18:18:12 how would i go about having different (text file) assets for different screen sizes? Oct 20 18:18:40 sounds odd, but I have text files with a bunch of info about a resource Oct 20 18:20:20 sampullman: res/raw- Oct 20 18:20:38 thanks, dunno how i missed that Oct 20 18:57:08 anyone here with a note2? Oct 20 18:57:37 Jug6ernaut, n7000 Oct 20 18:57:48 Note N7000 Oct 20 18:57:59 n7100 Oct 20 18:58:17 Jug6ernaut, what resolution ? Oct 20 18:58:29 720p Oct 20 18:58:47 well ... N7000 has 1280x800 Oct 20 18:58:53 i know Oct 20 18:58:54 lol Oct 20 18:58:55 i have one Oct 20 18:59:31 do you think there is something better ? Oct 20 19:00:11 it is Oct 20 19:00:22 but i want some files from one Oct 20 19:00:46 is it possible to focus a scrollview to the top of one of its child views ? Oct 20 19:00:48 hey guys., Oct 20 19:00:50 http://pastebin.com/Dugw8tVL Oct 20 19:01:03 android.view.InflateException: Binary XML file line #22 Oct 20 19:01:08 where can i find this file? Oct 20 19:01:37 pl.magot.vetch.ancal.views.ViewImgButton Oct 20 19:01:50 not an Android file, so its somewhere in your project Oct 20 19:01:58 no Oct 20 19:02:01 maxagaz what do you mean Oct 20 19:02:05 i renamed the project Oct 20 19:02:14 and? Oct 20 19:02:25 i dont have "pl.magot.vetch.ancal.views.ViewImgButton" anymore Oct 20 19:02:48 and i searched the whole project for that package name Oct 20 19:02:52 no results Oct 20 19:03:02 well you still referencing it somwhere Oct 20 19:03:20 look for ViewImgButton Oct 20 19:03:29 clean project Oct 20 19:03:35 onohesback Oct 20 19:04:24 Jug6ernaut: let's take an example, I have 3 buttons always visible at the bottom of my main view, and 3 images in scrollview, when I click on a button, I'd like the scrollview to move until this image, is this possible ? Oct 20 19:04:54 JakeWharton hi! are you around? i made my custom background with divider for actionBarItemBackground and it worked, but it also apllies it to my logo ! Oct 20 19:04:55 (to its corresponding image) Oct 20 19:05:06 JakeWharton : is there a way to avoid that ? Oct 20 19:05:27 maxagaz sure Oct 20 19:05:35 Jug6ernaut: how ? Oct 20 19:05:48 you can tell the scrollview ot scroll to a specific point Oct 20 19:06:03 yeah i found viewImgButton but there's nothing like that package name in the code... Oct 20 19:06:27 BulleTime its pulling it from somewhere, it HAS TO BE Oct 20 19:06:34 i assure you there is no magic lol Oct 20 19:07:04 yeah Oct 20 19:07:21 but how can i find trough my project for text? Oct 20 19:07:37 i tought i did that, with no results Oct 20 19:07:48 did you clean your project? Oct 20 19:07:54 but im not sure its looking inside the whole project Oct 20 19:08:00 Jug6ernaut: how to get this specific point and how to set it ? Oct 20 19:08:10 ...what do you mean the whole project... Oct 20 19:08:11 yeah i cleared the bin dir and rebuilded it Oct 20 19:08:28 maxagaz you need to get the dementions of the images Oct 20 19:08:33 use that to set the scroll Oct 20 19:08:57 BulleTime click Project/Clean Oct 20 19:09:03 where? Oct 20 19:09:08 Project Oct 20 19:09:10 Clean Oct 20 19:09:29 ok lets try Oct 20 19:09:31 and do a search with Search/File Oct 20 19:09:38 Jug6ernaut: once I get this dimension, what parameter should I set in the scrollview ? Oct 20 19:12:40 maxagaz scrollTo or smoothScrollTo Oct 20 19:17:21 ok so clear wont solve my issue Oct 20 19:17:54 but what is that xml file logcat says? Oct 20 19:18:01 line 22 Oct 20 19:20:17 guys i made my custom background with a 9patch divider for actionBarItemBackground and it worked fine for my icons, but it also applies it to my home icon ! is there a way to avoid this ? Oct 20 19:20:38 are there any good podcasts for android development? Oct 20 19:21:40 iv never seen any Oct 20 19:22:13 heard any? Oct 20 19:22:41 not come accross any podcasts for any kind of development actually Oct 20 19:23:37 you might as well just find something on youtube and rip the audio Oct 20 19:24:54 how do i send an event from a service back to the currently active activity? Oct 20 19:25:06 i tried using startActivity, but it threw an error Oct 20 19:25:23 android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? Oct 20 19:26:09 http://privatepaste.com/57087f02c8 its within the GCM callback service Oct 20 19:32:17 is there a specific channel for Google TV? (Frankly speaking, mostly interested in building my own device with it) Oct 20 19:36:09 (and whether it supports flash) Oct 20 19:40:51 ok so i might just passed some error but Oct 20 19:41:08 anyone can look at my log? Oct 20 19:41:55 http://pastebin.com/iv93qJBm Oct 20 19:42:30 hmmmmm Oct 20 19:42:39 what's your question? Oct 20 19:42:40 it can't find a class Oct 20 19:43:08 must be the manifest or something Oct 20 19:43:19 ^^ agreed, post your manifest Oct 20 19:46:41 http://pastebin.com/RYS8kWSQ Oct 20 19:46:55 not sure i think the manifest is good anyhow Oct 20 19:47:57 oh Oct 20 19:51:01 does the error happen on startup? Oct 20 19:59:51 are there any good podcasts for android development? Oct 20 20:00:00 Hello Android developers, what is the best way to adapt images to multiple resolutions? multiple drawable folders with each image adapted each size? Oct 20 20:00:28 asanchez: yes Oct 20 20:00:45 is it possible to disable the compiler "error" where it tells me if a statement is uncreachable or not? How can it now if it's unreachable or not if my logic says it will!?! Oct 20 20:00:56 s/now/know Oct 20 20:01:13 diki: if a statement is unreachable, you've done something wrong. you don't want that error disabled Oct 20 20:01:15 they have various folders for low, medium and high density resolution images Oct 20 20:01:15 the app will use the appropriate version of the image (for the device that it is running on) Oct 20 20:01:27 compilers dont usually lie Oct 20 20:01:54 static analysis is fun! Oct 20 20:01:57 You may have done something uncessary (in case you don't consider that wrong) Oct 20 20:02:52 sampullman: there are cases where you do want that warning disabled Oct 20 20:03:06 yes on startup sampullman Oct 20 20:03:07 It's possible by code to dynamically load the drawables using a path name ? Oct 20 20:03:08 What cases? Oct 20 20:03:12 it's not a warning, and can you provide me a case? Oct 20 20:03:17 sampullman: for example, if you have a static final boolean that you are using to control a certain debugging-only feature or something Oct 20 20:03:46 what does static mean again? Oct 20 20:03:53 JesusFreke: maybe im not getting it, but i don't see why that means you should have an unreachable statement Oct 20 20:04:06 unreachable == unreachable Oct 20 20:04:09 may as well comment it out Oct 20 20:04:15 i need to reboot bbl Oct 20 20:04:40 sampullman: nevermind, I was thinking of the warning that a certain block of code can't be reached. Not the corresponding compiler error (which is a slightly different case) Oct 20 20:04:54 sampullman: it could be something that the editor incorrectly identifies as a statement that's not reachable Oct 20 20:05:01 nope Oct 20 20:05:04 apoplectic: no Oct 20 20:05:14 ? Oct 20 20:05:19 it wasnt a question Oct 20 20:05:22 first of all, we're talking about the "compiler", not the "editor" Oct 20 20:05:24 it was a stateent Oct 20 20:05:25 the editor just writes code. it has nothing to do with compilation Oct 20 20:05:30 the statement was wrong Oct 20 20:05:30 apoplectic: and your statement was incorrect :) Oct 20 20:05:51 ha, i keep acting like i know what im talkin about Oct 20 20:06:21 apoplectic: pastebin the code? Oct 20 20:06:29 and we can tell you why it's incorrect :) Oct 20 20:06:44 it was diki who had the question, i believe Oct 20 20:06:50 oh, sorry Oct 20 20:06:55 I just came in on the middle of it. lol Oct 20 20:07:09 JesusFreke: I don't have any code Oct 20 20:07:22 It wasn't me with the issue. Oct 20 20:07:25 I thought it was you. Oct 20 20:07:46 not I :) Oct 20 20:07:59 So the compiler determines what issues are in your code, before you compile it? Oct 20 20:08:01 diki: pastebin the code, and we'll convince you the code really is unreachable :) Oct 20 20:08:11 no, WHILE you compiler Oct 20 20:08:13 Or is it constantly compiling? Oct 20 20:08:16 hence: compiler Oct 20 20:08:25 *while you compile it Oct 20 20:08:28 WHILE you comipler? Oct 20 20:08:29 oh Oct 20 20:08:33 But Oct 20 20:08:37 it identifies issues Oct 20 20:08:38 note the IDE may do it's own pseudo-compilation in the background Oct 20 20:08:39 as i type the code Oct 20 20:08:42 into the editor Oct 20 20:08:52 you're editor, not mine Oct 20 20:08:54 *your Oct 20 20:08:57 Then, you may be wrong. Oct 20 20:09:06 Not the compiler, but some aspect of the IDE. Oct 20 20:09:20 the ide can be wrong Oct 20 20:09:21 apoplectic: nope. even an IDE "won't" (shouldn't) get that wrong Oct 20 20:09:40 shouldn't but could. Oct 20 20:09:57 in which case, it's a bug in the IDE and should be fixed :) Oct 20 20:09:59 If i make an IDE today, I guarantee it can/will be prone to such issues Oct 20 20:10:09 try and compile your code manually Oct 20 20:10:12 JesusFreke:I am working on the code atm. I don't want to post unfinished code. Oct 20 20:10:19 Sorry, it's possible to make something like res.getDrawable("/images/MyImage.png") ? I need to load dynamic path images and take care of every possible resolution. Oct 20 20:10:41 apoplectic: most IDEs are slightly more well tested than yours would be ;) Oct 20 20:10:51 asanchez: you access drawables with R.drawable.MyImage Oct 20 20:11:06 even eclipse should be able to get that right Oct 20 20:11:08 * JesusFreke ducks Oct 20 20:11:14 (not an eclipse fan :p) Oct 20 20:13:15 sampullman, currently I've the images defined in assets/images and defined in a XML. But i think it's not a good idea because it's not gonna be adapted correctly each resolution. So I want to move the images to drawable but i still have the definition of the images in the XML. So i don't know if i can get the name of the image and use dynamically. Oct 20 20:13:38 and i just answered that Oct 20 20:13:44 R.drawable.myimage Oct 20 20:13:57 is a reference to your image Oct 20 20:15:16 asanchez: use it dynamically where? In the code? or in another xml file Oct 20 20:16:09 also, what do you mean by "have the definition of the images in the xml" Oct 20 20:16:23 Yes, in the code. I have a XML with myImage and i need to look for the image in drawable exists, or in the assets. Oct 20 20:16:25 you don't need to "define" an image. you just have to put it in the correct drawable directory Oct 20 20:16:52 asanchez: oh, an arbitrary xml file in res/xml? Oct 20 20:18:06 We define XML with the kind of screen, navigation and contents. In the contents we use images. Now we use assets/images but it's not a good idea for different resolutions. Oct 20 20:18:16 And we are thinking to move images from assets to drawables in that situation. Oct 20 20:18:28 But we need to load dinamically and i have a path name. Oct 20 20:19:10 you don't need the path name, just the identifier Oct 20 20:19:46 anything in res/drawable-xxx/ can be reference with R.drawable.myimage Oct 20 20:20:14 sampullman: but you can't use that in another xml file Oct 20 20:20:25 of course you can Oct 20 20:20:29 @drawable/myimage Oct 20 20:21:14 sampullman: sure, for something that is themed and can "accept" a drawable attribute. I don't think that will work for an arbitrary xml file. (but I'm not 100% certain either) Oct 20 20:21:50 But if i have an XML with imageFile and text, and i want to load the data, how i can do it by code? Because in the XML i need to transform the path name with an id (and i'm asking this because it's a multi platform framework and in the another operating systems we provide the path file name. Oct 20 20:22:06 um, im not positive, but i think you can Oct 20 20:22:11 Then I think its not possible to get a drawable by path name and take care about every drawable resolution. Oct 20 20:22:43 you aren't meant to access your drawables by path name, and you shouldn't have to Oct 20 20:22:47 asanchez: yeah, you don't want to deal with drawables via paths. But what you want should still be possible-ish Oct 20 20:22:59 definitely possible Oct 20 20:23:47 asanchez: are you wanting to use the same xml files, without modification? (i.e. are you limited to using a file path in the xml) Oct 20 20:24:19 if you can tweak the xml files, then it should be pretty. otherwise, you're probably going to need to provide some path->id mapping Oct 20 20:24:27 then it should be pretty easy* Oct 20 20:25:00 back Oct 20 20:25:03 path->id mapping would be nice :) Oct 20 20:26:06 you shouldn't try to work around the system Oct 20 20:26:07 do it right Oct 20 20:26:26 JesusFreke, anyway you recommend change in the XML file /image/myImage.png by myImage ? Oct 20 20:27:07 yeah, that would probably be easiest Oct 20 20:28:07 Then I read the XML and use that string as res.getDrawable(myXMLData); Oct 20 20:28:23 alternately, just add another xml file with something like Oct 20 20:28:42 and then read that in and create a map Oct 20 20:30:18 R.drawable.myImage is a string? I mean i can use the data from the XML with getDrawable ? Oct 20 20:30:27 no, it's an int Oct 20 20:30:59 Oh, then how i can map the name in my XML with the code and get the drawable? :o Oct 20 20:31:04 you can use getResources().getIdentifier(imageName, "drawable", getPackageName()) Oct 20 20:31:10 to get the id Oct 20 20:31:15 and then getDrawable with the id Oct 20 20:31:46 Yes. I tried that but i'm not sure when you specify drawable if it takes care of drawable-ldpi, sdpi, .. Oct 20 20:31:56 nope Oct 20 20:32:17 just takes care of it if you name the folders right Oct 20 20:32:24 and that's such an awful workaround. why can't you just use the int ids, and reference them in xml with @drawable? Oct 20 20:32:27 asanchez: yes, it will choose the correct drawable Oct 20 20:32:32 based on the current configuration Oct 20 20:32:54 sampullman: you can't use a @drawable reference directly in an arbitrary xml file Oct 20 20:32:57 sampullman, because I define all the navigation and contents in XML, so i can use the same in another platforms. I need to get drawables by code. Oct 20 20:33:07 That is the reason because we use now assets / images. Oct 20 20:33:12 well, I think you can Oct 20 20:33:15 but it's not straight-forward Oct 20 20:33:16 JesusFreke: are you sure? Oct 20 20:33:34 i vaguely recall doing just that, but my memory could be off Oct 20 20:33:54 sampullman: you have to create a styleable thingy (), and then reference that new styleable as a namespace in the xml Oct 20 20:34:19 well, that's far more elegant than mapping the strings to ids yourself Oct 20 20:34:39 right. but there's almost no documentation on how to do that. I don't remember exactly how offhand Oct 20 20:34:46 can anyone test for me if the USSD bug still works if the page is reloaded (in stock browser)? Oct 20 20:35:41 or maybe