**** BEGIN LOGGING AT Fri Apr 26 02:59:58 2013 Apr 26 03:34:56 Is there a way I can use a filepath to an image to load a bitmap with a specific height and width? BitmapFactory.Options sampling can only scale as integer values... Apr 26 03:35:13 *Without loading the original image file Apr 26 03:38:07 Maybe I'm just confused about the options Apr 26 03:44:19 To resize a bitmap to some arbitrary dimensions, it has to be loaded into memory unless those arbitrary dimensions match scaling the original bitmap by a factor of 2? Apr 26 04:13:08 :/ Apr 26 04:13:39 i keep having to play this weird dance of starting my app, getting duplicate emus running, shutting one down, restarting adb Apr 26 04:13:49 wasn't this crap fixed like in 2010 ? Apr 26 04:15:30 duplicate emus? Apr 26 04:15:53 like... more than one ostrich Apr 26 04:19:35 Maziz: well, multiple emus - like every time i go to run, a new one starts up Apr 26 04:20:03 probably when you try to run the adb disconnected from the current emu Apr 26 04:20:04 lol Apr 26 04:20:16 yeah, dunno why though Apr 26 04:23:08 g00s: http://www.xaraxtreme.org/ looks quite impressive Apr 26 04:23:15 working on a mac version Apr 26 04:23:54 http://www.xaraxtreme.org/about-screenshots.html Apr 26 04:24:06 or rather I was suprised at the examples Apr 26 04:24:26 Last update 2008 O.o Apr 26 04:24:44 i'm trying to remember the history of this app Apr 26 04:24:50 i've heard of it. Apr 26 04:25:33 heh, the mark statement updated in 2006 Apr 26 04:25:35 *mac Apr 26 04:25:38 oh Apr 26 04:25:42 those dam dates Apr 26 04:25:43 heh :) Apr 26 04:25:44 :) Apr 26 04:25:50 how do i store a color in a android style, and then extract it from code? Apr 26 04:26:00 ive done it thru values, but that ignores the current style Apr 26 04:27:08 g00s: i think i saw an option in eclipse to start an emu with the app, but i would NEVER use such a thing, id manualy start the emu first Apr 26 04:27:18 its just so damn slow!, and i might want to use a phone i forgot to plug in, dont start an EMU on me Apr 26 04:27:21 ! Apr 26 04:27:46 clever: why would you want to extract a color from a style ? Apr 26 04:27:47 clever: yeah, i do that too (start manually). Apr 26 04:27:55 why not just….store color in a value Apr 26 04:28:02 that is then used by the style ? Apr 26 04:29:08 StingRay_: i'm changing the background color based on some state in the code Apr 26 04:29:17 hm, adb keeps on losing account of the emus / devices hooked up Apr 26 04:29:20 StingRay_: but i want to allow that color to be styled, so it blends in Apr 26 04:29:33 a color to be styled ? Apr 26 04:29:53 you lots me a "but" Apr 26 04:29:58 StingRay_: if i was to just put a color in values/color.xml, it wouldnt change with the style, and would look ugly in some styles Apr 26 04:30:00 lst* Apr 26 04:30:06 omg cant type Apr 26 04:30:48 colA referenced by styleA ? colB ref by StyleB ? Apr 26 04:31:04 so yeah, really not following ya now Apr 26 04:31:48 StingRay_: let me see if i can find an example... Apr 26 04:34:25 Apr 26 04:34:57 StingRay_: something like this might be what i want, if i can figure out how it works Apr 26 04:35:37 add(int, android.app.Fragment) in the type FragmentTransaction is not applicable for the arguments (int, android.support.v4.app.Fragment)? Apr 26 04:35:39 erm Apr 26 04:35:50 thats a bit odd Apr 26 04:36:13 just to have one thing in a style no ? Apr 26 04:36:16 StingRay_: that snippet is directly from the android styles.xml for -17 Apr 26 04:36:20 as in one drawable Apr 26 04:36:40 oh actually, suppose not Apr 26 04:36:46 StingRay_: if i do put the color/drawable into the style, how do i extract it and apply it to an element at run-time? Apr 26 04:36:52 changing which one of 2 i use Apr 26 04:37:59 dunno, I dont use styles Apr 26 04:38:11 I have code solutions Apr 26 04:38:16 and my own theme stuff Apr 26 04:38:32 ah, i just call setTheme in onCreate, and that re-skins everything Apr 26 04:39:16 g00s: I hate osx/mac/apple a little more today Apr 26 04:39:36 StingRay_: what happened ? Apr 26 04:39:37 osx has no iscsi initiator built in Apr 26 04:39:45 which sux balls Apr 26 04:40:03 since >= windows 2000 does Apr 26 04:40:19 so yeah, not a fan Apr 26 04:40:20 crap, i haven't done anything with scsi in a long time :D Apr 26 04:40:26 iscsi Apr 26 04:40:37 not scsi Apr 26 04:40:41 is that the apple scsi ? Apr 26 04:40:43 iScsi :D Apr 26 04:40:48 lol Apr 26 04:40:51 no Apr 26 04:41:06 tis tcp/udp ag linked scsi Apr 26 04:41:08 why do you call setTheme in onCreate? Apr 26 04:41:14 why not just define the theme in the manifest? Apr 26 04:43:28 um, did anyone else notice wierd behaviour of SurfaceView on Nexus 4? With it keep squishing the content to visible surfaceview area? Apr 26 04:47:37 JakeWharton: i allow the user to change theme within the options Apr 26 04:47:45 ok Apr 26 04:47:47 and the manifest file is read-only inside the apk Apr 26 04:47:51 yes Apr 26 04:47:55 you have the only valid use-case Apr 26 04:48:27 the issue, is that i need to pick a color that fits with the current theme, and apply it as the background of an element Apr 26 04:50:01 attribute on the theme that references a style Apr 26 04:50:16 that style has android:background with the correct one Apr 26 04:50:26 XML uses style="?attr/youCustomAttribute" Apr 26 04:51:08 JakeWharton: so i would add an to the attrs.xml file?, and refer to something in the current style/theme? Apr 26 04:51:14 yep Apr 26 04:51:25 and then how do i access that from the code? Apr 26 04:51:32 access what? Apr 26 04:51:39 the attr Apr 26 04:51:56 are you not using an XML layout to inflate? Apr 26 04:52:14 i need to change the background of the View based on some state Apr 26 04:52:15 it's 99.9% easier from XML Apr 26 04:52:54 JakeWharton: http://privatepaste.com/8ed2dde461 this is within getView for a ListView Apr 26 04:53:41 and what are you changing? Apr 26 04:54:13 JakeWharton: the background color of the entire row, to highlight rows with certain conditions Apr 26 04:54:23 so... the green? Apr 26 04:54:31 yeah Apr 26 04:54:41 the green wont blend in with every theme Apr 26 04:54:52 #ff00ff00 on the theme Apr 26 04:55:11 Apr 26 04:55:30 TypedArray a = context.obtainStyledAttributes(null, R.styleable.Funky); Apr 26 04:55:57 int color = a.getColor(R.styleable.Funky_funkyHighlightColor, 0); Apr 26 04:55:58 is there a convention for prefixing methods with on ? as in create versus onCreate? Apr 26 04:56:00 a.recycle(); Apr 26 04:56:27 if (color == 0) { throw new IllegalStateException("You forgot to put the attr on the theme, artard"); } Apr 26 04:56:50 lasserix: on signifies someone is going to call you Apr 26 04:56:57 JakeWharton: sounds good Apr 26 04:57:31 so , say, initialize() should be onInitialize() ? Apr 26 04:57:55 JakeWharton: testing... Apr 26 04:58:01 not that it matters so much, just wanted to be consistent with what is typical Apr 26 04:58:28 lasserix: no Apr 26 04:58:39 you are the one calling initialize. Android is the one calling onCreate Apr 26 04:58:46 JakeWharton: when on the right theme, it appears to have no effect at all :D Apr 26 04:59:07 clever: success! no further testing needed then Apr 26 04:59:08 and if i switch to holo, it crashes as expected Apr 26 04:59:11 1/1 = 100% Apr 26 04:59:18 i'll need to make a wrapper theme for holo light and holo dark, that fills that in Apr 26 04:59:51 looks like this should handle everything :) Apr 26 04:59:56 and its getting late now, thanks :) Apr 26 05:00:08 * clever heads to bed Apr 26 05:01:46 Ahh okay, thanks. Apr 26 05:03:23 As for another naming convention, I am subclassing edittext to have a stringbuilder member to capture input to save for text, is "textHolder" a clear name for such a variable? Apr 26 05:09:43 beginner here.. so is there any 'trick' to getting external libraries to work with android? i added an external jar to my build path and everything, eclipse 'sees' it (as in it doesn't complain that it can't find the referenced class(es), but when i build and run my android project, dalvikvm complains that it can't find the class i'm trying to reference Apr 26 05:10:18 and using this same external jar and building/running on windows works fine Apr 26 05:12:48 no, 3rd party jars should be fine Apr 26 05:13:07 android library projects are handled a little differently Apr 26 05:13:09 g00s: so what am i missing? Apr 26 05:13:23 are you using a jar or library project ? Apr 26 05:13:40 jar Apr 26 05:14:11 i added the jar file to the 'libs' folder in my project dir Apr 26 05:14:21 also, android's java runtime (Harmony) doesn't have all the regular JDK classes, so maybe your jar depends on something that isn't there Apr 26 05:14:34 yeah, that should be about it Apr 26 05:14:47 billybobjoe: I think you need to use "Add JARs" in eclipse, not "Add External JARs" Apr 26 05:16:10 hmm.. still getting the same error Apr 26 05:17:07 so maybe i'm doing it wrong.. i open the build path window in eclipse.. i click on 'add jars..' then browse for the jar Apr 26 05:17:36 then i can see in the package explorer that it is now listed under 'referenced libraries' Apr 26 05:17:37 and the jar is indeed in your projects "libs" directory? Apr 26 05:18:02 well.. its under libs\ then a sub folder of that.. does it need to be in the root of libs? Apr 26 05:18:57 maybe. android is a bit different than standard java about including jars Apr 26 05:19:47 yep that was it.. Apr 26 05:19:55 needs to be in the root, can't be in a sub dir Apr 26 05:19:57 grrr Apr 26 05:20:24 don't see why that would matter, especially since it works using the windows jre Apr 26 05:23:37 i hope you don't have so many libs, you have to make subdirs in libs to sort them out :) Apr 26 05:25:37 joy … out of the blue, eclipse no longer works :( stuck on "Android Library Update" Apr 26 05:26:50 StingRay_: Android Library Update ? Apr 26 05:27:05 StingRay_: btw, there is a new haxm release Apr 26 05:27:12 not sure if you use x86 images or not Apr 26 05:27:31 updating sdk now, 2 new items hax and admob Apr 26 05:27:53 i never did that from eclipse Apr 26 05:27:53 but pointless if I cant get it to load android :( Apr 26 05:28:28 have to keep "force quitting" eclipse Apr 26 05:28:44 this is getting annoying now Apr 26 05:29:33 aha Apr 26 05:29:34 maybe some lockfile Apr 26 05:29:40 14 fc and it works Apr 26 05:33:01 Is there anything known about whether or not AIDL will support Exception information? Apr 26 05:33:16 (Passing Exceptions over the AIDL interface) Apr 26 05:37:18 it handles a couple, but not arbitrary Apr 26 05:41:25 i haven't tried it, but can't you throw anything that derived from RemoteException ? Apr 26 05:41:46 i've been lucky all my stuff is in-proc so far :) Apr 26 05:41:56 the problem is it wouldn't be able to inflate it on the other side Apr 26 05:42:38 it might not have the class, so if you throw remoteexception, it will just do "new RemoteException(...)" on the other side Apr 26 05:43:21 oh, makes sense Apr 26 05:43:51 https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/Parcel.java Apr 26 05:43:55 line 1422 Apr 26 05:44:25 those are all the ones that are handled Apr 26 05:45:05 basically a few unchecked exceptions Apr 26 05:45:26 so.. when I get a stacktrace using LogCat, it tells me what went wrong, but doesn't tell me what line number/where (other than the class it came from).. is there an easier way to find where to look for an error? Apr 26 05:46:42 billybobjoe: it should have the line numbers at the end of the file name in the stack trace Apr 26 05:48:05 if you're using proguard, or the jar you're using used proguard it's possible the line numbers were stripped Apr 26 05:48:08 kroot: thanks! i'm stupid Apr 26 06:01:03 is there a tutorial on using gesture recognizers to achieve the gmail archive effect for a listviewitem view? Apr 26 06:02:06 etcetera: look up Roman Nurik's Swipe-to-dismiss example code Apr 26 06:02:46 JakeWharton: ah I see you have a nineoldandroids port. Apr 26 06:02:57 indeed Apr 26 06:04:36 JakeWharton: is it a bad idea to attach an event listener on each view given in getView? Apr 26 06:05:24 for what event? Apr 26 06:05:35 touch. Apr 26 06:06:13 this seems to be parsing the entire listview for the rendered view. then animating accordingly. Apr 26 06:06:56 there's only every a few views at once Apr 26 06:08:48 JakeWharton: right. but does the touch event listener attached to each view rendered via getView get cleaned up later by the GC? Apr 26 06:09:11 when the view dies Apr 26 06:09:17 but it'll be re-used until the entire ListView disappears Apr 26 06:09:57 Jake, what do you think about Gradle? Apr 26 06:10:06 *grumbl* is it still illegal to stab phone driver developers? -_- Apr 26 06:10:31 Ologn: it's a build system that uses Aether and has poor IDE integration right now Apr 26 06:13:45 Please, can anyone help! I have 3 fragments in stack([1]<-[2]<-[3]; 3 - on the top of screen). Is there any method to pop fragment [1] to the top of screen to achieve following state [2]<-[3]<-[1]? Apr 26 06:15:15 JakeWharton: this is a pretty interesting implementation. why are you tracking velocity instead of simply tracking the finger? Apr 26 06:15:26 ask Roman Nurik Apr 26 06:15:32 ;-) Apr 26 06:15:42 all I did was change 3 imports Apr 26 06:16:00 I mean just having a tracker implementation that says if > 40-50% you've got enough critical mass to animate forward. Apr 26 06:17:48 a lot of this stuff seems to be really odd. why isn't this just....baked into convenience classes? Apr 26 06:17:53 like UIGestureRecognizer/ Apr 26 06:18:03 stuff seems so much harder in Android land. Apr 26 06:18:28 we have gesture recognizers Apr 26 06:19:04 those are defined as overlays though. Apr 26 06:19:14 not attached to a target view. Apr 26 06:20:03 so write a helper class that does it all for you Apr 26 06:20:35 JakeWharton: *sigh* Apr 26 06:20:51 there's a lot of "so just write a {0}, that does it all for you..." in Android. Apr 26 06:21:06 etcetera: so just write a class that writes it for you. Apr 26 06:22:28 etcetera: it shows adds, what other functionality needs to be added :P Apr 26 06:22:42 shows adds? Apr 26 06:23:08 JakeWharton: if I can distract you with something useful for a moment… looking at MultipartTypedOutput, it might make more sense to cache complete parts as byte arrays including headers/boundaries instead of just a TypedByteArray with only the body? Apr 26 06:23:34 yes, that sounds logical Apr 26 06:23:55 i'll admit that I was a bit overeager to drop apache-mime4j when i added that class Apr 26 06:24:10 JakeWharton: by the by, thanks for all your help over the last few weeks. Apr 26 06:24:26 getting acclimated to this side of the fence has been interesting. Apr 26 06:24:45 etcetera: what side of the fence are you coming from ? Apr 26 06:24:52 iOS. Apr 26 06:24:53 g00s: presumably the other side Apr 26 06:25:08 :P Apr 26 06:25:35 etcetera: i'm attempting to do both at the same time - its a lot of stuff to know Apr 26 06:25:49 etcetera, could you just set a listener on the container and then collision detect it against the row's position and space and pass it to the appropiate view? Apr 26 06:26:13 for instance, why ViewPropertyAnimator setDuration method parameter is called duration, not milliseconds. Apr 26 06:26:26 which makes me have to go to the android docs, find out that it's milliseconds, find the appropriate construct, and then cast it out to long. Apr 26 06:26:31 who designed these APIs? Apr 26 06:26:49 hundreds of people Apr 26 06:26:54 over almost a decade Apr 26 06:27:29 but you can and should blame Chet Haase for that Apr 26 06:28:11 and why are you casting to a long? Apr 26 06:28:27 and why isn't your IDE surfacing javadoc? Apr 26 06:28:42 I like to use Interval Apr 26 06:29:18 yeah, trying to write Android code like you would iOS is going to hurt. Apr 26 06:29:32 is that like some custom version of TimeUnit? Apr 26 06:30:34 TimeUnit, interesting. Apr 26 06:30:51 TimeUnit.SECONDS.toMillis(5); Apr 26 06:31:05 for people who dislike multiplication and division of constants that never change Apr 26 06:33:38 Hi guys, I once read something about it isn't good convention to use "s" to dictate multiples. I.E myString = new String[5]; vs myStrings = new String[5]; Apr 26 06:34:21 haha this is now very interesting. Apr 26 06:34:38 setting the padding of the listviewitem view, does not animate the background. Apr 26 06:34:48 Solupus, huh, what would be a good convention then? O.o Apr 26 06:35:45 StingRay_: are you using the x86 emu ? Apr 26 06:35:47 hmm... was reading on it. basically its about how it will appear later in OOP Apr 26 06:36:17 Whats the best way to put a date in a bundle? Apr 26 06:36:22 like... myStrings[0].length(); vs myString[0].length() (probably not the best description) Apr 26 06:36:47 Solupus, one thing to remember is that no matter what you do in your code, theres an opinionated blog out there explaining why that sucks ;) Apr 26 06:37:10 Mavrik: which one sucks? :) Apr 26 06:37:19 roflmao Apr 26 06:37:52 oh, wow, setX completely re-renders the entire view hierarchy! Apr 26 06:38:00 g00s: yes, well….when i use the emu… yes Apr 26 06:38:07 viewproperty animator does not actually animate the entire view. it's static background is never adjusted. Apr 26 06:38:13 I guess im going to stick with signular naming conventions Apr 26 06:38:16 so much fun, this is wild! :-D Apr 26 06:38:49 g00s: why wassup? Apr 26 06:39:26 hmm, viewpropertyanimator is also super stuttery on API 17. Apr 26 06:39:44 and it seems the state of the animation does not persist as the listview scrolls. Apr 26 06:39:55 0_0 Apr 26 06:46:04 hi Apr 26 06:50:02 Solupus: when you read it back is it easier to see myStrings[2] or myString[2] and know what you're refering too Apr 26 06:51:26 lasserix: myString[2]. Apr 26 06:51:42 so yea, definitely singular i guess. (varies sometimes) Apr 26 06:53:06 funny how those trivial details can make a difference. Let's eat grandma! versus Let's eat, grandma! Apr 26 06:58:58 StingRay_: are you able to - from the shell - say 'emulator -avd … &' for a background job? this used to work but stopped working on mac Apr 26 06:59:12 mine just hangs until i foreground it Apr 26 07:00:47 does the busybox fsck on android 4.0.3 support ext4? is journaling enabled on ext4 or ext3 on android 4.0.3? Apr 26 07:01:37 anyone here? Apr 26 07:02:10 ryoohki: firstly, have some patience... secondly, how does that relate to app development? Apr 26 07:04:37 well i don't expect users to answer this question Apr 26 07:04:48 is there a better place to ask this question? Apr 26 07:04:59 is dev only about app development? Apr 26 07:07:54 as the topic says, #android-root Apr 26 07:11:08 Hello. We have lost the password to our keystore cantaining the signing key for one of our android apps (which was already in play market). Cracking the password is not an option, so we have given up on updating this app. We are ready to create a new app on play market but it won't let us use the same title as the old app Apr 26 07:11:40 however according to google play developers console help it is only the package name that needs to be unique Apr 26 07:11:44 not the title of the app Apr 26 07:12:22 I must thank you Apr 26 07:12:35 You just gave me the wakeup call i needed Apr 26 07:12:40 Backup keystore Apr 26 07:12:46 :) Apr 26 07:12:49 I know Apr 26 07:13:13 oymyakon: rename the old app, you don't need the keystore for that just do it from the dev console Apr 26 07:14:31 kevindb: thank you very much. Apr 26 07:17:34 hey. is it possible to position the actions menu to the left of the screen and vertically... this layout is for tablets/tvs Apr 26 07:18:24 i mean what do you call this menu that holds the global view of the application.. like it would have a settings icon.. etc Apr 26 07:19:12 not sure if it's the options menu Apr 26 07:20:07 The action bar? Apr 26 07:20:21 No, that's not possible Apr 26 07:20:44 "A new approach for a vertical menu on the left of the screen is to create a "Fly-in-App" menu as decribed from Cyril Mottier in his blog. To achieve something like that you can use android-menudrawer library" Apr 26 07:21:03 Or that Apr 26 07:21:17 You should use that Apr 26 07:21:39 hahaha Apr 26 07:22:11 alright i will read about it Apr 26 07:22:28 oh, it's your project Apr 26 07:22:43 what a coincidence haha Apr 26 07:22:57 :p Apr 26 07:25:04 krad: you can also read about the design guidelines for those here under "Drawers" http://developer.android.com/design/patterns/actionbar.html Apr 26 07:27:24 thanks Apr 26 07:38:27 how to replace dynamically created fragment with new dynamically created fragment? Apr 26 07:39:40 see TransactionManager Apr 26 07:44:22 Thanks Karlo Apr 26 07:46:14 is there a way on IRC to alert on someone coming online? Apr 26 07:49:35 i think you mean FragmentManager and its transactions Apr 26 07:51:44 Sirolf, you could use ISON Apr 26 07:51:56 Sirolf, looks like freenode doesn't support WATCH Apr 26 07:53:33 okay thanks! Apr 26 07:57:30 I guessed he meant FragmentManager Apr 26 07:57:47  HexChat: 2.9.4 ** OS: Linux 3.7.10-gentoo x86_64 ** Distro: Unknown Distro ** CPU: 8 x Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (GenuineIntel) @ 1.60GHz ** RAM: Physical: 31.4GB, 94.7% free ** Disk: Total: 956.6GB, 95.5% free ** VGA: 10de:0fc0 ** Sound: HDA-Intel - HDA Intel PCH1: HDA-Intel - HDA NVidia ** Ethernet: 8086:1502 ** Uptime: 4d 1h 5m 29s ** Apr 26 07:57:57 dewimper: no Apr 26 07:58:11 really sorry Apr 26 07:58:23 you get one for free. then you have to pay everyone in the channel $1 Apr 26 07:58:30 will do Apr 26 07:58:43 Nomore, sorta Apr 26 07:58:52 getFragmentManager().beginTransaction().add(R.id.RootPanel, new GlobalZoneFragment()).commit(), etc Apr 26 07:59:09 JakeWharton: at least he's got a machine which is powerful enough to run the emulator... Apr 26 07:59:22 What happens if getSupportFragmentManager().beginTransaction().replace(R.id.frag, myFrag).commit() is called multiple times? Can it cause my app to crash? Apr 26 07:59:34 haha Apr 26 07:59:35 good point Apr 26 08:00:39 Hi, how can i pass a List> throught a Intent (with a bundle)? Apr 26 08:01:45 Sirolf, found you the answer: https://github.com/atheme/charybdis/blob/master/doc/monitor.txt Apr 26 08:02:14 monitor is implemented but freenode don't seem to have the help file loaded for some reason Apr 26 08:02:39 /quote monitor + anick, works for me Apr 26 08:08:15 salut Apr 26 08:08:28 hello Apr 26 08:17:56 why does OnFocusChangeListener have View v as a parameter for its callback onFocusChange? Apr 26 08:18:53 Hello, i have a problem with alarmManager and BroadCastReceiver: i pass an intent with some extras, but when i get them they are null. This is my relevant code http://pastebin.com/537mJqhz. Thanks Apr 26 08:22:56 lasserix: isn't it juist the view which focus has been changed? Apr 26 08:23:19 FrancescoV: yeah, that's why i am wondering why it is an arguement to begin with Apr 26 08:25:43 hey guys. I'm still having an issue with my thread pool where after a period of inactivity (the user is out of the application), going back into the app, all my threads will block Apr 26 08:26:00 anyone have any suggestions as to why this happens? Apr 26 08:27:48 lasserix, why does onClick take a view as a parameter.. Apr 26 08:28:07 lasserix: if you would to add this event on multiple views, you can implements this and overrride the method, than with this parameter, you can know which view's focus has changed. That's what i think Apr 26 08:30:39 SimonVT & FrancescoVT: doh, not seeing the trees for the forest ;p Apr 26 08:31:15 deep in refactoring land Apr 26 08:31:23 * lasserix is deep in refactoring land Apr 26 08:43:12 Hi all, in my app I have an score. Is there an easy way to sum up the single scores with Google Services (like Google App Engine) over the network without using my own server ? (and then receive the summed up score to display in the app) Apr 26 08:44:04 Hello! Is any possibility to use something like onSaveInstanceState for fragments. So i want add fragment (with addToBackStack), then user input data and press back button. and when frament opens again i want to restore user data. Apr 26 08:45:21 i have read about setRetainInstance but according docs it won't work with back stack Apr 26 08:45:40 @xgear if it isn't much data I'd just save it in sharedpreferences and reload it when the fragment is created Apr 26 08:46:27 ok Apr 26 08:47:22 dakdroid: maybe it was a rumor, but i thought google was going to announce some game stuff like that Apr 26 08:48:05 If four classes are going to have an identical method, is this justification for making a superclass? Apr 26 08:48:24 my problem is I never did something like this. I really only have 1 Integer which I want to sum up over all users Apr 26 08:48:37 dakdroid: first link i found http://gsminsider.com/2013/04/22/google-to-introduce-android-game-center-at-google-io-2013-in-may/ Apr 26 08:49:02 lasserix: probably not Apr 26 08:49:08 maybe Apr 26 08:49:09 depends Apr 26 08:49:12 :D Apr 26 08:50:58 @g00s thanks for the link, but this would be overkill for me :-) Apr 26 08:51:17 goos: heh, thanks, just trying to get build this app without looking too much like a novice once I upload it to cloud Apr 26 08:52:10 I thought about using a google spreadsheet where I just sum the scores up, but there must be an easier way Apr 26 08:52:35 lasserix: prefer composition over inheritance Apr 26 08:53:00 goos: thanks! Apr 26 08:58:51 goos: thanks again, i was trying to plan out the rest of the app and it ended up coincident with that principle :) Apr 26 09:02:43 is it possible to have "remote desktop viewer" for android - i.e. control phone from pc? Apr 26 09:03:52 nullie: there are probably dozen apps with various levels of control out there Apr 26 09:03:58 hm, looks like rooted only Apr 26 09:17:26 hi Apr 26 09:19:17 i'm having trouble recovering an old version of a previously published apk Apr 26 09:20:38 you must make an offering to the android mcp Apr 26 09:20:46 usually an old toaster or moniter will do Apr 26 09:27:16 how can i change text of a textview' of dynamically created fragment? Apr 26 09:27:34 (JakeWharton maybe you know if you're still here) I'm using a recursive method to set a touch listener on all views in a fragments view hierarchy, is there a way to also include the action bar / action menu items ? Apr 26 09:28:16 Nomore: when you load the xml file for the fragment, use the view to findViewById on your textbox and you'll have a reference to change the text Apr 26 09:29:14 hello! Apr 26 09:30:01 welcome ufk Apr 26 09:30:21 uway from keyboard? ;) Apr 26 09:31:09 is there that in the title of a specific activity there will be a button that will move to a different activity ? Apr 26 09:31:57 ufk: can you rephrase the question, i am not sure what you mean by "that in the title" and also what do you mean move the button Apr 26 09:32:05 yeah Apr 26 09:32:07 ok sorry Apr 26 09:32:51 no worries Apr 26 09:32:53 lasserix: it gives me null pointer exception Apr 26 09:33:16 Nomore: can you post relevant code? Apr 26 09:33:44 so i have an EndGame acitivty that displays statistics but i don't have room for all the information. so i want to divide it to two pages. so i want to have a tabbed navigation in that activity. so the user will be able to move forward and backwards from the first page to the next page. so i thought about having a tabbed navigation only on the EndGame1 and EndGame2 activities. Apr 26 09:34:04 why activities? Apr 26 09:34:26 2 views - use visibility and/or animations Apr 26 09:34:38 ufk: you should migrate your code to implementing fragments, but can't you just drop your info into a scroll view ? Apr 26 09:34:43 lasserix:TextView t = (TextView) findViewById(R.id.randNum); t.setText("asdfasdf"); Apr 26 09:35:05 Nomore: from where does this code come from? your activity or your fragment? Apr 26 09:35:08 lasserix:activity and fragment are separate xml files Apr 26 09:35:14 Scrollview!!!! Apr 26 09:35:20 i forgot about scrollview!!!!! Apr 26 09:35:32 that's what i'll use! Apr 26 09:35:49 lol Apr 26 09:35:56 oh wait Apr 26 09:36:06 scrollview will be annoying Apr 26 09:36:08 Nomore: do you have a fragment class? Apr 26 09:36:24 ufk: you could also use a viewpager Apr 26 09:36:30 what is viewpager Apr 26 09:36:48 like a horizontal list view where each row is a "page" Apr 26 09:36:58 that you swipe from left to right and right to left in Apr 26 09:37:01 let me check Apr 26 09:37:55 ufk: monsti's suggestion is probably the easiest though, you could detect when the user wants to view more however you want, then animate the transparency of the two views so the other view shows Apr 26 09:38:08 (animate the transparency, for instance) Apr 26 09:38:31 Nomore: you have to call findViewById on the view that is inflated for your fragment Apr 26 09:39:06 Nomore: for instance, in my fragment class I'll override onCreateView and then the view I inflate in that method (as the xml layout of the fragment) I'll find all my views on that view before returning it Apr 26 09:39:22 thanks for all the info Apr 26 09:39:43 no problem, good luck with the game Apr 26 09:40:45 Nomore: for reference: http://pastebin.com/jzuaLmK7 Apr 26 09:47:29 lasserix: I'm sorry I'm new to android, so I'll take some time to understand that. Thank you. Apr 26 09:55:57 Nomore: no worries, note that code is not in the activity class, it's in the fragment class Apr 26 10:04:33 THis is the code from my and I need to replace the database file in the next update of my app. I have put the code in onUpgrade() but its not working, can any one please take a look at my code and tell me whats wrong? http://pastie.org/private/bni5iwbob1oklyxx5atolq Apr 26 10:06:39 lasserix: ok, thanks :) Apr 26 10:07:38 Even the onUpgrade is not working! Apr 26 10:07:40 I geuss Apr 26 10:08:37 for onUpgrade to be called, you need to provide a higher version number than the one users already have Apr 26 10:09:29 but in your code you call the supper with integer "1" Apr 26 10:10:11 wasn't it the same number in your last deploy? Apr 26 10:10:37 karlo So I guess I have to change this super(context, DB_NAME, null, 1); with 2? Apr 26 10:10:52 Yeah it was the same, let me check it. THanks! Apr 26 10:11:10 yep, this number has to be higher every time you update your db Apr 26 10:11:48 oh ok! And I don't have to edit the db file and manually update the version number I assume? Apr 26 10:13:35 karlo ^^ Apr 26 10:14:19 xpl0iter: the android code should update the version number in the db for you Apr 26 10:15:32 clever Thanks a lot. Apr 26 10:15:37 you should not really care that there is a version number in the db, but in onUpgrade call you should do what is needed to migrate the user's db from version X to the newest version Apr 26 10:15:52 it might be more than one version jump so to say I think Apr 26 10:16:33 from 14 to 17 or from 21 to 8 Apr 26 10:16:37 both is possible ;) Apr 26 10:16:49 Not in onUpgrade it's not :p Apr 26 10:17:09 xpl0iter: if you want to see more on how it works: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/database/sqlite/SQLiteOpenHelper.java#L257 Apr 26 10:17:34 you can clearly see it call onUpgrade at line 257, then setVersion on 260 Apr 26 10:27:12 Zharf: ever heard of the Espresso UI testing framework? https://www.youtube.com/watch?feature=player_embedded&v=qtKx1WxK7cw Apr 26 10:36:24 I create a notification, and when the user clicks the notification an activity is opened. I'm using the code from the documentation "Preserving Navigation when Starting an Activity" so that when the user presses back he goes back to the home screen of the app. all works well on my new android device, but on an older samsung the "back" be Apr 26 10:36:25 havior doesn't work Apr 26 10:37:47 belgianguy, no Apr 26 10:38:57 shirt: so what happens instead? App quits? which Android version does the samsung have? Apr 26 10:40:16 karlo: if app was previously closed then app quits. if app was previously open on some random activity, then pressing back returns to this same activity (instead of the home screen). Android version 2.3.3 Apr 26 10:42:03 could you show some codez? Apr 26 10:43:48 i'm using the exact same code, from the docs, haven't changed anything: http://developer.android.com/guide/topics/ui/notifiers/notifications.html#NotificationResponse Apr 26 10:44:46 belgianguy, any clue if it's actually available though? I don't find much stuff about it googling Apr 26 10:44:51 looks cool though Apr 26 10:48:41 Zharf: ah, no, I just passed by the video, and remembered you were looking from something like that Apr 26 10:48:53 Zharf: was afk for lunch, sorry Apr 26 10:48:58 no worries Apr 26 10:49:13 and yeah I was looking into that stuff, supposedly there's a case where we might have to do something like that Apr 26 10:49:30 I looked at robotium and seemed to work ok too, but if this thing is available I would like to try it Apr 26 10:50:44 Zharf: seems it's an internal Google tool, non-open source :/ Apr 26 10:51:05 http://watirmelon.com/2013/04/25/gtac-2013-day-two-doggy-bag/ search for "Espresso" Apr 26 10:51:06 well I hope they release it soon Apr 26 10:51:33 because frankly, the stuff that google has to offer right now, sucks without the third party wrapping ;) Apr 26 10:52:10 Zharf: true, they could improve that situation, (especially if the tools exist already) Apr 26 10:52:21 "Actually we were planning on releasing Espresso & some of the other tools at the conference… Unfortunately there were some process roadblocks we need to route around first. :( Soon…. very soon!" in the comments there Apr 26 10:53:00 Zharf: probably has NDA related things to it, maybe some hints of 5.0 :p Apr 26 10:53:08 but that's at least promising Apr 26 10:57:05 karlo: i figured it how. this behavior is by design for android versions prior to honeycomb. explained right here at the top of the docs for TaskStackBuilder: http://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.html Apr 26 11:01:18 hi Apr 26 11:01:25 i have a problimg with signing my apk Apr 26 11:01:30 problem Apr 26 11:02:22 i am getting this error Apr 26 11:02:23 http://pastebin.com/Q4cB2PaK Apr 26 11:02:38 don't know how to fix that Apr 26 11:08:39 anybody an idea? Apr 26 11:08:55 well it says there is a duplicate reference Apr 26 11:09:09 what have you done so far to solve/track it down ? Apr 26 11:11:22 try to find a solution in google cause i can't find duplicated refs Apr 26 11:13:08 but i found nothing .. Apr 26 11:23:53 Is this an active development channel? Apr 26 11:24:10 No, it's an app development channel Apr 26 11:25:00 i just got a new tablet which isn't reconiced as ADB device Apr 26 11:25:00 Know any good ones? cyanogenmod-dev is a wash Apr 26 11:25:25 any idea what steps are required? Apr 26 11:25:41 monsti: you may have to add something to adb_usb.ibi Apr 26 11:25:45 win7/64 bit - the device manager has a yellow exclamation mark Apr 26 11:25:47 *adb_usb.ini Apr 26 11:25:55 oh Apr 26 11:26:10 i think i have to fool with the inf file? Apr 26 11:26:34 does win7 require drivers? Apr 26 11:26:36 I'd just toss it out and reconnect, failing that, find the USB drivers of the manufacturer for your OS Apr 26 11:26:40 Just manually install the driver.. Somewhere along the line you can click "have disk" or something, and point it to the ini Apr 26 11:26:51 It'll complain that drivers don't match, and then you install Apr 26 11:27:17 yes the usb IDs dont match Apr 26 11:27:32 ... wtf does windows suck this hard Apr 26 11:27:36 we have 2013 Apr 26 11:35:00 i'm writing my first tablet optimized app, i find this very confusing / unintuitive Apr 26 11:35:14 that is , the partitioning of fragments to activities Apr 26 11:36:34 I have a fragment where the user puts in some data, then they click done in the action bar, then it shows a preview of how the data will appear on the website in another fragment. I am thinking instead of putting confirm as an action bar menu item, i want to put it as a button at the bottom. Anyways my question is of design: should I put a cancel/edit still next to the confirm button? Apr 26 11:36:49 goos: what's the problem? Apr 26 11:37:07 well, i'm reading this http://developer.android.com/guide/practices/tablets-and-handsets.html Apr 26 11:37:36 they mention 2 ways of doing this "Multiple fragments, multiple activities" seems to be the preferred Apr 26 11:37:45 is that still the case? Apr 26 11:38:02 in the example they put their fragments in layouts Apr 26 11:38:15 i thought it was sexier these days not to do that Apr 26 11:38:24 g00s: no offence intended btw, but is that no a design decision based on the app in question ? Apr 26 11:38:43 StingRay_: its a re-occurring pattern Apr 26 11:38:46 goos: unless things are simple in the app, its usually easier to add them in code Apr 26 11:39:23 *if that is what you mean by "in layout" Apr 26 11:39:31 g00s: patterns, not really into them when they change so much ;) Apr 26 11:39:41 lasserix: really? so do you put a bool in values , and check that to see if you are in tablet mode, and then show extra fragments? Apr 26 11:40:15 like res/values-large , etc Apr 26 11:40:22 i've seen it done that way Apr 26 11:40:27 the whole thing just stinks Apr 26 11:40:42 as opposed to making all kinds of activities? Apr 26 11:40:50 at least the tools should give me some representation of the information architecture of the app Apr 26 11:41:06 lasserix: i'm sure there has to be a middle ground Apr 26 11:41:14 probably apps use both at the same time Apr 26 11:41:28 g00s has finally entered 2011 Apr 26 11:41:34 goos: alternatively you can just make distinct fragments and use a single fragment based on the bool Apr 26 11:41:41 SimonVT: you are right. i was watching a video from 2011 :) Apr 26 11:41:45 best way to upload file or photo from android? Apr 26 11:42:02 Is the right way to use http post, then send it as base 64 encoded string? Apr 26 11:42:10 SimonVT: i was hoping some of these techniques were refined over the time Apr 26 11:42:31 i'm looking at iosched, it seems they use multiple activities for the most part Apr 26 11:43:03 That's one way to do it Apr 26 11:44:03 The limitation is that you're animating the entire window, including the action bar Apr 26 11:44:23 oooh Apr 26 11:44:43 lead the revolution of the slide drawer navigation! Apr 26 11:46:05 lasserix: i think its so funny they have design guidelines for that, but no public widget in any available version of android :) Apr 26 11:46:35 its just a smarter way because you can pack more information easier Apr 26 11:46:44 They're making one for the support library Apr 26 11:46:52 the action bar is really homage to the start menu bar Apr 26 11:46:59 SimonVT: ah, cool Apr 26 11:47:00 designed for mouse input Apr 26 11:47:05 can't wait before slide drawer becomes absolete as every pattern do with time Apr 26 11:47:23 lasserix: i thought that came from WIMP desktops :) Apr 26 11:48:10 heh, i remember the very first blog entry on UI patterns back in like 2010. it was very rudimentary Apr 26 11:48:28 they may have even taken it down because of embarrassment Apr 26 11:48:30 most popular nosql for android? Apr 26 11:48:50 but i remember the '6-pack' or Home screen with icons Apr 26 11:49:39 i think they also had the action bar, but it was basically a fat rectable with a button on top :) Apr 26 11:49:48 that was before 3.0 Apr 26 11:49:51 goos: oh yeah i forgot proper name Apr 26 11:50:13 who remembers lousy dashboards and carousels ? Apr 26 11:50:16 The action bar has been a pattern since 2.1 or something Apr 26 11:50:21 * StingRay_ thinks if he halved his g/f's music library to 160GB, wen on the new NAS would she really notice … hmmm Apr 26 11:50:36 bubbleguuum: the green goblin in the old play store Apr 26 11:51:00 that carousel thingy, damn that was terrible. but they spend a lot of time justifying it :) Apr 26 11:51:18 even Apple abandonned cover flows... Apr 26 11:51:39 they aren't information dense Apr 26 11:51:47 gimmicky Apr 26 11:51:54 gimmicky yes Apr 26 11:53:53 I'm surpise noone wrote a fragment wrapper API to make it look simplier and more resembling to traditional desktop toolkit UI APIs Apr 26 11:55:11 probably because the fragment api is so aweful, if it leaks at all through the abstractions its like acid blood Apr 26 11:55:59 haha Apr 26 11:56:00 the abstractions, Activities, Views, ViewGroups, Fragments, and Contexts .. well, in retrospect, seems really bad Apr 26 11:56:17 i mean, Views and Viewgroups are normal Apr 26 11:56:26 yes it is totally awful Apr 26 11:56:34 that makes me appreciate Java Swing more Apr 26 11:57:42 there seems to be a weird redundancy between activities and fragments Apr 26 11:57:57 i can't articulate it well Apr 26 11:58:12 fragments are units of activity Apr 26 11:58:16 it seems it was designed in a hurry for Honeycomb Apr 26 11:58:29 *logical units Apr 26 11:58:56 i know what fragments are; just saying - there seems to be weird conceptual overlap between them and activities Apr 26 11:59:47 for example , in the case where you have a details fragment in a second activity Apr 26 12:00:06 and on a phone, you start that second activity, which has to take crap from the intent and stuff it in the fragment Apr 26 12:00:11 lol, what a piece of shit Apr 26 12:00:15 who thought of this crap Apr 26 12:00:26 goos: ahh i use a non-ui fragment to hold things like that Apr 26 12:00:30 Fragments seems to be there only for the proverbial reutilisability between phone and tablet version. In practice this is very difficult to achieve and you're better having 2 codebase for the UI sharing the same codebase for non UI stuff Apr 26 12:00:49 bubbleguuum: actually, i argued this with romain in 2010 Apr 26 12:01:16 i argued, that phones and tablets are differences in usage and information architecture, to an extent this abstraction can't accomodate Apr 26 12:01:27 UI on a 10" tablet and on a 4" phone are so different that there is almost nothing to share code wise Apr 26 12:01:30 i was right, again :D Apr 26 12:01:45 bubbleguuum: yeah Apr 26 12:02:04 for example, on a phone, somebody might check their stocks, but on a tablet, actually trade Apr 26 12:02:18 this isn't a matter of scaling buttons and putting an extra fragment Apr 26 12:02:25 this is different usage Apr 26 12:02:25 there's so much more info density on a 10" tablet Apr 26 12:02:37 it's like a destop program Apr 26 12:02:57 yeah, i think tablet design has more in common with desktop than phone Apr 26 12:02:59 goos: thats why i was saying just use the activity to host distinct fragments that you pull up as needed Apr 26 12:03:59 that way you won't suffer from whole animation problems mentioned above, and can reuse what you can Apr 26 12:04:06 it cracks me up when people use scala on Android Apr 26 12:04:23 i think, the pain point is not java … its fucking android Apr 26 12:04:32 does scala help me stuff Bundles ? Apr 26 12:05:18 i'm tired and cranky :) Apr 26 12:07:22 thought scala was just for speed Apr 26 12:09:43 goos: is this a personal project app? Apr 26 12:15:17 Is there a way to swap a viewgroup in an xml file with an inflated viewgroup in code? Apr 26 12:17:51 ViewGroup#removeView / #addView Apr 26 12:19:12 lasserix: yeah, just a little project to get myself familiar with stuff ICS+ Apr 26 12:19:21 SimonVT: i have a preview fragment, with textview at the top and a bottom at the bottom, I want to inflate another view and add it in depending on whats being previewed Apr 26 12:19:35 *and a button at the bottom Apr 26 12:20:11 So do that Apr 26 12:21:07 uhh can I put the top textview and the bottom button in the preview fragment's xml and then inflate a view for the contents and add it in between the two? Apr 26 12:21:28 ahh i guess i could just use a relativelayout Apr 26 12:22:35 so far i am adding both the preview contents and the bottom stuff but if i add the bottom stuff as a viewgroup or another inflated view it'll force the preview contents to "dissapear" Apr 26 12:22:44 *adding in code Apr 26 12:23:15 goos: cool Apr 26 12:24:59 the preview contents has an imageview to take up up available space, i think that's the conflict, anyways Apr 26 12:32:46 hey Apr 26 12:35:19 I want one of my Fragments to show a text field where the user can send me an e-mail with suggestions. Isnt there a text field that goes over many lines before user puts in text? Apr 26 12:35:42 "goes over many lines"? Apr 26 12:36:01 you mean you want to size the height of the inputtable text field? Apr 26 12:36:04 Maybe I can just set the height of a normal one :p Apr 26 12:36:43 But, do I need to style it for it to have a border like on old android versions? Apr 26 12:36:59 The holo ones only show a long line at the bottom Apr 26 12:37:44 probably Apr 26 12:37:48 or use holoeverywhere Apr 26 12:38:37 urgh Apr 26 12:39:02 hehe Apr 26 12:39:13 dont use holoeverywhere its bloated Apr 26 12:39:44 Hmm.. if I just set the height to match parent, the cursor will be in the middle of the screen and the blue bottom line at the very bottom of the screen Apr 26 12:40:11 urgh relative layout didn't work either Apr 26 12:40:33 I'm gonna find a pic of something that looks like what I want Apr 26 12:40:55 the comments field here: http://www.liferay.com/community/wiki?p_auth=k28dM1Ez&p_p_id=36&p_p_lifecycle=1&p_p_state=exclusive&p_p_mode=view&_36_struts_action=%2Fwiki%2Fget_page_attachment&p_r_p_185834411_nodeId=1071674&p_r_p_185834411_nodeId=1071674&p_r_p_185834411_title=Web+Forms+Portlet&p_r_p_185834411_title=Web+Forms+Portlet&_36_fileName=webform2.PNG Apr 26 12:40:59 hi. I am looking for a good "cheat sheet" for the overall android-architekture. Are there some good? Apr 26 12:41:07 Sorry for the insanely long url Apr 26 12:42:35 I cant think of other apps that takes user input like that and sends with button... other than e-mail apps :P Apr 26 12:42:44 Quacked: android:gravity="top" makes the text appear at the top Apr 26 12:43:05 true.. that helps a bit.. hold on.. phones ringing Apr 26 12:44:21 finally Apr 26 12:49:37 dewimper: that blue border at the bottom will still show though Apr 26 12:50:06 I know, and in fact I'd also like to know how to get rid of it and get a rounded rectangle instead... Apr 26 12:51:12 although I kinda got used to it now :) Apr 26 12:51:14 guessing we have to use a custom drawable Apr 26 12:51:23 it looks weird as a comment form Apr 26 12:56:13 Rounded rectangle is so 2.3 Apr 26 12:56:24 it's just classic Apr 26 12:56:37 whats chic these days? trapezoidal? Apr 26 12:57:04 maybe circular would be something Apr 26 13:00:27 lo all. Apr 26 13:01:16 I'm getting some device specific rendering issues (OpenGL ES 2.0), just wondering if anybody has seen anything like this before? https://twitter.com/ashleygwinnell/status/327767724098981888 Apr 26 13:05:09 If you want the app to do something when receiving a notification, I guess using a local broadcast from the intent to the app is the best way? I only want the app to react when it's alive and active Apr 26 13:05:29 SimonVT: how would you display a comment field in an app? Apr 26 13:08:09 aaaaaaaaarggggghhhhhhhhhhhh Apr 26 13:08:18 Which is a way to get human signature? Apr 26 13:08:21 time to find a lighter and take a long walk Apr 26 13:08:47 Quacked: play store has comment fields Apr 26 13:08:57 Need some java libraries or code to get a human signature, like those guys from UPS asks for. Any help on where I should begin? Apr 26 13:09:05 g+, facebook Apr 26 13:10:04 SimonVT: yeah, but say facebook, they show a giant white space with cursor at top left when you want to type a status Apr 26 13:10:52 The reason why I want a big space for it is because the entire page is dedicated to that form Apr 26 13:12:30 crised: http://stackoverflow.com/a/7401699/1666063 Apr 26 13:14:02 Quacked: You'll figure something out.. You could also make it a dialog, then it'll expand as text is entered Apr 26 13:15:23 yeah, maybe its silly with one fragment page for sending in content that I would include in next versions Apr 26 13:16:06 Eh, is it like a feedback form? Apr 26 13:16:35 Its an app with a few hundred specific jokes and I want users to send me new jokes :p Apr 26 13:16:44 lawl Apr 26 13:16:59 haha, nice. prepare for spam Apr 26 13:17:17 dewimper: I cant wait :D Apr 26 13:17:32 gonna create a new gmail account just for that, hehe Apr 26 13:17:34 snowpong: awesome man, thx Apr 26 13:18:30 if I get way too many requests I'll just remove the option in an update Apr 26 13:23:15 crised: stackoverflow basically has lots of good Android answers Apr 26 13:24:04 also, lots of bad ones Apr 26 13:26:32 snowpong: yes, I see, due to my ignorance is hard for me to find them sometimes Apr 26 13:26:45 snowpong: actually I retagged the question Apr 26 13:27:44 Examples for fragments show Fragment fragment = new DummySectionFragment(); Is it common to create separate classes in separate files for each fragment? Apr 26 13:28:38 In the DummySectionFragment() in the example they have the same textview for all fragments but with different content Apr 26 13:30:48 Quacked you can subclass Apr 26 13:31:11 huh? Apr 26 13:31:12 is one common textview enough to superclass it? Apr 26 13:31:35 mytextviewcontainingfragment extends fragment Apr 26 13:31:56 I dont want the same textview in fragments :P Apr 26 13:34:53 If I go from Fragment A -> Fragment B and have a edittext in fragment A pressing back will leave the text in the edittext but the edittext.getText will be empty, where is this state saved? Apr 26 13:36:51 EditText's handle saving their own state. When are calling editText.getText() in the fragment lifecycle? Likely you are doing it before the EditText has restored it's state Apr 26 13:41:15 jwearl: i call it in onActivityCreated Apr 26 13:41:22 err I call on it, there, and it's empty Apr 26 13:43:28 I'm running an ant script to build my project and it is extreeeemly slow when pre-dexing. how can I speed things up? Apr 26 13:48:29 Warting: 1) get a new i7 2) unpack all jar files to class files and put the reference to the directory of the unpacked classes Apr 26 13:48:58 Warting: i recomend 1) because a decend i7 will make you even more happy when dealing with tons of layout files Apr 26 13:49:11 do I have to use actionbarsherlock to use ActionBar.NAVIGATION_MODE_TABS for build 10? Apr 26 13:49:19 It is built on a virtual amazon server :) Apr 26 13:49:36 Warting: yeah that's masocism Apr 26 13:49:40 i won't do that Apr 26 13:50:35 it takes like 5-10 minutes to build Apr 26 13:51:03 so 1) Apr 26 13:51:05 get a i7 Apr 26 13:52:12 I'm running a service that runs on my homepage and many users use it. so i need a relayable internet connection wish i don't have :( Apr 26 13:52:47 Warting: it's about compiling an apk, right? Apr 26 13:52:53 yepp Apr 26 13:53:00 so many users don't do that Apr 26 13:53:10 Quacked: in case you're still interested: http://stackoverflow.com/questions/5254562/is-there-a-simpler-better-way-to-put-a-border-outline-around-my-textview Apr 26 13:53:11 that's one user once a while - called "developer user" Apr 26 13:53:17 yes, it does :) http://feed.nu/ Apr 26 13:53:31 about 20 000 people are using it Apr 26 13:54:15 ok in that case - what's slow is the un-jar for every build Apr 26 13:54:36 it's also dex-ing but from what i found out the unzip of every jar sucks even more Apr 26 13:55:04 what do you mean with unzip? is that a part of pre-dexing? Apr 26 13:55:15 java is called to compile Apr 26 13:55:27 java needs reference to classes (precompiled) that are inside of jar files Apr 26 13:55:31 a jar file is a zip file Apr 26 13:55:36 yea Apr 26 13:55:44 the java compiler is a great shit Apr 26 13:55:56 in unzips every time the stupid jar files Apr 26 13:57:15 i read somewhere that it's posible to only pre-dex the jar files ONCE and never again.. something with out.dex.input.absolute.dir but i never got it working Apr 26 13:57:24 or i did not understand what it was :) Apr 26 13:57:26 i also fooled around Apr 26 13:57:43 i unpacked all jars and referenced the directory of the .class files Apr 26 13:57:58 ok, i think i will try that Apr 26 13:58:00 that's a speed gain - about 200-400% on my old C2D Apr 26 13:58:06 but in the end i got new hardware Apr 26 13:58:31 in germany i get a i7 with 1.5TB disk 1gb ram for about 49,-/month Apr 26 13:58:36 do you know how to use multiple cores when running ant script to compile apk? Apr 26 13:58:56 i think the java compiler is too stupid to handle this Apr 26 13:59:10 yea, i guess Apr 26 13:59:23 so you just can make it less anoying Apr 26 14:00:04 there is no real sollution e.g. in gentoo we have ccach - which is a compiler cache for obj files Apr 26 14:00:08 ccache sry Apr 26 14:00:45 the c file (including the precompiler step) + compiler version + compiler options is hashed and cached with the .obj result Apr 26 14:01:15 i will try the unzip thing… brb :) Apr 26 14:01:15 the next time the obj files form the cache can be used with the hashkey - nice, clean and a lot of speedgain Apr 26 14:07:19 monsti: i extracted all jars and added all the class folders in eclipse and it seems to work, but not in the ant script. do i need to reference the libs somewhere else? Apr 26 14:07:47 you have some foobar.jar Apr 26 14:08:12 in ant you can use some directory directive, too but i am no ant guru Apr 26 14:12:16 Warting: did you get a speedgain in eclipse? Apr 26 14:14:40 hmm, duno. can't check right know.. i crashed everything :) Apr 26 14:14:51 that's nice ;) Apr 26 14:15:05 you offer full ant support? Apr 26 14:15:19 i am going to create a ant based server backup xDDDDD Apr 26 14:16:03 :) Apr 26 14:19:16 cool ;) i remind you on security Apr 26 14:30:18 <_wli> hi guys Apr 26 14:30:28 <_wli> would like to know what causes "Leak Window" error Apr 26 14:30:39 <_wli> when I finish() and activity, i get the following http://paste.pixls.co/h Apr 26 14:30:56 <_wli> it shows up red in my log but program still works fine Apr 26 14:31:26 did you open a dialog? Apr 26 14:31:48 _wli, it shows up red because it's an error :) Apr 26 14:32:03 <_wli> Zharf: yeah i know Apr 26 14:32:07 a coder error Apr 26 14:32:08 <_wli> any idea why it is happening Apr 26 14:32:23 i asked a question, did you answer? Apr 26 14:33:06 <_wli> monsti: yep Apr 26 14:33:07 <_wli> mDialog = ProgressDialog.show(LoginActivity.this,"Please Wait", "Processing login credentials...", true); Apr 26 14:33:12 <_wli> mDialog.hide() Apr 26 14:34:08 http://stackoverflow.com/questions/3826991/do-i-have-to-clean-up-all-dialogs-show-by-my-activity Apr 26 14:34:42 <_wli> is there a way to disable the back button? Apr 26 14:34:42 Use DialogFragment Apr 26 14:34:46 <_wli> i have @Override Apr 26 14:34:46 <_wli> public void onBackPressed() { Apr 26 14:34:46 <_wli> } Apr 26 14:34:59 <_wli> but would like to have the back button to now show up at all.. (be black) Apr 26 14:35:09 _wli: yes there is Apr 26 14:35:30 http://stackoverflow.com/questions/2000102/android-override-back-button-to-act-like-home-button Apr 26 14:36:40 Don't do that.. Apr 26 14:37:20 <_wli> monsti: http://stackoverflow.com/questions/2000102/android-override-back-button-to-act-like-home-button is just remapping home to back Apr 26 14:37:22 is IntentService <-> App considered a local broadcast? I guess the service and app run in the same process? Apr 26 14:37:37 <_wli> is there a way to make the back button not show up at all? Apr 26 14:37:42 _wli: read 1) "capture back button" Apr 26 14:37:50 ah ok - no there isn#t Apr 26 14:37:58 <_wli> ok thanks Apr 26 14:38:06 <_wli> but back <- home is a good idea Apr 26 14:38:12 e.g. you can't "remove" a hardware backbutton eg. on a S3 Apr 26 14:38:12 No it isn't Apr 26 14:38:20 <_wli> i like how the home button hides my app but not force it back to the login screen Apr 26 14:39:08 Just save credentials and don't show a login view? Apr 26 14:39:12 When the user logs in on my login screen, I want to present a terms and conditions screen the first time the app starts. That T&C activity has two buttons: accept and decline. Accept should proceed with the app, decline should drop back to login, as should the back button. I have this working, basically, but there's problems with the back button Apr 26 14:40:13 If you accept and end up in the application, then you can use the back button and end up at the login screen, which is of course not desirable. If I set android:noHistory="true" for the login activity, then that doesn't happen, but then if you use the decline button, it'll just flat out leave the app Apr 26 14:40:18 (i.e. go to the home screen) Apr 26 14:40:22 any guidance? Apr 26 14:41:26 <_wli> SimonVT: i m still new to android. (been on it for the past 20 hrs... ) another developer suppose to do that for me later :) Apr 26 14:42:19 dennda: Just start the loginactivity again if they decline Apr 26 14:43:19 SimonVT: I'm using startActivityForResult to know if they declined or accepted, and that's called from login. If noHistory="true" is set, the onActivityResult handler is not even called... Apr 26 14:43:32 dennda: in your TC activity do this http://stackoverflow.com/a/4780009/1666063 Apr 26 14:43:57 Show the terms in a dialog then, instead of a new activity Apr 26 14:44:10 Or in a fragment Apr 26 14:44:11 this is the channel where google refines the google search algorithms Apr 26 14:44:12 right? Apr 26 14:44:22 snowpong: I don't think that's what I want Apr 26 14:44:24 "guys i have xyz issue, how do i do..." Apr 26 14:44:29 <_wli> thanks guys :) Apr 26 14:44:38 snowpong you highlighted :P Apr 26 14:45:44 Can anyone recommend some simple FOSS Android APPs I can play around with? Apr 26 14:46:05 dennda: don't you want to disable back? if not, then do activityForResult and re-launch or whatever if the result back is not OK Apr 26 15:00:07 I'm looking into Loaders, what's a good strategy to make the refresh from time to time? Apr 26 15:00:48 they have a force method Apr 26 15:01:32 JakeWharton: yeah, I could force it, but I don't want it to request too much (perhaps even cache) Apr 26 15:01:43 write your own mechanism then Apr 26 15:01:48 loaders are pretty crappy Apr 26 15:02:00 I have some activity specific settings that I was going to place in a options menu / action bar. However, reading here http://developer.android.com/guide/topics/ui/menus.html these menus are for "app wide settings" Is there someone specific I should place activity specific settings? Apr 26 15:02:23 'On every startup' seemed overkill, now I was thinking about a timer of some sorts that checks a date on a server, and if it's more recent, it should fire off a query and update Apr 26 15:02:39 but it seems complex enough that I presume it's already been done, indeed Apr 26 15:02:51 how do I make something layout parent bottom *or* above a component in a relative layout? Apr 26 15:02:58 if you're already making a roundtrip to the server then why not just conditionally request the data every time? Apr 26 15:03:38 JakeWharton: good point Apr 26 15:03:48 pfn: above + alignWithParentIfMissing Apr 26 15:04:03 ah, is there such an attribute, handy Apr 26 15:04:04 thanks Apr 26 15:04:53 that doesn't seem to play nice with layout_above Apr 26 15:04:58 at least according to docs Apr 26 15:05:32 * JakeWharton shrugs Apr 26 15:05:35 custom viewgroup Apr 26 15:06:49 Hi, is there a solution to put a horizontallistview inside a vertical scrollview? Some trick or a variant? Apr 26 15:07:32 two-way view Apr 26 15:07:55 lucas rocha Apr 26 15:08:16 afaik there is no horizontallistview in android Apr 26 15:08:26 you have to get some custom element Apr 26 15:08:43 doesnt a scrollView have an orientation ? Apr 26 15:08:55 Yep, vertical Apr 26 15:09:09 huh, thats a bit crud Apr 26 15:09:11 (There's HorizontalScrollView as well) Apr 26 15:09:18 i know but there an open source library for that Apr 26 15:12:30 do I have to use actionbarsherlock to use ActionBar.NAVIGATION_MODE_TABS for build 10? Apr 26 15:13:36 10 is gingerbread? yes Apr 26 15:14:06 but a horizontalscrollview wouldn't recycle views Apr 26 15:16:08 do you think this is a possible/good solution? http://stackoverflow.com/questions/5398449/how-can-i-create-a-pulse-like-ui-for-an-android-application Apr 26 15:16:13 the big layout response Apr 26 15:17:45 FrancescoV: i think for a cellphone this will work with 1280x720 or 1280x800 Apr 26 15:18:04 FrancescoV: but the horizontal layout or the tablet layout or on non xhdpi phones it won't work Apr 26 15:18:09 you need something more dynamic Apr 26 15:18:22 e.g. only 2 or only one row Apr 26 15:18:28 or some tabs Apr 26 15:18:58 monsti: i know but in have this layout: (extually more complex) Apr 26 15:19:22 idd i have one row Apr 26 15:19:36 FrancescoV: I've had HorizontalScrollViews in ListViews - but only as header/footers.. Don't know if they work in ScrollView or ListView as adapters... try it out Apr 26 15:20:23 i'll take screenshot and post it here Apr 26 15:20:42 it's also about how you want to update your data Apr 26 15:20:46 not only about the views Apr 26 15:23:41 http://i39.tinypic.com/1rb3gy.png Apr 26 15:24:46 so my layout is a profile: top = basic info + image, then we have horizontallistview with images + date (not fully visisble), at the bottom i have a layout that comes up if user touches Apr 26 15:26:45 someone with an idea? Apr 26 15:36:21 ugh Apr 26 15:36:26 my android emulator is upside down :O Apr 26 15:36:35 portrait-upside down Apr 26 15:37:00 if I press CTRL+F11 it goes landscape-toRight, but never into portrait-therightway Apr 26 15:37:02 any ideas? Apr 26 15:37:59 turn your screen upside down! Apr 26 15:38:10 then the rest - again - is upside down :p Apr 26 15:38:27 well, that's another problem for another day Apr 26 15:38:41 ^^ Apr 26 15:38:49 try any other ctrl+F? Apr 26 15:38:50 I see recursion there Apr 26 15:39:06 well use the windows solution Apr 26 15:39:13 :p maybe update your sdk Apr 26 15:39:23 FrancescoV, could try that. :P Apr 26 15:39:37 remove the avd Apr 26 15:39:43 create a new one Apr 26 15:44:50 I tap some random button "calendar has crashed." I never used this `calendar` on the emulator. funny thing Apr 26 15:45:51 spobat: try using androvm Apr 26 15:46:02 is it faster? Apr 26 15:46:11 yeah Apr 26 15:46:15 it'x x86 Apr 26 15:46:54 looks good :) Apr 26 15:47:04 let me try this one; thanks! Apr 26 15:47:25 adb connect "ipofyourvm":555 Apr 26 15:48:41 sry 5555 Apr 26 15:48:55 is it possible to animate activity transitions, or only fragments? Apr 26 15:50:02 look at overridePendingTransition Apr 26 15:50:20 https://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int,%20int) Apr 26 15:54:17 thankee JakeWharton Apr 26 15:58:32 JakeWharton: I need a library for Glass Apr 26 15:58:33 pronto Apr 26 15:58:42 ON IT Apr 26 15:58:49 ^5 Apr 26 16:00:39 Whats up with The method onTabSelected(ActionBar.Tab, FragmentTransaction) of type MainActivity2 must override or implement a supertype method ? Apr 26 16:01:21 @Override is being used improperly Apr 26 16:02:42 I just removed the three methods all together and gone went the errors Apr 26 16:02:43 hehe Apr 26 16:03:56 I actually had them twice for some reason :D Apr 26 16:08:51 but why do I get a NPE with this? final ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); Apr 26 16:09:40 hey, Im trying to update a Contact's photo... I'm using this function from the ndroid devloper's page located here http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.DisplayPhoto.html but it says RawContacts.DisplayPhoto.CONTENT_DIRECTORY requries API 14 Apr 26 16:09:40 because action bar is null Apr 26 16:09:47 I use API 10 as my minSdk Apr 26 16:09:52 because getSupportActionBar returned null Apr 26 16:09:54 what am I supposed to do then? Apr 26 16:10:09 but what am I doing wrong? :) Apr 26 16:10:36 Maybe your activity is using a theme that has no titlebar or something? Apr 26 16:10:48 sonOfRa: youre sharp.. Apr 26 16:11:16 nah, i just googled "getSupportActionBar returns null" Apr 26 16:11:26 and found this http://stackoverflow.com/a/7300887/1565759 Apr 26 16:11:43 I just thought I had forgot something obvious Apr 26 16:11:47 but you are right, it worked now Apr 26 16:14:11 thanks :) Apr 26 16:17:13 Can the top ActionBar be hidden before content is displayed? I tried with setDisplayShowHomeEnabled(false) and setDisplayShowTitleEnabled(false) but I still see the title for a second Apr 26 16:17:21 no Apr 26 16:17:45 you can change the properties in the theme which will create it in a certain configuration Apr 26 16:18:02 ok, thanks Apr 26 16:32:46 I really hate that you cannot easily detect if an app is in the background or not. Anyone know of an easier way than to subclass all activities and do onPause/onResume counting? Apr 26 16:33:55 is it possible to get TransitionDrawable to respect the scaleType on an image view? Apr 26 16:35:38 snowpong: what are yo utrying to accomplish? Apr 26 16:35:48 you know the app is in the background when onpause/onstop are called Apr 26 16:35:57 you know it's not in the background when onresume, etc Apr 26 16:36:21 btw when it's in the background its not doing stuff.. or shouldn't be, anyway Apr 26 16:39:41 speakingcode-wor: I have a service that handles push notifications. It sends a local broadcast. I have a receiver tied to the applicationcontext. I only want that receiver to launch an activity only when the user is actually in the app. Apr 26 16:40:17 how bout this Apr 26 16:40:51 oh, hmm Apr 26 16:41:02 can you not use a boolan value somewhere, say in the receiver Apr 26 16:41:31 speakingcode-wor: you'd still have to set it in every onPause/onResum Apr 26 16:41:32 e Apr 26 16:41:38 speakingcode-wor: I could, but I would then have to keep track of onpause/onresume for all my activies. Apr 26 16:41:54 call it - appIsOpen.. n all your activities, set it it to false on onPause, and set it to true in onResume Apr 26 16:42:13 well, that's the only way. unless you want to implement a common base class for all your activities to extend Apr 26 16:42:24 speakingcode-wor: that is in no way a more elegant solution :P Apr 26 16:42:53 speakingcode-wor: I'm wondering if I can abuse https://developer.android.com/reference/android/app/ActivityManager.RunningTaskInfo.html#numRunning Apr 26 16:42:55 when onPause is called, you don't know if the user is going to another activity in your app, leaving your app, whatever Apr 26 16:43:10 I have an EditText with inputType="textFilter". When I long click on a word, the complete text of the EditText is selected. Without textFilter, only the single word is selected. Is it possible to use textFilter but still only select a single word on a long click instead of the whole text? Apr 26 16:43:21 speakingcode-wor: you have an int you ++ for resume, you -- for pause Apr 26 16:43:32 why count? Apr 26 16:43:54 set a bool to false onpause, set it to true on resume (bool outside of the acitivities.. 'global' but not really) Apr 26 16:44:13 if one of your activities pauses, and another one doesn't load up to set it to true, you're not in the app Apr 26 16:44:19 if it's true, you're in your app Apr 26 16:44:55 put it in the application context or a shared pref or a static singleton or whatever makes sense Apr 26 16:45:26 overriding onPause to do that in an activity is like 8 keystrokes Apr 26 16:49:40 speakingcode-wor: concurrency issues will kill that - if A onPause after onResume kicks in for B you're in a wrong state. It's typically better with an int. Same amount of code basically though - but I'm looking for another solution Apr 26 16:50:15 onresume can get called after onpause for the prior activity? Apr 26 16:50:23 that's.. stupid Apr 26 16:50:27 but, fair enough Apr 26 16:51:57 how is that stupid? Apr 26 16:52:09 pause doing something, do something else, and then unpause the original thing Apr 26 16:53:41 JakeWharton: no, he's saying this is stupid: 0) startActivity(B); 1) B#onResume(); 2) A#onPause(); Apr 26 16:53:59 I tend to agree that it's stupid and I don't think can actually happen, but using an int makes more sense anyway Apr 26 17:05:24 evanc: I don't know if the order is guaranteed to be A:resume A:pause B:resume B:pause so I'd rather be on the safe side. One problem with the ref/deref is that one can jump around in the backstack. But I guess/hope all the tasks being skipped all get onpaused. Apr 26 17:06:01 snowpong: yeah, seems reasonable to me Apr 26 17:06:31 snowpong: you could also do registerReceiver/unregisterReceiver instead of doing ref counting Apr 26 17:07:03 evanc: yeah, but as I said, this receiver is not in an activity, but tied to the applicationcontext Apr 26 17:07:10 so I don't know when to unregister Apr 26 17:08:29 snowpong: your receiver would broadcast yet another "create notification" intent; if no one's listening, it falls on the floor. Apr 26 17:08:39 note: I'm in no way suggesting you use this approach :P Apr 26 17:10:21 For some reason when I set android:layout_alignparenttop on my image view in a relative layout, the _center_ point of the image is aligned with the top (not the top edge of the image) is this normal? Apr 26 17:11:45 evanc: it's actually starting an activity, so suddenly the phone gets an activity started out of nowhere - which is bad :) Apr 26 17:12:15 yeah Apr 26 17:13:38 It's crazy, it's possible to start gps listeners and motion listeners tied to the applicationcontetxt - which "never" dies, yet there is no easy way to turn these off when the user brings the app to the background. Mayor oversite in the API Apr 26 17:21:08 people what I do is that I launch MX Player from my app using intent for videos Apr 26 17:21:31 however, some video have synchronisation problems Apr 26 17:21:53 where could the problem be ? ? Apr 26 17:22:50 Is it just me or is relative layout a complete mystery? It seems that when you turn certain parameters on (by setting some value) and then removing them again does not have a null effect Apr 26 17:23:37 Could someone please explain to me the difference, both to the user and to the phone as far as resource/cpu usage, between using multiple Fragments to define your layouts with one Activity to switch between them and using multiple Activities to define the layouts and just switching Activities. Apr 26 17:26:45 speakingcode-wor: evanc: turns out it IS possible to know if you are in the background or not using ActivityManager.getRunningAppProcesses - but it's strongly recommended not to be used by the Google guys (may change), and it also requires GET_TASKS permission. And I don't want to ruin peoples auto-upgrades experience.... meh :( Guess onPause/onResume is the only proper way then. Apr 26 17:36:27 Hey ... does any one know what is the correct URI for a specific contact's thumbnail photo?? Apr 26 17:54:49 <_wli> is it possible to turn off auto correct for a list of text fields ? Apr 26 17:55:11 <_wli> foudn it Apr 26 17:55:12 <_wli> http://davidwalsh.name/disable-autocorrect Apr 26 17:55:41 <_wli> oops... that's for html only Apr 26 18:01:54 where is the best place to register the broadcasters when you have to wait for a sms? Now I'm registering the broadcast in Oncreate of activity.. but Once the user or system stop/destroy the application I think that I'm losing the broadcast since the user opens again the app. right? Apr 26 18:02:22 my app, only have one activity. Apr 26 18:35:19 Hi! I'm having a strange issue: when I build the apk from my PC, some icons from the action bar doesn't show up, even though the button action still works. Apr 26 18:35:46 When I build it in another (iMac) computer, it works normally. Apr 26 18:36:25 I'm using Ubuntu on my main for development. Apr 26 18:36:46 hmm, I wonder how fun it'd be to bootcamp my mac with ubuntu + xmonad Apr 26 18:37:29 case sensitivity in filenames? Apr 26 18:37:53 I could track that the icons doesn't show on devices with Android 2.x. On 3.x up it works... Apr 26 18:38:13 I'm guessing it could be related to the use of ActionBarSherlock, but I can't figure it out. Apr 26 18:38:41 Could be... But I don't really know, because it works on devices 3.x+. Apr 26 18:39:08 look at your res apk and make sure it matches up with your resources Apr 26 18:40:22 How can I do that? Apr 26 18:45:10 moin. Apr 26 18:46:04 Ok. I unzipped the apk... :) Now checking resources. thx Apr 26 18:46:46 Anyway, if anyone has another guess of what could it be... Apr 26 18:48:37 character encoding? Apr 26 18:49:05 anyone know how to force an onDraw()? Apr 26 18:49:12 invalidate() doesn't do it Apr 26 18:51:45 I have an app that presents a search field, after which I want to launch a new activity Apr 26 18:51:50 to show the results Apr 26 18:52:34 I don't know where to call my ASyncTask after the user presses Search Apr 26 18:53:01 are you displaying the results in the new activity? or do you want them in a listview or something in the same activityi? Apr 26 18:53:09 do I pass the parameters to the new Fragment, or do I pass the result of the query Apr 26 18:53:20 wow, just found out that activities are destroyed upon rotation. Apr 26 18:53:22 and then recreated. Apr 26 18:53:35 hesperaux: I want to display them in the new activity Apr 26 18:53:38 and that means all it's internal fragments are too! Apr 26 18:53:56 etcetera: setRetainInstance(true) might sometimes help Apr 26 18:53:59 why is android reallocating and re-rendering the entire view hiearchy and related objects? Apr 26 18:54:24 please do not blindly use setRetainInstance Apr 26 18:54:27 belgianguy: that means you have to manage state. Apr 26 18:54:30 understand what it does and use it when necessary Apr 26 18:54:30 belgianguy, well i'm not sure about fragments, necessarily, but I'd startActivityForResult(intentContainingExtraSearchTerm, YourSecondActivity.class); Apr 26 18:54:30 how can we make the app store data in /data/data/com.package.app/ directory and read it Apr 26 18:54:38 hesperaux: I have a 'form' of some sort, and want the user to be shown results in a new activity Apr 26 18:54:55 I think that paypal app does something in similar footing Apr 26 18:54:56 setretaininstance seems to correlate to, keep a static instance of a viewcontroller around. Apr 26 18:55:04 which has *SERIOUS* memory implications, and state implications. Apr 26 18:55:21 etcetera: that's why JakeWharton warned about it Apr 26 18:55:54 belgianguy, that way your intent gets passed into the results activity with an Extra (use intent.putExtra("userSearchterm", editText.getText())), and your second activity can call the ASyncTask to do the actual search Apr 26 18:56:08 then you can display them as you like, with a ListViewAdapter or whatever Apr 26 18:56:54 hesperaux: yeah, I don't know about timing issues Apr 26 18:57:04 if I can execute in OnViewCreated Apr 26 18:57:06 JakeWharton, I know it's annoying to ask people directly...but you probably know the answer to this: how do I force an onDraw() when invalidate() isn't doing it for me? Apr 26 18:57:10 might take longer Apr 26 18:57:30 belgianguy: what's even more surprising....this isn't proclaimed from the mountains of Android-ia Apr 26 18:57:44 etcetera: because people would abuse it Apr 26 18:57:56 there used to be another hack to keep stuff around Apr 26 18:58:00 usually leads to tears Apr 26 18:58:05 belgianguy, in your resultsActivity, consider setting the UI to an indeterminate loading state (look up how to do that), and then start your asynctask...when the task completes, load the views you need into that UI and stop the loading widgets Apr 26 18:58:16 why are we hacking? why not just have a really good note in hello world talking about this? Apr 26 18:58:33 hesperaux: yeah, I keep a non-cancellable ProgressDialog handy atm Apr 26 18:58:42 etcetera, sorry, but it does tell you this in the beginning of the android training in the Life Cycle discussion Apr 26 18:59:44 http://developer.android.com/training/basics/activity-lifecycle/recreating.html Apr 26 18:59:52 Eh, if invalidate() doesn't cause onDraw() to be called, you're doing something wrong somewhere else that you need to fix Apr 26 19:00:06 It's at the very end of a minor caution note in the Android training. Apr 26 19:00:27 etcetera, it's also in the lifecycle diagram i believe Apr 26 19:00:45 SimonVT, indeed - if only this were my code and I understood it >_> Apr 26 19:00:59 Where are you calling invalidate Apr 26 19:01:11 hesperaux: I've been doing Android development for roughly 48 hours now. There are 10 things like this that developer relations would do well to indicate to their users. Apr 26 19:01:20 SimonVT, i've looked into this and have subsequently tried overriding the onMeasure() method, insuring that it has dimensions greater than 0, and I've also set as many viewgroups as I can find to setWillNotDraw(false) Apr 26 19:01:32 Chet and Romain did a really cool talk on Tips & Tricks. Would be lovely if there was a monthly blog post on stuff like this. Apr 26 19:02:02 There's just so much non-intuitive nuance here. Apr 26 19:02:07 SimonVT, every time the view is intended to change, invalidate() is called. I know that it reaches these calls, but that it does not reach onDraw(). I should also mention that it DOES call onDraw() but ONLY if i tap the view manually. Apr 26 19:02:29 Are you calling it from a background thread? Apr 26 19:02:32 Details! Apr 26 19:02:38 etcetera, i understand that it's frustrating. I'm also new to android and I have had plenty of head-banging sessions (not in a good way) Apr 26 19:02:53 SimonVT, pretty sure I am not calling it from any other threads but the main activity UI Apr 26 19:03:05 perhaps there is a subtle thing happening here. Would you like to see the code? Apr 26 19:03:17 before i go down a rabbit hole, can a tablelayout be plugged into an adapter to generate its rows? Apr 26 19:03:35 Code always helps Apr 26 19:03:44 good smeogol always helps xD Apr 26 19:04:11 speakingcode-wor: i dont think it can, i just made my own custom table row class, let me pastebin it Apr 26 19:04:29 SimonVT, this is the library I am using (somewhat modified in my attempt to fix it) http://pastebin.com/tiGDpq0T Apr 26 19:04:53 hmm Apr 26 19:05:02 I have included the source code of jjoe64's GraphView project in my workspace as a library, and I include its auto-generated jar in my own project's build path Apr 26 19:05:08 speakingcode-wor: http://privatepaste.com/582b0dda62 basicaly, you put ... in the xml file for each row Apr 26 19:05:22 There are a couple of other classes for the library, but they are minor and don't perform any drawing Apr 26 19:05:31 speakingcode-wor: and in the adapter, you create an instance of MyTableRow.LayoutParameters, within getView, you pass that instance to .bind(..) Apr 26 19:05:50 speakingcode-wor: all the rows sharing a single LayoutParameters will size to eachother Apr 26 19:06:01 SimonVT, this is my Activity code. http://pastebin.com/PVC4M55n Apr 26 19:06:34 I used BluetoothChat as a base. BluetoothChatService.java was modified also to provide the data to the UI via the MessageQueue. I know this is kind of hacky, but I need it to work that way for the time being (school project is coming due) Apr 26 19:07:02 be advised that neither of those classes are actually Services, despite how they named the class in BluetoothChat (it extends Activity) Apr 26 19:07:23 hmm Apr 26 19:07:31 cool Apr 26 19:07:31 speakingcode-wor: this is an example of it working, http://gallery.earthtools.ca/index.py/android/device-2013-02-26-101857.png Apr 26 19:07:32 woops, actually it doesn't extend anything, it's just a class. But the service class does not update the UI. it sends messages to the UI with data. Apr 26 19:08:08 speakingcode-wor: in that example, i just had 4 views inside my custom one Apr 26 19:09:08 speakingcode-wor: there is also a minor bug, it looks much worse in the eclipse xml editor, but looks good once ran on a real device Apr 26 19:09:09 so this does use an adapter? Apr 26 19:09:11 its not calculating height very well Apr 26 19:09:23 speakingcode-wor: the code can be used from within a normal adapter Apr 26 19:09:45 speakingcode-wor: just subclass your adapter and replace getView with something that will inflate a layout using this view Apr 26 19:10:21 and the adapter can be set to a TableLayout? Apr 26 19:10:35 or do u have a custom class for the TableLayout also? Apr 26 19:10:50 my custom row class doesnt need any special parent Apr 26 19:11:08 but you have to manualy link all the rows to a single shared instance of LayoutParams Apr 26 19:11:29 i just stick them into a normal ListView pairs with a normal Adapter Apr 26 19:11:39 paired* Apr 26 19:11:50 brb Apr 26 19:12:06 i just want to be able to do something like... TableLayout tl = (TableLayout) findViewById(R.id.mytable); tl.setAdapter(someArrayAdapter) Apr 26 19:12:25 same as i would with a listview Apr 26 19:13:01 SimonVT, i'll brb Apr 26 19:13:12 now i kinda question why i would even need a tablelayout at all, i guess i could just use a listview entirely Apr 26 19:13:16 Anyone happen to know what file controls which app is opened when the camera button is pushed? Apr 26 19:13:29 speakingcode-wor: That or a GridView. Apr 26 19:14:08 jdawes: yeah, but, well gridview usually implies columns being identical in form Apr 26 19:14:37 listview, each 'row' in the list can be broken down into heterogenous items however i need Apr 26 19:15:18 speakingcode-wor: I haven't been following your questions I just saw the TableLayout comment and assume you would be adding rows with some columns in there, you're right though. Apr 26 19:16:14 ah, yeah Apr 26 19:16:16 Lasivian, wouldn't that be controlled by the IntentFilter for the button? Apr 26 19:16:33 speakingcode-wor: with the code in my pastebin, you can use a plain old ListView Apr 26 19:16:41 Lasivian, if your manifest declares the same intent for your app, it should offer a choice to the user. Not sure though cuz i've never done it Apr 26 19:16:41 speakingcode-wor: the code in my pastebin will handle each row of results Apr 26 19:16:42 well i think a listview will solve my problem. now i don't see the purpose of a tablelayout unless it provides something i'm not considering Apr 26 19:17:00 all my code does is make the columns between each row line up Apr 26 19:17:06 i think TableLayout is intended for a set table size Apr 26 19:17:12 why not just define a listview, and defne a layout to use per item in the list which corresponds to a 'row' of items Apr 26 19:17:16 ah Apr 26 19:17:38 seems i can just do that with properly defined layout too Apr 26 19:17:44 maybe a little more tedious but, meh Apr 26 19:17:45 yep Apr 26 19:17:50 it's more flexible anyway Apr 26 19:17:59 you can make it look prettier or add icons or whatever later if you want to Apr 26 19:18:18 plus you'll have the added benefit of listview garbage collection Apr 26 19:18:37 yeah. i guess cause i'm displaying tabular data, anything with 'table' in the name seemed attractive, but oh well Apr 26 19:19:41 speakingcode-wor: still sounds like the example in my pastebin is your best answer Apr 26 19:20:08 it simulates TableLayout inside a ListView Apr 26 19:20:45 but so will a listview with an adapter using a layout that looks the way i want, and i'm halfway done Apr 26 19:21:06 hesperaux: Have you considered making a simpler test case Apr 26 19:21:18 SimonVT, i actually have done that Apr 26 19:21:25 i used the demo code from the project's github Apr 26 19:21:28 it works fine in android 2.2 Apr 26 19:21:42 in 4.0.4 and 4.1.1 (my only other devices) it has this problem Apr 26 19:21:47 i can pastebin that too? Apr 26 19:22:26 http://pastebin.com/hFNuwWsK Apr 26 19:23:43 hrrm, I must have really screwed this up, I don't even see a camera button intent on my device Apr 26 19:38:59 Hello, how to know the time taken by the UI Thread to finish one loop? Apr 26 19:39:10 hesperaux: I don't know. If redrawAll invalidates the view, that should work.. You might want to talk to the guy who made the view Apr 26 19:39:24 MoshDev: What? Apr 26 19:39:48 the UI Thread time Apr 26 19:40:01 isn't UI Thread loops? Apr 26 19:40:14 What do you mean it loops Apr 26 19:40:16 so what is the time taken by the current loop Apr 26 19:40:21 looper Apr 26 19:41:10 SimonVT: wait, let me explain Apr 26 19:43:56 here is a question that might make more sense. Is it possible to specify the action of a hardware button that cannot be overridden with an intent? Apr 26 19:44:56 SimonVT: here? Apr 26 19:45:18 SimonVT: see this article about UI performance Apr 26 19:45:18 https://plus.google.com/104793567654398886385/posts/SF77ebFrLRN Apr 26 19:45:42 and he is talking about keeping UI thread interval to 15 ms Apr 26 19:45:46 16 ms Apr 26 19:45:55 how can i know the current interval? Apr 26 19:46:40 You can use e.g. traceview to see how long stuff takes Apr 26 19:47:26 isn't there any way to get it from the code? Apr 26 19:48:24 Sure, get the system time and throw in some log statements Apr 26 19:48:42 But logging every single method call is probably not what you want Apr 26 19:48:50 Since it's going to take forever Apr 26 19:49:23 While traceview is 2 lines of code and you get a nice graph where you can see how long it takes and why Apr 26 19:55:00 SimonVT: sorry Apr 26 19:55:05 internet disconnected Apr 26 19:55:21 i didnt receive anything Apr 26 19:55:55 SimonVT: isn't there anyway to get the interval through code? Apr 26 19:56:44 To do that you'll have to log every single method call in your app Apr 26 19:56:54 Extend every single view to log their draw time Apr 26 19:57:07 Instead of adding 2 lines of code and use traceview Apr 26 19:57:57 mmm that seems useless :) Apr 26 20:55:09 so I have an ImageView and a TextView inside a LinearLayout that, as a whole, is acting like a button Apr 26 20:55:27 I have set the ImageView and TextView's duplicateParentState to true Apr 26 20:55:35 and the LL's clickable attrib to true Apr 26 20:55:46 but for some reason, the children aren't changing state like they would outside the LinearLayout Apr 26 21:01:57 SimonVT: do you know of any well written open source apps that handle (related) fragments within one activity instead of two - i'm interested in how the implement the wiring-up logic and determine configurations, etc Apr 26 21:02:18 everything i come up with looks like shit Apr 26 21:03:23 from a code implementation perspective Apr 26 21:03:35 Not really, no Apr 26 21:03:54 k, thx Apr 26 21:04:40 Hi, I've a little trouble setting up a layout as desired. Can you help me? http://pastebin.com/HCdAEpCR The problem is "app_title_text_view" TextView is aligned to the left, and I want to put it centered. I've been playing with gravity's but I can't get this TextView to the place I want. Apr 26 21:04:47 And in fact any info trying to help me understanding this layouts will be highly appreciated. Apr 26 21:05:29 My approach atm is just attaching what needs to be shown, detach everything else.. Helper methods that check if fragment is null, isn't added, whatever Apr 26 21:08:13 one of my main complaints with the ADT has been - that its not human friendly to look at a huge tree of res/layout folders and understand wth is going on in your app. there needs to be some way to declare (internal or external dsl) or visualize (even if helping the tools with some annotation in a generic sense) the information architecture of the app. Apr 26 21:08:31 in the phone days, i think things were simple enough - you had a handful of activities Apr 26 21:09:00 but when you divy things between phone / tablet, and the more activities & fragments you have, the tooling doesn't really help you comprehend things Apr 26 21:09:37 something like that apple storyboards http://developer.apple.com/library/mac/#documentation/General/Conceptual/Devpedia-CocoaApp/Storyboard.html Apr 26 21:09:43 Wireframes and naming schemes Apr 26 21:09:51 not saying those are perfect but Apr 26 21:10:35 yeah, Wireframes if they were round tripped Apr 26 21:40:02 ... "too many tabs: when your tree style tabs extension ends up exhausting its timeslice" Apr 26 21:40:53 p_l: i liked that extension, but just went to tabgroups. too bad they are removing those from core :( Apr 26 21:41:07 but UnloadTab is an awesome extension, maybe that would help Apr 26 21:41:20 g00s: I *do* have UnloadTabs Apr 26 21:41:26 dahell? Apr 26 21:41:35 how many tabs do you have open :D Apr 26 21:41:47 it's just that I had close to 400 tabs open in one window, and treestyletabs went overtime at one point Apr 26 21:41:58 haha Apr 26 21:42:00 ok, you win Apr 26 21:42:09 have you heard of bookmarks :P Apr 26 21:42:21 are you one of those hoarders ? :D Apr 26 21:42:23 g00s: it's a "private browsing" window :> Apr 26 21:42:37 all tabs opened within last 45 minutes Apr 26 21:42:48 :| Apr 26 21:43:28 hmm... given that most are pics, maybe it's time to start saving them somewhere... Apr 26 21:43:42 btw, desktop Chrome could take lessons from mobile chrome Apr 26 21:44:13 on my N4 I've got ~36 tabs open, and it doesn't go overboard with memory Apr 26 21:46:19 i have several tab groups: scratch, toread, and work. i have a system where over the week, i go to scratch and browse & find interesting stories - if i want to read them, i move them to toRead. at the end of the week i select 10 from those and delete the rest and start the next week with no tabs Apr 26 21:46:34 heh Apr 26 21:46:39 what i like about tab groups is that when you switch groups, its like being in a different context Apr 26 21:46:59 my personal laptop that I haven't used in some time got unbroken tabset since over a year ago Apr 26 21:47:07 so when i go to my work group, which may have android docs open & stuff, i dont see the other distracting tabs screaming "read me, read me!" Apr 26 21:47:59 and with UnloadTab, FF has one a few of my work tabs loaded, so its always using less than 500mb Apr 26 21:48:06 *only Apr 26 21:48:19 which strangely seems reasonable these days Apr 26 21:48:30 emacs only takes 33mb :D Apr 26 21:48:55 I use UnloadTab and FF is still using 1.08 GB with one loaded tab :\ Apr 26 21:49:16 O.o Apr 26 21:49:24 kakazza: ... interesting Apr 26 21:49:34 interesting indeed Apr 26 21:49:36 who cares about ram usage, unused ram is wasted ram Apr 26 21:49:36 The tab being the "New Tab" window Apr 26 21:49:46 unless you're actually running out... Apr 26 21:49:49 sonOfRa: i don't have unused ram :( Apr 26 21:50:01 I have 1.15GB unused RAM. Out of 16GB Apr 26 21:50:08 i have to feed the eclipse and emu monsters Apr 26 21:50:41 oh yeah, i remember when I used to have so many emulators open, my 16GB machine ran out too Apr 26 21:50:50 i have 4gb :) Apr 26 21:53:34 sonOfRa: there's a difference between "ram unused" and "ram wasted by an application without actually doing something productive with it" Apr 26 21:53:44 kakazza: btw, how did you count the 1.08GB? Apr 26 21:54:44 * p_l uses some programs that, when looking at wrong metric, would make you think they are using 0.5TB of ram on a 4G machine Apr 26 22:11:39 SimonVT, I have tried using redrawAll() and it doesn't work. It calls invalidate(), but onDraw() is never called after that. Apr 26 22:12:02 I will see if there's some way to talk to jjoe64 i guess Apr 26 22:19:57 p_l: "Real Mem" on OS X Activity Monitor. Apr 26 22:29:46 kakazza: hmm Apr 26 22:44:21 SimonVT, I fixed it! Apr 26 22:44:28 god what a confusing library Apr 26 22:50:54 How does Android handle low memory with respect to Services ? Apr 26 22:51:05 it tries really hard not to kill the service Apr 26 22:51:14 but will end up killing it if it has to Apr 26 22:51:42 in which case, it calls a function that you can override in order to save your state Apr 26 22:51:47 Got it Apr 26 22:51:56 and later, when resources are free, it auto-restarts the service and calls another overrideable function to restore the state Apr 26 22:52:11 OnDestroy ? Apr 26 22:52:25 i don't recall off hand - haven't looked at it in a few weeks Apr 26 22:52:29 ah, and also onLowMemory Apr 26 22:52:52 I'm looking at the differences between the lifecycles for Activities and Services Apr 26 22:53:30 I just realised that IDEA can override stuff if I just type part of the method name in the class Apr 26 22:53:32 btw, i believe the behavior changes depending on whether it is a bound Service or not Apr 26 22:53:43 since the UI thread binds to the Service and implements callbacks Apr 26 22:53:48 I think it didn't do that a few releases ago Apr 26 22:57:51 hey, phandroid users flame at Kevin Krause XD Apr 26 22:59:26 who? Apr 26 22:59:48 also what's phandroid Apr 26 23:00:15 pahndroid / androidpolice and android news sites i check Apr 26 23:00:21 *are Apr 26 23:00:31 aha Apr 26 23:00:48 http://www.androidpolice.com/2013/04/26/google-is-working-on-and-testing-android-4-3-its-still-jelly-bean/ Apr 26 23:01:58 i thought #5 as well Apr 26 23:02:32 otoh, if #6 is true appcompat obviously isn't happening / extensive as i hoped Apr 26 23:02:59 :( Apr 26 23:04:54 well I would like #6 Apr 26 23:05:22 I'm already stuck on 4.0.4 for god knows how long... no one's making devices I would pay for Apr 26 23:05:43 i don't understand this. "Google Drops The Hammer, Bans Facebook (And All Others) From Performing Non-Play Store App Updates" from http://www.androidpolice.com/2013/04/26/google-drops-the-hammer-bans-facebook-and-all-others-from-performing-non-play-store-app-updates/ Apr 26 23:05:45 BUT Apr 26 23:05:51 http://android-developers.blogspot.com/2011/07/custom-class-loading-in-dalvik.html Apr 26 23:05:58 seems to imply to me anyhow, thats one use case ? Apr 26 23:06:17 (second bullet) Apr 26 23:06:49 yeah I noticed the note on the developer console today Apr 26 23:10:21 Zharf: but i'm kinda confused why FB would go that route anyhow, unless it was a by-product of their monkey-patching get-around for the 65k method limit, or one of those dvm limits Apr 26 23:10:41 i dont think it was the 65k one, but kinda related Apr 26 23:11:21 i guess monkey patching is really precise; dynamically loaded Apr 26 23:11:53 I really couldn't care less what bull fecesbook is up to :> Apr 26 23:12:26 heh, indeed Apr 26 23:14:40 they broke their xmpp Apr 26 23:17:43 jsr-353 (json-p) http://www.infoq.com/news/2013/04/standard-java-api-for-json Apr 26 23:18:19 Hey Apr 26 23:19:11 in a listview, if I use viewpropertyanimator and then scroll the list...the state of the animation does not persist. Apr 26 23:19:17 can someone make a nice layout for me? Apr 26 23:19:32 it seems the listview item is actually *redrawing* from a cached state upon each scroll. which makes sense. Apr 26 23:19:56 but chet haas video seems to indicate that if I use viewpropertyanimator, the state should persist. Apr 26 23:20:24 etcetera: i think we should get chet in here right now and settle this once and for all ! Apr 26 23:20:53 Is it possible to give a Fragment a separate theme from it's bound Activity? Apr 26 23:21:13 http://graphics-geek.blogspot.com/2013/03/devbytes-listview-deletion.html Apr 26 23:21:16 g00s: ^ Apr 26 23:22:39 http://graphics-geek.blogspot.com/2013/02/devbytes-listview-animations.html Apr 26 23:22:50 etcetera: i noticed he had a blog entry about Crystal. i thought Cockburn stopped writing about that years ago Apr 26 23:23:03 i think i have his Crystal Clear book somewhere Apr 26 23:24:42 dunno, maybe a gfx expert can help, i suck at the ui stuff Apr 26 23:25:52 this seems like really obvious guidance that's missing from documentation. Apr 26 23:26:11 g00s, =D I fixed that graph library Apr 26 23:26:37 hesperaux: \o/ Apr 26 23:28:19 yah! Apr 26 23:28:27 i'm ready to do other things! Apr 26 23:28:56 is there a good bit of reading or a video about saving data? i'm thinking of doing a binary format, but I'd like to know best practices if possible. Apr 26 23:29:33 anyone on viewpropertyanimator inside of listview? Apr 26 23:29:38 hesperaux: your situation is kinda tricky Apr 26 23:30:00 if i remember, you are getting lots of sample data quickly, you want to graph that, and you are saving it to disk Apr 26 23:30:27 i wish i could help - my requirements were more modest, i just put the data in sqlite Apr 26 23:30:45 which isn't really good for pulling time series data out for graphing Apr 26 23:30:51 esp if you want to resample, etc Apr 26 23:31:01 well, i noticed the graphing is kind of delayed already, which isn't the end of the world. I'm sure it has to do with using the MessageQueue for getting the data in the UI..... =\ Apr 26 23:31:12 but i have the benefit of being able to save the data before i process the UI message Apr 26 23:31:33 it's stored in a FIFO right now, in a round robin fashion (kick out the oldest in the sample average window, accept the new) Apr 26 23:31:56 when i throw out the old packet from that FIFO, i thoguht I would store it then, before I send the UI the message. Apr 26 23:32:36 the UI updates every 100 samples (configurable). but I'd like to save every packet I receive into a file, which will be like...10Ksps Apr 26 23:33:15 didn't I recommend java rrd to you? Apr 26 23:33:17 resampling is a no go - i'm treating this packet stream like a UDP stream Apr 26 23:33:17 or was that someone else Apr 26 23:33:20 pfn, yes you did Apr 26 23:33:28 it didn't work? Apr 26 23:33:29 pitty Apr 26 23:33:33 rrd is a set of perl scripts? Apr 26 23:33:37 i looked into it, but it was more complicated than I had time for right now Apr 26 23:33:47 round robin database, g00s Apr 26 23:33:49 anyhow, it just saves stuff in some db like mysql Apr 26 23:34:30 * pfn used rrdtool quite extensively, if java rrd works similarly (but with a better api) it should suit this use-case well Apr 26 23:34:48 g00s, a little different, since it's optimized for time series data Apr 26 23:36:16 pfn, i think the reason i didn't use it was because i had to port it to android. While it has already been ported, they are charging money for it. And I have to finish up this project to a certain degree by the beginning of May. Apr 26 23:36:26 next year i'm going to develop an ECG Apr 26 23:36:32 at that time, I may look into using RRD4J Apr 26 23:36:55 oh, it's not free? Apr 26 23:37:00 the java lib is Apr 26 23:37:03 not the android port Apr 26 23:37:18 does it have a native component or something? Apr 26 23:37:26 i'm not sure Apr 26 23:37:30 if it's pure java, it shouldn't be an issue to port it Apr 26 23:37:42 the porter people said they made lots of changes to optimize it for android (shrugs) Apr 26 23:37:43 I'd imagine it uses a bunch of stuff like imageio and whatnot that's not available on android, but it's also irrelevant Apr 26 23:37:45 just chop that stuff out Apr 26 23:37:58 it still has to have a db backend Apr 26 23:38:09 g00s, it makes its own Apr 26 23:38:12 you'll wind up rewriting the UI stuff as well as sqlite Apr 26 23:38:24 its' a standard format (RRD) - a file based database format Apr 26 23:38:29 why would it have a UI? Apr 26 23:38:31 db backend for rrd is its own file-based format Apr 26 23:38:39 rrdtool and implementations thereof generate graphics Apr 26 23:38:45 ah Apr 26 23:38:46 rrd4j says MondoDB or oracle db … Apr 26 23:38:58 (note: I don't actually know anything about rrd or variants :) Apr 26 23:39:01 so it can use its own instead ? Apr 26 23:39:07 Supported Databases Apr 26 23:39:07 Next to memory and file storage, RRD4J supports the following databases (using byte array storage): Apr 26 23:39:11 read a little more carefully Apr 26 23:39:25 it does in-memory and file without any external dependencies Apr 26 23:39:36 you can run it atop mongo and oracle Apr 26 23:39:38 ah, ok Apr 26 23:39:40 my bad Apr 26 23:39:44 anyway, time to go Apr 26 23:39:51 see you pfn Apr 26 23:40:22 hesperaux: is this what you found ? http://www.artfulbits.com/products/android/rrd-for-android.aspx Apr 26 23:40:33 yep that's the ticket Apr 26 23:41:45 aiCharts - Android Chart Engine. Apr 26 23:42:04 hmm Apr 26 23:42:16 very pretty charts Apr 26 23:42:24 but i think i can modify graphview to look that nice Apr 26 23:42:27 if i really wanted to Apr 26 23:45:22 g00s: I've used aiCharts Apr 26 23:45:30 they're okay Apr 26 23:45:48 I don't really know what I want out of a charting engine (as far as API goes) but they were pretty straightforward Apr 26 23:46:14 evanc: what did you wind up settling on? did you use it for your project ? Apr 26 23:56:00 I'm not sure how I just encountered this problem now, but objects you pass as data via the intent are copies, aren't they Apr 26 23:56:08 i.e. parcelables, serializables, Apr 26 23:57:32 g00s: aiCharts. They hooked me up with a license because it's OSS Apr 26 23:57:44 tdignan: yes Apr 26 23:57:47 evanc: nice Apr 27 00:03:05 is aiCharts the one from MIT Apr 27 00:03:22 evanc: so the best way to pass a value backward is probably with startActivityForResult, eh Apr 27 00:03:34 then I have to manage a list in the parent activity Apr 27 00:03:36 oh well Apr 27 00:03:38 code is codee Apr 27 00:04:47 oh, no, simile is what I'm thinking of Apr 27 00:05:09 http://simile-widgets.org/ Apr 27 00:05:20 kroot: well, metaphor is like the one you're thinking of Apr 27 00:11:06 hesperaux: i think it was pretty easy for artfulbits to port rrd4j to android, since they had the graphing component :P Apr 27 00:11:22 yeah, could be Apr 27 00:11:26 but yeah, you should be able to use your graph lib instead Apr 27 00:12:45 how do I make a dialogfragment move up when the soft keyboard view is brought up? Apr 27 00:12:51 do I have to manage this state/animation myself? Apr 27 00:13:07 hesperaux: you need something like this https://code.google.com/p/timeseriesdb/ Apr 27 00:13:14 but for android Apr 27 00:13:25 and then slap jjoe64 on top of it Apr 27 00:14:38 ahhhh, .NET Apr 27 00:14:40 * hesperaux runs Apr 27 00:16:30 so what's this i hear about key lime pie being delayed Apr 27 00:17:12 anyone? Apr 27 00:25:34 hesperaux: also seems like Perst (again, not free) has an android db which indexes for time series data Apr 27 00:25:56 i'm looking at rrd4j right now Apr 27 00:39:12 hesperaux: let me know how it works Apr 27 00:39:22 i will Apr 27 00:39:45 i just created a source project for it and obviously the berkley and oracle db files are showing errors. NIO is also Apr 27 00:40:03 and the XML parts Apr 27 00:40:13 i'm gonna try including just the jars in my project and see what happens Apr 27 00:43:27 i thought rrd4j didn't need jni Apr 27 00:43:47 it says that on the page Apr 27 00:43:54 but there is RrdNioBackend.java in the source Apr 27 00:44:32 maybe it just allows for the use of optimized IO that way? Apr 27 00:45:22 maybe Apr 27 00:45:34 for the berkeley Apr 27 00:45:43 ah, perhaps Apr 27 01:19:31 well, i really should have known this before, but this format is not really of interest to me Apr 27 01:20:03 the consolidated archives RRD creates are also round robin Apr 27 01:20:14 therefore, it spans an exact, constant amount of time, no less Apr 27 01:20:46 i.e. i can't save an indeterminate length of data with RRD Apr 27 01:21:03 it would be useful, but not at this stage Apr 27 01:21:12 hello guys :) Apr 27 01:21:41 is it possible to increase the show time of toast ? Apr 27 01:22:15 override method? Apr 27 01:22:51 Daejeo, there is the .setDuration() method for this Apr 27 01:23:12 it's an integer - presumable in milliseconds Apr 27 01:23:31 so... Toast.maketext().setDuration(2000).show(); Apr 27 01:23:53 hesperaux: cool :)thank you Apr 27 01:23:58 np Apr 27 01:26:04 Is AVD in Eclipse a lot slower than in Windows? Apr 27 01:27:03 I mean is it slower on linux than it is on Windows Apr 27 01:27:39 Hausas: it depends upon on your machine config as well Apr 27 01:28:09 i am running i5 16gb windows 7 - works great Apr 27 01:28:25 16GB RAM* Apr 27 01:29:47 Hi, I have a service in my app that runs in background. I don't know what happens exactly because in the emulator works perfect, so I can not debug. Sometimes, once the user close the app, or system close the app the service is created again, so there are two service running. How its possible? the service natural is a singleton, so.. why an other service is created once the user opens again the app? Apr 27 01:30:06 I am running it on 1.90 GHz AMD Athlon X2 2gb RAM, on linux and it takes ages to load AVD Apr 27 01:31:03 Hausas: afaik, there should be no real difference between windows/linux Apr 27 01:33:10 anyone know what could happen? Apr 27 01:34:01 makin, i don't think the service is a singleton Apr 27 01:34:19 but the system will stop the service if absolutely necessary, and then restart it when resources are available Apr 27 01:34:34 if you don't handle that event in your code it will probably duplicate the service as you are seeing Apr 27 01:41:14 hesperaux, I think that is a singleton, btw, In what situation the app forces to close a service? Apr 27 01:42:02 the framework closes it, not the app, unless your app is calling cancel() on it. the framework closes it if system resources are very low Apr 27 01:42:35 if your user starts your service, then goes and plays angry birds or something for an hour, it will likely be killed and restarted when they exit angrybirds Apr 27 01:43:08 the framework will attempt to do this cleanly though, by implementing the service's onSystemMemoryLow() or something like that Apr 27 01:43:30 you need to override those methods if you haven't already, and save your service's state for later when it restarts the service Apr 27 01:44:24 http://developer.android.com/reference/android/app/Service.html#ProcessLifecycle Apr 27 01:46:13 hesperaux, I will read it again Apr 27 01:51:50 Yay Apr 27 01:51:59 just created my first Android program Apr 27 01:52:06 And it runs! Apr 27 01:52:22 I should install it in my Galaxy S2 Apr 27 01:52:36 no dont Apr 27 01:52:36 Hausas, you take the red pill, you stay in wonderland and find out just how deep the rabbit hole goes. Apr 27 01:53:41 deemed_, why? Apr 27 01:53:59 hesperaux, I will definitely stay here even without taking the pill Apr 27 01:54:25 Hausas: what is the app about Apr 27 01:55:39 Calculates the number of minutes between two given times Apr 27 01:56:39 what am I missing here? I want to write a byte stream to a file...the data format is not character, it's byte. OutputStream doesn't seem to have anything to do with files, though; how do I write it to disk? Apr 27 01:58:13 nvm, found it. FileOutputStream does what i want Apr 27 01:59:21 Yay, it works on my android \o/ Apr 27 01:59:32 I'm so excited! Apr 27 02:02:59 I'm getting a failure to start emulator Apr 27 02:03:13 but it's looking for adt-bundle-linux-x86_64-20130219/sdk//tools/emulator Apr 27 02:03:17 for some reason Apr 27 02:04:20 When packing values into an intent, when does the actual serialization occur Apr 27 02:04:25 is it when I call putExtra, or at a later time Apr 27 02:04:36 because I'd like to set the reference and forget it, then add the values later (for setResult()) Apr 27 02:10:12 I want to import Existing project into workspace, but there's no such button. Apr 27 02:10:32 There's only "existing android code into workspace" Apr 27 02:10:45 Oops Apr 27 02:10:47 nevermind Apr 27 02:11:16 So I have a very large XML file that I am trying to parse and store into a database. The XML file isn't likely to change very often so my question is what is the best to way to package it into an application? Parse it and store into a database right now and add it to my project? Apr 27 02:39:19 Doesn't Java support overloading? Apr 27 02:39:38 overriding, yes Apr 27 02:39:54 overloading is a different thing, hesperaux Apr 27 02:40:18 you mean having multiple methods of the same name with different arguments? Apr 27 02:40:35 yeah Apr 27 02:40:43 yes, it supports it Apr 27 02:40:43 just without arguments Apr 27 02:41:07 I just want two methods with the same name to return different types of value Apr 27 02:41:15 s/value/values Apr 27 02:41:22 they'd have to have different prototypes Apr 27 02:41:33 otherwise they are not unique and it will not contextually guess which one you want Apr 27 02:42:06 you could encapsulate the ambiguous return type into a class and return an object instead, but that's messy Apr 27 02:45:33 That's not messy, but it's not what I want Apr 27 02:45:41 I'll just use different names **** ENDING LOGGING AT Sat Apr 27 02:59:58 2013