**** BEGIN LOGGING AT Sat Jan 23 02:59:58 2016 Jan 23 03:01:39 faces need a good punchin round these parts Jan 23 03:54:27 bring it on b4tch Jan 23 03:54:40 :D Jan 23 05:23:00 hi, im trying to compile aosp for my sony z3 following these instructions http://developer.sonymobile.com/knowledge-base/open-source/open-devices/aosp-build-instructions/how-to-build-aosp-marshmallow-for-unlocked-xperia-devices/ Jan 23 05:23:15 but while trying to fetch the sources i get this error: Jan 23 05:23:16 Fetching projects: 99% (485/489) Fetching project platform/external/libcxxabi Jan 23 05:23:19 fatal: Invalid refspec '+refs/heads/aosp/LA.BF64.1.2.2_rb4.7 :refs/remotes/sony/aosp/LA.BF64.1.2.2_rb4.7 ' Jan 23 05:23:22 error: Cannot fetch camera Jan 23 05:23:47 this is after ive installed the vendor stuff Jan 23 05:24:17 maybe root is better? tend to deal with roms than here which is app deb Jan 23 05:24:19 dev Jan 23 05:24:27 root? Jan 23 05:24:33 #android-root? Jan 23 05:24:34 android-root yeah Jan 23 05:24:48 ahh thanks, i asked this in #android and got sent here... Jan 23 05:24:55 ill give it a shot Jan 23 05:24:55 sorry making you move againb (saw you on #android) Jan 23 05:25:01 hehe its okay! Jan 23 05:30:22 do the support libs have anything for a material DatePicker for pre-lollipop? Jan 23 05:31:34 or do I just have to use something like this: https://github.com/wdullaer/MaterialDateTimePicker Jan 23 05:53:51 and backdoors prevent secure financial transaction systems Jan 23 05:54:27 ah, tabfail, but mostly on topic Jan 23 06:12:00 hi Jan 23 06:12:19 how do I debug when I used by android phone as an emulator Jan 23 06:13:30 I am following a youtube video tutorial and for some reason the app just crashes giving a message "Unfortunately the app has stopped." Jan 23 06:15:42 one of the things I suspected is the use of onActivity Jan 23 06:15:43 http://pastebin.com/dT5khSqY Jan 23 06:15:57 in line 29 in the android studio it says it is deprecated Jan 23 06:16:04 but I do not know what else to do Jan 23 06:16:09 that is why I am asking here Jan 23 06:20:01 easyOnMe http://imgur.com/jacoj Jan 23 06:20:24 geez annoying people pming random people for help Jan 23 06:22:07 XXAnnoying :) Jan 23 06:22:22 seem extra extra annoying Jan 23 06:22:26 *see, Jan 23 06:23:47 I was only asking for help Jan 23 06:23:57 if you guys do not want to help it is ok Jan 23 06:24:19 just chill man you do not have to be annoyed you already ignored Jan 23 06:25:11 easyOnMe read the topic Jan 23 06:25:25 i am chilled ;) Jan 23 06:34:42 heh - like having a "kick me" sign :p Jan 23 06:35:12 eh "don't be such a pussy :)" Jan 23 06:36:39 g00s: ok what about this question I think this one might belong here Jan 23 06:37:14 what if I want to change a file like activity_main.xml and change it with another file say activity_new.xml Jan 23 06:37:43 is it enough just to change the name in the MainActivity.java class Jan 23 06:38:12 elevator door opened and you followed me out ;) Jan 23 06:38:12 easyOnMe you have to post the stack trace Jan 23 06:38:27 ok give me a minute Jan 23 06:41:20 g00s: http://pastebin.com/MAgFu4n4 Jan 23 06:42:37 g00s: MainActivity.java Jan 23 06:42:39 http://pastebin.com/qcZhRHti Jan 23 06:43:59 easyOnMe that can't be right , the stack trace has the error clearly : NPE on toolbar.getTitle() Jan 23 06:44:08 but there is no line in that code Jan 23 06:45:01 oh, unless this is failing Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); Jan 23 06:45:11 so make sure your XML has that ID for the toolbar Jan 23 06:46:27 g00s: yeah you are right Jan 23 06:46:59 that is why I asked earlier with I change the MainActivity to call another xml file Jan 23 06:47:06 how can I do it... Jan 23 06:48:02 because what happened was when I used the original file: activity_main.xml the app works which contains the toolbar id but when I try to load the new file: activity_new.xml I got the error Jan 23 06:48:14 any suggestions how I can proceed Jan 23 06:50:15 g00s: I got man Jan 23 06:50:17 thanks for the lead Jan 23 06:50:25 yw Jan 23 06:52:14 g00s: man do you know of other freenode channel where I can chat with other beginners like me Jan 23 06:52:33 easyOnMe for android ? Jan 23 06:52:44 seems this is the mainstay of experience android developers Jan 23 06:52:59 g00s: been there man and so the told me bring my questions here Jan 23 06:53:23 but seems this channel only supports developers with advance levels of experience Jan 23 06:53:31 this channel is for all android dev questions, beginner to advanced (more beginner though) Jan 23 06:53:48 tried msg alis list this channel is the only with the most active users Jan 23 06:54:02 g00s: oh cool then Jan 23 06:55:03 * capella Newcomers may experience some hazing and be asked to locate a left-handed wrench Jan 23 06:57:15 g00s: I have been using youtube video tutorials to kickstart my learning Jan 23 06:57:40 but do you know of a video tutorial that teaches building up from start to finish Jan 23 06:58:03 the ones I got over youtube teaches lessons in distinct and isolated lessons Jan 23 06:59:06 easyOnMe i'd start with the official google udacity course for android Jan 23 06:59:10 its free Jan 23 06:59:19 g00s: ok cool man Jan 23 06:59:22 thanks for that Jan 23 06:59:27 way to go then Jan 23 07:01:00 its pretty long ;) Jan 23 07:01:54 I found my issue with starting a service… if you put the service tag outside the the application tag, it fails silently. it has to be be on the same level as teh activity to be called from it.. Jan 23 07:02:35 no crash, no indication of a problem at all, just no call. Jan 23 07:02:37 regan i think the manifest schema has that clearly :D Jan 23 07:02:42 g00s: do you still have the link Jan 23 07:02:57 I just log in now in udacity they are now charging $199 Jan 23 07:03:16 https://www.udacity.com/google Jan 23 07:03:37 'Android Dev for Beginners' Jan 23 07:04:02 you can still access course materials for free Jan 23 07:05:42 I have an issue with laying out an activity… I am sure it is trivial. Jan 23 07:10:33 I have a relative layout and an include layout… the include layout is just a fragment… I have 4 buttons I want to have below the layout along the bottom, which is fine but I want the included fragment to go no further than the relative layout... Jan 23 07:10:50 https://gist.github.com/pymblesoftware/8674f60f9e5456f537e8 Jan 23 07:14:30 I have included fragment file, and a relative layout along the bottom, I want the included fragment to go no further down than the relative layout... Jan 23 07:15:29 I want something like android:layout_height=“wrap_content” but minus the the bit a the bottom… ideas anyone...? Jan 23 08:19:47 I solved my own issue with margin_below attribute… seems to work. Jan 23 08:26:20 Alright, so with AsyncTasks, how do you pass the result back to the UI thread to make it usable? Jan 23 08:27:49 onPostExecute runs on UI thread. Jan 23 08:28:58 Yeah, I know, but I need to use the Bitmap that I retrieved from my AsyncTask as the Background for a Layout Jan 23 08:29:17 But I think I may have found it, using AsyncTask.get() Jan 23 08:29:52 Not sure what the issue is. Jan 23 08:30:07 onPostExecute gets a parameter which is whatever you return from the doInBackground Jan 23 08:31:25 Alright, but how would I use that variable in the UI thread,I can't seem to figure out where I actually recieve the Variable from onPostExecute within the UI thread Jan 23 08:49:03 I moved the AsyncTask to be a private subclass, that seemed to fix it Jan 23 08:49:26 You really should use a library like picasso to load bitmaps Jan 23 08:49:32 I was having an issue moving it between the two classes as while PostExecute is completed in the UI thread, I had no access to my UI elements Jan 23 08:49:56 I do, but I couldn't seem to figure out how to get it to work for a Layout's background Jan 23 08:50:15 perhaps that's my inexperience, but I only got Glide to work on ImageViews Jan 23 08:50:32 It is, load into a Target and set the background yourself Jan 23 08:52:23 And how would I set a custom target (that was the part I had trouble with - hence why I went to AsyncTask) Jan 23 08:52:57 Target is a class Jan 23 08:53:05 Pass it to #into instead of an ImageView Jan 23 09:01:36 kudos fellas Jan 23 09:01:40 till next time Jan 23 09:01:45 bye Jan 23 09:14:22 ACTION  Jan 23 09:14:34 fk sorry Jan 23 09:31:01 oi Jan 23 12:11:44 Has anyone try out Manual Testing for Sauce lab for android test on cloud? Jan 23 12:20:24 i thought they run on real device. Jan 23 12:30:58 Hey, I have created a grid of buttons with a GridLayout, but there is a space between the buttons, how would I remove this? Jan 23 12:34:58 Can anyone explain what this logcat message means? 01-21 13:19:34.950 1019-1348/? D/AudioFlinger: mixer(0xf4500000) throttle end: throttle time(14) Jan 23 13:34:18 hey guys! I'm working on a game that uses a GLSurfaceView and I'd like to implement some kind of text input. I'd like to show the soft keyboard and then have a 1-line text edit box right above the keyboard Jan 23 13:34:36 pfn : you remember that FAB , dialogplus problem i asked you yesterday Jan 23 13:35:06 what's the right way to go about it? I managed to get it to work positioning the textbox at the very top, but if it's at the bottom (gravity bottom), when the keyboard pops up, the whole screen including the game gets resized / panned Jan 23 13:37:38 https://lab.getbase.com/introduction-to-coordinator-layout-on-android/ , this blog teach you to implement custom method layoutDependsOn , i want to know how instead of snackbarlayout instanceof , i can have https://github.com/orhanobut/dialogplus Jan 23 13:51:55 How do you make a button fill it's alloted space? I have removed the margins, and padding, but the buttons still do not fill their 100dp x 100dp space Jan 23 13:53:31 according to https://lab.getbase.com/introduction-to-coordinator-layout-on-android/ , in method layoutdependson i have to add instance of widget , but when i want to use this library https://github.com/orhanobut/dialogplus , what should be my widget? Jan 23 14:51:26 hello Jan 23 14:52:08 I want a service in AndroidManifest be disabled based on a boolean defined in xml Jan 23 14:52:34 How could I negate android:enabled="@bool/traditional_auth" ? Jan 23 14:53:36 can anyone tell me , http://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.Behavior.html#layoutDependsOn%28android.support.design.widget.CoordinatorLayout,%20V,%20android.view.View%29 , Jan 23 14:53:52 i want to use this https://github.com/orhanobut/dialogplus , Jan 23 14:54:14 i want to layoutdependson to this library , Jan 23 15:24:02 anyone here to help a newb Jan 23 15:55:25 Guys I have Android Studio complaining about my activity not using Theme.AppCompat or a descendant as the theme when I'm instantiating CoordinatorLayout. But I'm pretty sure I'm using a descendant of that theme Jan 23 15:57:02 Is there something else that could make this error to happen? I've checked that I'm compiling appcompat-v7:23.1.1 and design from support libraries Jan 23 15:58:34 Adyrhan "pretty sure"? its easy to be totally sure :) Jan 23 15:59:01 did you apply your theme to the or in manifest? Jan 23 15:59:30 to the activity only Jan 23 16:03:10 g00s, i just tried to add it to the application too, with no luck :/ Jan 23 16:03:42 Adyrhan look at the cheese square app on github, make sure you're doing what they are doing Jan 23 16:07:43 g00s, I'll take a look at it Jan 23 16:07:47 thanks Jan 23 16:08:09 Hi Jan 23 16:09:48 I've had a few weird dreams lately, but I have this feeling that there was an announcement from some company (Microsoft!?) about a new Android development ... IDE ... or something, that was supposed to be very easy to get started with - and had faster testing than with the emulator[s] currently used everywhere. Anyone know if this actually happened and I've Jan 23 16:09:48 just lost the link, or so I assume it was a dream after all? Jan 23 16:11:09 g00s, sorry i just joined, the cheese square app? you referring to this: https://github.com/chrisbanes/cheesesquare ? Jan 23 16:11:44 The memory was triggered because I found myself downloading Android Studio and finding the samples don't work out of the box, so I'm on StackOverflow and hacking XML and ... I'll be yak shaving again before I know it, and I thought 'surely this should be better by now...' Jan 23 16:12:47 You can buy xamarin and use visual studio? :) Xamarin and Microsoft has some sort of partnership Jan 23 16:13:37 Ha, been down that route. I love C# (used to be my job to write it) but Xamarin's far too buggy. Jan 23 16:13:51 Actually my google fu just returned and I've found it's actually Android Studio 2.0 I'm after Jan 23 16:14:03 so I was close in downloading Android Studio - it's just that I got 1.5 Jan 23 16:14:44 I actually think xamarin is pretty good, but each to his own Jan 23 16:15:31 liefer, yup I believe he refers to that project. It's a demo for the android design library after all. Jan 23 16:15:55 Adyrhan, thanks. I just havent seen it before :S Embarassing.... :P Jan 23 16:16:52 I'd discuss it, but I'm sure it's been done to death on this channel and would just invite argument, so suffice to say my issues are pretty standard - and every way you go about developing has its own issues - I'm just keen to get a bit closer to 'native' at the moment, hoping to avoid as many side issues (and as much yak shaving) Jan 23 16:17:59 rikkus 1.5.1 is best for stability now Jan 23 16:18:29 g00s: thanks Jan 23 16:19:34 Last time I attempted this, I was excited that Java 8 was going to make me feel comfortable (coming from C#) but then found it wasn't possible to use it (yet). I'm now coming back and hoping I can use kotlin (or that Java 8 is supported now) Jan 23 16:19:50 you can use kotlin Jan 23 16:19:52 rikkus, i think it is worthwhile to bring the discussion up once in a while, things are changing rapidly. But yeah, i agree, there are definitely gotcha's and quirks with xamarin (but then again, show me an IDE/Build chain where that isnt true) Jan 23 16:20:02 Regardless, i'd argue that it definitely beats having to develop and maintain 2, 3 or 4 identical but completely seperate apps Jan 23 16:21:22 If you are only targeting android, of course, the native route is much superior to xamarin (unless you have some other reason for chosing .NET, like existing "legacy" code) Jan 23 16:22:33 I bet! If I decide to go cross-platform then I'll probably have to go back to Xamarin, but I'm only looking to do a few pet projects I've been planning. Jan 23 16:28:43 i want to use this library https://github.com/orhanobut/dialogplus , i am trying to add behavior , the behavior will help me to achieve something like same as snackbar , i am reading this blog , https://lab.getbase.com/introduction-to-coordinator-layout-on-android/, they have a method layoutdependson() , i dont know what should i put in place of Jan 23 16:28:44 snackbarlayout , Jan 23 16:28:58 The major drawback of Xamarin is the license pricing, especially true from a Hobbyist like me. Jan 23 16:29:32 $25/month is okay with me Jan 23 16:29:46 another 25$ if you want iOS Jan 23 16:29:55 g00s, Ok I figured out. It was that when I created the activity, the IDE didn't recognize the app theme and selected another for the preview that wasn't the one I specified in the manifest Jan 23 16:30:07 Elezium: I didn't notice that. That kinda kills it. Jan 23 16:30:19 yup, it does. It's really per platform. Jan 23 16:30:50 I've been waiting for Microsoft to buy them and make it available with VS. It's not happened. Jan 23 16:30:55 anyone , here can help me ? Jan 23 16:30:57 Also, you're "stuck" with Xamarin Studio. Jan 23 16:31:11 I thought you could use it with VS? Jan 23 16:31:12 Had the same dream, rikkus. Jan 23 16:31:42 nope, Indie license doesn't work with VS. That being said, I only try with a XF project Jan 23 16:31:59 it detect the Android project as XF, and bitch that it needs a business license. Jan 23 16:32:32 Ah yes Jan 23 16:33:27 Well Microsoft seem to be getting less sure that Windows Phone is going to 'beat' Android at all - and are just making their apps available for Android. So maybe they'll make it easier to develop for Android (without mucho $$) as time goes on. Jan 23 16:34:52 yeah.. I was a WP user (switch during Christmas) and I've decided to learn Android dev. MS position regarding WP is so at lost Jan 23 16:57:30 Elizium, they changed the licensing recently i believe. Much cheaper to get started with xamarin these days than it used to be Jan 23 17:01:45 can anyone recommend an audio player for the console? Jan 23 17:15:04 liefer, Hum.. I did during the holidays period, and yes, the Indie is 25$ / platform. You have the starter which is free, but is limited in term of the size of your apps. You add a small library and you already bust it :/ Jan 23 17:16:22 in the end, since I'm moslty a learner and I do it for my own pleasure, I end up going native, I'll learn more about android and a new language at the same time. Jan 23 17:20:29 I thought they removed that limit? Jan 23 17:20:35 and instead added the VS support as "premium" Jan 23 17:20:40 which is much more reasonable imho Jan 23 17:21:36 hum.. it was not the case when I last check... I'm in doubt now Jan 23 17:22:57 -> Apps must meet size restrictions(128k of compiled C# or F# code), include only managed code (not Objective-C/Swift, Java, or C/C++ libraries), and use Xamarin.iOS/Xamarin.Android, not Xamarin.Forms. Jan 23 17:23:36 sad Jan 23 17:25:12 where do you see this? Its not on the pricing page Jan 23 17:34:33 "WhatsApp to begin sharing your data with Facebook" bwaaahahahaha Jan 23 17:35:25 liefer, https://xamarin.com/starter Jan 23 17:36:21 I did take a look a NativeScript as a alternative, but me and JS .... Jan 23 17:36:35 so went the native way. And happy so far. Jan 23 17:36:58 oh but thats the free starter version Jan 23 17:37:08 the $25/month one doesnt have that limitation Jan 23 17:37:18 i think Jan 23 17:37:32 almost certain Jan 23 17:38:32 no, it does not. Jan 23 17:38:36 When is RecyclerView.Adapter.getItemCount called? Does it have to return correct values if I am using notifyItemInserted()? Jan 23 17:38:45 there's not limitation to Indie, except the use of VS. Jan 23 18:05:13 dimitrovskif, yes Jan 23 18:05:27 dimitrovskif, it. must return the correct value. before notify is called Jan 23 18:09:12 pfn: You mean after? Why would it call it before actually notifying a data change lol Jan 23 18:09:29 before Jan 23 18:10:14 pfn: If I notify the recyclerview that a new view is added, it checks if getItemCount() == oldCount + 1 Jan 23 18:10:52 or else it throws some exception Jan 23 18:13:17 that's why you must update item count before Jan 23 18:14:11 Everything happens in the layout phase.. As long as getItemCount is correct after you're done notifying (inserting, removing, ..), and before onLayout, you're good Jan 23 18:14:36 Got it. Jan 23 18:15:07 not sure about that, for rv, I've run into issues if you notify before data is updated, on UI thread Jan 23 18:17:27 Is there some simple way to persist a set of a few integers (about 100) somwehere across re-launches of my app? Or will I have to use the sqlite database for this? Jan 23 18:17:36 (I am on API10) Jan 23 18:19:33 oo_miguel: You could write to a flat file. Though I'm not sure whether that qualifies as a "simple way". Jan 23 18:19:59 What do the 100 integers represent? Jan 23 18:20:30 TacticalJoke: hmm. I think its as simple as using the database ;) Jan 23 18:21:02 TacticalJoke: they hold ids of some "news" categories the user blacklisted Jan 23 18:21:43 i cooked up this little routine to find a parent of some fragment which implements an interface. Any thoughts? bad assumptions? http://pastebin.com/f25BxE61 Jan 23 18:22:08 it just keeps traveling up the chain until it finds something, or throws an exception Jan 23 18:23:55 (seems to work ok, so far ;) Jan 23 18:27:26 oo_miguel: A database might be the best solution. Probably scales better than a simple file (e.g., you might want to store extra user stuff later). Jan 23 18:34:08 TacticalJoke: yeah I agree, Ill go for the database, thanks Jan 23 18:36:16 oo_miguel sqlite is great replacement for fopen() :D Jan 23 18:38:43 oo_miguel if you were on api 11, you could use SharedPreferences stringSet() i guess, probably not worth it Jan 23 18:39:07 oo_miguel why api 10 ? :( Jan 23 18:42:07 g00s: yeah I know its old and only 2-3% people use it, but I have one api10 device myself and want it to run there. Jan 23 18:42:45 But I decided to use the sqlite database anyway so Im fine on api10 Jan 23 18:49:05 Anyone here been using the Palette? Have you had to choose between a VibrantSwatch or a DarkVibrantSwatch? Jan 23 19:46:48 my suggestion is to throw away the api 10 phone Jan 23 20:09:43 hi could someone give me some help with animation the height of an image button ? Jan 23 20:12:30 hi there, I'm trying upload a image took from an app online, in the android emulator I take the picture in portrait, it's shown in landscape without exif rotation info Jan 23 20:12:51 is that normal and will work on android phones? or do I need to add something to the code to add the exif orientation? Jan 23 20:14:06 this is my code, all it does is scale the imagebutton, http://pastebin.com/tt3K1TBU, all I’m looking is that the height of the button at the top increases Jan 23 20:14:10 any ideas? Jan 23 20:15:38 alex88, most phones have image sensors installed landscape. Jan 23 20:15:44 and yes you need to add code to handle exif rotation Jan 23 20:15:58 And no, you can't write an app that works with camera without physical deviecs. Jan 23 20:16:12 how can I apply a different theme to a fragment? Jan 23 20:16:25 Mavrik: "handle exif rotation" you mean code that adds the exif rotation to the image, or later when I've to process the image? Jan 23 20:17:51 EXIF tag will be added automatically if you set rotation properly on the camera API. Jan 23 20:17:57 But you'll have to handle it when loading th eimage. Jan 23 20:18:32 I'm ok with it, now I'm just taking the picture with the "MediaStore.ACTION_IMAGE_CAPTURE" intent, is that enough since I'm not using directly the camera api Jan 23 20:18:35 ? Jan 23 20:18:52 yp Jan 23 20:20:10 ok so I'm gonna try with a real device, thanks Jan 23 20:22:27 easiest way to test is with random images you have already Jan 23 20:23:43 so no matter what way i implement is expands the top & bottom of the imagebutton, i just want the height of the imagebutton increased Jan 23 20:23:44 rather than trying to use a camera in the emulator Jan 23 20:24:01 set the scale type on your image Jan 23 20:25:07 sorry pfn are you talking to me or alex88? Jan 23 20:25:14 you Jan 23 20:26:14 :) oo lol, sorry i’m a bit of a newbie, how do i set the scale type Jan 23 20:28:00 Mavrik: well I've just tried with a nexus 6p, landscape and portrait, no orientation exif, images are already rotated Jan 23 20:28:11 Yes. Jan 23 20:28:11 I am currently encountering an issue where my buttons will not resize, even though I have changed the width and height, could this be do to the GridLayout they are in? Jan 23 20:28:11 but I think that on other phones it's not always the same Jan 23 20:28:15 Yes. Jan 23 20:28:21 alex88, hence why you need actual hardware. Jan 23 20:28:41 If you'll make assumptions about a single phone when it comes a camera you're in for a bad thime. Jan 23 20:28:52 Camera behaviour does differ between devices. Jan 23 20:29:10 yup, well not a problem, I think there are plenty of images out there with exif orientation to use as test Jan 23 20:29:13 thanks anyway Jan 23 20:30:20 Has anyone ever encountered an issue where the changes on height and width within the code do not take effect? Jan 23 20:31:31 Yes. Jan 23 20:31:41 How did you change the height? Jan 23 20:31:52 And what's the parent container? Jan 23 20:32:19 so alex88 this is my code, http://pastebin.com/tt3K1TBU, but do I need to set the scale type for it to work correctly? Jan 23 20:32:37 krippykripkrip: ? :) Jan 23 20:33:01 yep Jan 23 20:33:28 I changed the height by doing button.setHeight(300) Jan 23 20:33:38 and the parent container is a GridLayout Jan 23 20:33:44 Huh? Jan 23 20:34:26 Ah, the TextView method. Jan 23 20:34:41 Artifex, well, GridLayout is almost certanly overriding your height. Jan 23 20:34:57 I'd honestly really recommend you to read how layouting works on Android. It's kinda essential :/ Jan 23 20:35:07 The parent decides how big the view is, not the view itself. Jan 23 20:35:12 Artifex were you the one wanting to do your GridLayout programatically ? Jan 23 20:35:26 its hard enough getting that thing to work via xml :D Jan 23 20:36:15 Yeah Jan 23 20:36:33 :/ Jan 23 20:36:46 so changing the size of the buttons programmatically isn't an option? Jan 23 20:36:58 That really throws a wrench in my plans Jan 23 20:37:06 Of course it's an option. Jan 23 20:37:18 Where did you pull that conclusion from? Jan 23 20:37:39 You've just hit a snag where GridLayout won't listen to your set view size. Jan 23 20:37:48 Again, read up on how layouting works :/ Jan 23 20:38:35 Sorry... My bad on jumping to conclusions, it's my first app, I'll go take a look Jan 23 20:39:07 Maybe GridLayout isn't even the best choice for your parent. Jan 23 20:39:17 But that's impossible to say with what you explained :/ Jan 23 20:39:26 then get rapid feedback editing the XML and watching the AS preview. once you have it working, then do it programmatically - but why ? Jan 23 20:39:33 so daft question, how do i set the scaletype? Jan 23 20:40:11 sorry, ignore that question lol Jan 23 20:40:40 I need to be able to change the buttons programmatically because I am laying out some buttons in a grid, the layout changes depending on a selection from the user Jan 23 20:41:05 So if I can set their sizes, and opacity programmatically, I can change it from a 3x3 grid, to a 4x5 grid Jan 23 20:41:20 GridLayout also does weird things when views have Visibilty.GONE Jan 23 20:41:36 its a pretty advanced control Jan 23 20:42:29 So I should avoid Visibility.GONE? Jan 23 20:42:48 g00s, it's also a bit funny/buggy :) Jan 23 20:43:07 Artifex not saying that, just that ... its "different" :D Jan 23 20:43:46 Artifex also see http://android-developers.blogspot.com/2011/11/new-layout-widgets-space-and-gridlayout.html Jan 23 20:43:50 But would it be better to use Visibility.INVISIBLE (I think that is the other option?) Jan 23 20:43:51 some stuff there not in the javadoc Jan 23 20:44:57 Alright, I'll give it a read Jan 23 20:46:41 Well, whilst I am reading this up, is there a solution you know of for changing the heights and widths? Jan 23 20:49:52 alex88, either I’m missing something but setting the scaletype isn’t make any difference Jan 23 20:50:13 krippykripkrip: why are you mentioning me? I've no clue on what you're talking about :) Jan 23 20:50:23 I probably more new to android than you Jan 23 20:50:26 *I'm Jan 23 20:50:38 o right, soz, i thought you mentioned earlier i should use scaletype, apologies Jan 23 20:52:44 so anyways, had someone got any advice for animating the height of a button Jan 23 20:53:49 pfn: setting the scaletype makes no difference? Jan 23 20:59:56 alright so I am trying to add gravity to the buttons so that they can be recognised as flexible, which (if I understand correctly) would allow the layout to be manipulated? Jan 23 21:01:31 artifex: you any experience with animation in regards to buttons? Jan 23 21:04:12 No, I don't Jan 23 21:04:31 This is my first experience with Android development, and Java as well Jan 23 21:04:39 no probs, am a bit stuck with something i thought would be quite simple, yeah me Jan 23 21:05:58 I has assumed changing the size of objects within a Grid would be simple, but apparently not, so I guess I have a similar type of issue :P Jan 23 21:06:25 lol, have you put your question on stackerflow Jan 23 21:07:03 krippykripkrip, how are you trying to animate the button? What container is it in? How does it look like? Will it stretch or do you need it to fully resize? Jan 23 21:07:15 No, partially because I am not quite sure how to word the question Jan 23 21:07:45 this is my code, http://pastebin.com/tt3K1TBU, Jan 23 21:08:24 at the minute its scaling the button, all i want is to incease the height of the top of the button Jan 23 21:13:19 huh. Jan 23 21:13:24 This will be terribly slow. Jan 23 21:13:40 But if you go this way, make sure your parent container listens to the set height in the layoutparams. Jan 23 21:13:59 Again, like I said 3 times or so today, the views are laid out by their container and the container sets sizes. Jan 23 21:14:12 It's dependant on container what it'll do with sizes and if it'll listen to them. Jan 23 21:14:21 what should be the right approach, i’m a newbie Jan 23 21:16:19 Can't really say without better explanation on what you're trying to accomplish and how it's a bit hard. Jan 23 21:16:58 have you got time for me to explain, no probs if your busy Jan 23 21:34:09 any ideas, all I am looking is that when I click an imagebutton, the height increases by say 10% and then drops in height to about 20%. Then if you click it again it goes back to its orginal height, no matter what i try the height of the bottom and top of button increases, i just want the top, any ideas, this is what i have so far http://pastebin.com/tt3K1TBU, Jan 23 21:49:19 alright so I converted my GridLayout to a configuration of nested LinearLayouts, however, just as with the Grid, changing the heights and widths doesnt seem to work, but visibility changes still take effext Jan 23 21:49:28 *effect Jan 23 21:51:50 i think everyone has left lol Jan 23 21:52:05 :/ Jan 23 21:52:18 It's 1 am and I really want to work this out... Jan 23 21:52:38 lol, sorry i’m a newbie aswell :( and stuck lol Jan 23 21:52:55 Yeah :/ Jan 23 21:53:35 Artifex are you still doing this programmatically ? Jan 23 22:01:19 I am not clear on how themes work… do themes specify a default style for views? for example, if I explicitly set a view to have style MyStyle, does it matter what theme I am using? Jan 23 22:04:34 g00s: yes, is it possible that my buttons being labelled as final is causing problems? Jan 23 22:06:33 can anyone give some advice on animations please? Jan 23 22:06:45 Artifex no, you probably messed up all thelayout params Jan 23 22:07:30 erisco the things in the style will override identical things in the theme Jan 23 22:07:49 not sure what happens when you specify style and theme on the same view though Jan 23 22:07:59 (who wins?) Jan 23 22:09:59 erisco some good reads http://blog.danlew.net/2014/11/19/styles-on-android/ Jan 23 22:10:16 erisco https://chris.banes.me/2014/11/12/theme-vs-style/ Jan 23 22:11:33 i think android:theme attribute would be more interesting, if the did something like android:theme="Them1, Theme2, Theme2" applied in order Jan 23 22:11:43 (for views) Jan 23 22:11:52 goos: do you have any experience with animations? Jan 23 22:12:53 krippykripkrip no, i'm pretty bad at them sorry Jan 23 22:13:27 no probs, i thought it would be something very simple but its turned out very complicated Jan 23 22:14:22 g00s, if I messed up all the layout params, any idea how I would go about fixing it? Jan 23 22:14:50 i'd start by reading d.android.com ;) Jan 23 22:15:10 you're trying something that is more advanced, but you are a beginner Jan 23 22:16:13 i come from an IOS background and am able to do this with transforms, thought android would be simple but this is all a bit new to me Jan 23 22:17:18 Unfortunately, the task I am attempting needs to be completed somehow, here I go I guess :/ (school project) Jan 23 22:19:12 Is there a libg that makes communication between two BT easy ? Something request/response based I have a RPI device with BT I want to exchange strings over BT Jan 23 22:19:19 http://stackoverflow.com/questions/22899475/android-sample-bluetooth-code-to-send-a-simple-string-via-bluetooth Jan 23 22:19:44 This approach works however I have to constantly check input stream Jan 23 22:20:03 and it's a bit messy is there a lib that makes all this cleaner Jan 23 22:20:37 neredsenvy there is sweetblue, but its expensive Jan 23 22:20:59 could someone check my check in stackoverflow, the question i asked was answered but it doesn’t work the way i want http://stackoverflow.com/questions/34957583/android-animation-increase-height-of-imagebutton Jan 23 22:21:48 neredsenvy oh br/edr or ble ? Jan 23 22:22:10 g00s: Damn you were not kidding talk about expansive Jan 23 22:22:17 I need something simple Jan 23 22:23:00 g00s: both ? Jan 23 22:23:04 neredsenvy br/edr or ble ? Jan 23 22:23:10 oh hmm Jan 23 22:23:14 well does not matter Jan 23 22:23:18 can be just br/edr Jan 23 22:23:28 ble is just the energy saving mode yes? Jan 23 22:23:44 for br/edr you can just grab samples/android-23/connectivity/bluetooth/BluetoothChat Jan 23 22:24:07 neredsenvy totally different technology, APIs, ideas Jan 23 22:24:23 i mean, the HW blocks and radio are similar but ... Jan 23 22:24:38 actually BLE reorders some of the HW blocks, but whatever Jan 23 22:25:02 I don't think these are BLE modules on RPI Jan 23 22:25:19 then yeah, just use the BluetoothChat example Jan 23 22:25:49 i'm making a simple shopping list app. i need to make my lists and items persists in the app even when the screen is rotated. as far i can tell there are two approaches. i either completely depend on sqlite or start using bundles. what irks me about bundles is that i will have to store lists of custom objects which in turn have nested custom objects. is it normal to have everything implement parcleable? Jan 23 22:29:46 hi Jan 23 22:30:00 on an app i have that is known to work on lots of devices on my N10 I get the following any ideas? Jan 23 22:30:05 DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.myco.android.apps.myapp" Jan 23 22:30:05 pkg: /data/local/tmp/com.myco.android.apps.myapp Jan 23 22:30:05 Failure [INSTALL_FAILED_DEXOPT] Jan 23 22:30:11 makes no sense to me Jan 23 22:30:39 g00s: I may have actually fixed the issue by removing most of the programmatic resizing, and using layout weights to fill the grid, need to test a little but as far as I can tell, setting the visibility of the items i don't want to GONE seems to allow the layout to change the way I want it to Jan 23 22:33:36 Calguy: from stackOverflow: 15 Jan 23 22:33:36 down vote Jan 23 22:33:36 accepted Jan 23 22:33:36 Jan 23 22:33:36 Try to uninstall this app, and all others who have your signature on your device (your other apps). Clean your project and restart install. Also, you should consider installing your app through another mean that ADB, for instance using dropbox. Jan 23 22:34:00 (that copied more than I expected to, oh well) Jan 23 22:35:05 http://stackoverflow.com/questions/6913230/install-failed-dexopt-error-when-trying-to-install-application Jan 23 22:35:13 Link to thread ^ Jan 23 22:35:20 seems to be a similar issue to yours Jan 23 22:36:05 there is probably a best practice concerning bundles to save state. to me it seems like nearly all my classes will end up implementing parcleable. is that good? Jan 23 22:39:33 could someone check my question in stackoverflow in regards to animation , the question i asked was answered but it doesn’t work the way i want http://stackoverflow.com/questions/34957583/android-animation-increase-height-of-imagebutton Jan 23 22:40:32 artfex thanks but this happeneed even on first install tnd there is no way to uninstall... Jan 23 22:40:47 Hey all, I have a question. I have my app finished, but I am not a very good designer and i'd like to make it look a little less amateurish :\ Where would be a good place to go to get started in that direction? Jan 23 22:43:42 Akayllin: did you read the design specs and such from Google on Material Design? they have a lot of information on all aspects of desing Jan 23 22:43:47 You might want to start there Jan 23 22:44:40 Akayllin: https://www.google.com/design/spec/material-design/introduction.html#introduction-goals < it starts here Jan 23 22:45:57 Some of it is bullshit to make is sound professional and all, but there are a lot of good "Do's and Don't's" that you can look at for animations, designs, etc. Jan 23 22:46:08 ok i'm getting a little more info from the logcat but maybe not enough artifex Jan 23 22:46:18 will work on it later Jan 23 22:47:47 Alright, I am brand new to this, so all I did was input the error into DuckDuckGo, so that's as far as I could help :/ Jan 23 22:51:10 any good timer for billing clients by the icrosecond Jan 23 22:52:27 Artifex: thanks! Jan 23 22:53:12 No problem Akayllin :) Jan 23 22:54:45 anyone with a bit of experience with animation, looking to animate a button? Jan 23 22:55:10 damn krippykrip :/ sorry that this issue is taking so long for you :( Jan 23 22:55:47 I don't think #Android is meant for these kind of questions as much, but you could always ask just in case Jan 23 22:56:32 is that room for developers aswell? Jan 23 22:57:33 not really sure what it's for, but I have had help from there before, so it's worth a shot I guess? Jan 23 22:57:54 this channel doesn't seem to be getting you anywhere for the moment, that's for sure Jan 23 22:58:45 FINALLY 3 hours later, i fix my stupid issue... Jan 23 23:00:01 lol, its fine i’m a patient guy, its just i raised the question on stackoverflow but someone who answered just scales the button which is not what i am looking for :( Jan 23 23:01:29 Yeah I saw :/ Jan 23 23:02:57 id love an answer on my question regarding parcleable Jan 23 23:07:50 unfortunately iskalla, I have 1 week's coding experience with Java, and no experience with sqlite, so sadly I can't help you with that :/ Jan 23 23:07:57 Sorry. Jan 23 23:09:21 iskalla what was the question ? Jan 23 23:09:39 sorry, cleared history Jan 23 23:10:04 i'm trying to figure out if its normal to implement parcleable in a lot of custom classes in order to save instance state. Jan 23 23:10:13 iskalla no Jan 23 23:10:26 my other option would be to rely keeping a current state of all my objects in sqlite Jan 23 23:10:27 i mean, you would never use Parcelable for anything, unless IPS Jan 23 23:10:33 *IPC, or putting in an INtent Jan 23 23:10:43 for saving stuff in sqlite, you do something else Jan 23 23:11:10 btw g00s, got rid of most of the programmatic control, used layout weights, and got the dynamic resizing to work Jan 23 23:11:15 what do you mean? Jan 23 23:11:36 iskalla if you look at many android APIs, they table something that implements Parcelable Jan 23 23:11:46 for those, you need to implement Parcelable Jan 23 23:12:04 but if you have some POJO, and need to store it, thats not Parcelable's job Jan 23 23:12:15 i have a list thats populated with custom objects which in turn have nested custom objects. when i rotate my phone i want to save all that stuff and restore it again. Jan 23 23:12:22 you wouldn't use parcelable to persist things to disk Jan 23 23:12:31 thats my use case Jan 23 23:13:15 iskalla have you read the activity lifecycle docs ? Jan 23 23:13:32 yes, i am familiar with acitvity and fragment life cycles Jan 23 23:13:46 you put stuff in Bundle instanceState thats transient, like what the user selected maybe Jan 23 23:14:10 but if the user goes to another app, and your app gets killed, and you need to restore from that state, you need something else, like sqlite Jan 23 23:14:35 ok! so im better off using sqlite to save my complex custom objects Jan 23 23:14:48 and use save instance state for the smaller, transient stuff Jan 23 23:14:51 iskalla you can look at realm.io Jan 23 23:15:24 iskalla yeah, save stuff in bundle to restore UI to its general state, but saved data should be in sqlite Jan 23 23:15:27 like notes, etc Jan 23 23:16:16 thanks, that helped me a lot! Jan 23 23:16:26 np Jan 23 23:16:36 i was just about to make all my classes implement parceable :D Jan 23 23:17:04 i dont think my app has any parcelables Jan 23 23:17:38 of course you need it to talk to service in another process, etc Jan 23 23:17:48 yes, i understand Jan 23 23:18:13 the representation of parcelable can change at any time, so you wouldn't want to save it, android OS gets updated, your app reads it and blows up Jan 23 23:19:50 i just found out the attribute to use to change the color for the text of an action bar menu item in a theme Jan 23 23:20:47 it took me quite a bit of time, I'd not be far if I say 2 or 3 hours. I think that R.attr documentation needs more work u.u Jan 23 23:20:48 it seems like android apps access storages a lot more frequently than a plain java app that can rely on data stored in cache most of the time. Jan 23 23:21:47 the OS offloads virtual memory to the programmer to save state Jan 23 23:22:44 what does that mean? Jan 23 23:22:59 im still a beginner Jan 23 23:23:13 iskalla eh don't worry about it then :) Jan 23 23:23:36 no, im very interested, could you formulate just a little differently? Jan 23 23:24:42 iskalla http://android.stackexchange.com/questions/62452/android-virtual-memory-support Jan 23 23:29:03 :( Jan 23 23:30:49 g00s, thank you Jan 23 23:35:19 are there any other android developer chatrooms, this one is great and everyone is very helpful, just wondering? Jan 23 23:36:06 krippykripkrip there is this, and one on slack - but i dont know much about it Jan 23 23:36:25 no probs, thx Jan 23 23:36:36 you will need an invite Jan 23 23:42:28 I was thinking earlier: I wonder whether Kotlin's incremental compilation will ever be like Eclipse's (with the Java compiler). Jan 23 23:42:43 That would present a very strong argument for moving to Kotlin. Jan 23 23:43:08 Imagine editing a file and having affected files instantly red-underlined in the file list. Jan 23 23:43:25 we still don't have that for Java in AS :( Jan 23 23:43:43 i'm guessing its a problem between model of AS and gradle Jan 23 23:44:03 Regarding your first point -- isn't that because they simply delegate to javac? If they're writing their own compiler, maybe things are different. Jan 23 23:44:04 i just renamed a class using AS Refactor, and it completed. I build, and it fails lol Jan 23 23:44:09 I did consider the model thing, but perhaps that could be changed. Jan 23 23:44:29 JNI (n00b) headscratching - I’ve built a native lib, based on the hello-jni sample, implementing a single native method. I’m using it from a java project created in Android Studio, pulling the native lib in via the jniLibs folder. I’m getting Unsatisfied Link Error “No implementation found for…” when the method is called. Jan 23 23:44:31 THINGS I’VE TRIED: 1) I’ve made certain that System.loadLibrary() is being called before the method is called. It’s in a static class constructor as recommended in the JNI Tips page. 2) I’ve tried changing the library name in the call to System.loadLibrary() and verified that it throws except when I use the correct name. 3) I’ve checked logcat at VERBOSE level - nothing is logged to indicate success or failure of the Jan 23 23:44:32 System.loadLibrary() call. 4) I’ve verified correct naming convention and declaration for my implementation in multiple ways (copying the names supplied in the logged error details; generating a jni header by running javah; inspecting the output of arm-linux-androideabi-nm -gD and observing the correct symbol is present). 5) I’ve tried both with C and C++ (with extern “C”), 6) I’ve tried adding a JNI_OnLoad implementation an Jan 23 23:44:32 logging in it with both __android_log_write and __android_log_print. Nothing appears in logcat, so the only evidence I have that the library was loaded is the lack of an exception from System.loadLibrary(). Jan 23 23:44:45 Does anybody have any suggestions? Jan 23 23:44:47 TacticalJoke yeah, if the compiler is smart like rosylyn ... Jan 23 23:45:08 Oops, sorry for butting in Jan 23 23:48:42 hey everyone, is there an android studio channel? Jan 23 23:49:20 i was just wondering if there was a way to create a page with text without having to create a new activity, since so much comes with those activities Jan 23 23:50:55 tripknotix: You could just show a View in front of everything else on the current screen. Or use Fragments (*sad trombone*). Jan 23 23:51:07 No, there's no Android Studio channel. If there were, it'd be almost silent. Jan 23 23:53:04 TacticalJoke: are there any good alternatives to android studio that also do ios. but still have the same navigation popouts and menu features Jan 23 23:53:14 are there any tutorials out there on animation which could help me with the issue of animating the height of my button? Jan 23 23:53:27 TacticalJoke: is "view" an android studio term, or just a java term Jan 23 23:53:34 java/android term Jan 23 23:54:15 or do you mean like a popup textview Jan 23 23:54:18 There are probably no good alternatives. View is an Android class. Jan 24 00:04:40 I’ve had a go at breakpointing JNI_OnLoad to see if it’s actually being called. Added jniDebuggable true to build.gradle and added an “Android Native” configuration to debug. Put a breakpoint into JNi_OnLoad, which the IDE didn’t complain about. It wasn’t hit when I ran it, though whether that’s because I’ve set it up incorrectly or because it was never hit isn’t clear. Jan 24 00:05:11 Is it possible for System.loadLibrary() to silently fail, not logging or throwing anything but not actually loading the library? Jan 24 00:05:20 As it kind of feels like that’s what’s happening for some reason Jan 24 00:13:31 Ah, using LLDB’s “image list” before and after the System.loadLibrary call shows that my library is definitely being loaded Jan 24 00:15:36 Bet I’m doing something really dumb here… Jan 24 00:17:13 Can't think of anything else than name mangling or symbol visibility issues. Jan 24 00:17:56 I assume your JNI method has JNIEXPORT in place? Jan 24 00:21:16 Yep, JNIEXPORT is there. Jan 24 00:22:08 And the symbol name is present and correct in the nm output. I figured the same (mangling/visibility) but I’m getting a bit stumped now. Jan 24 00:22:56 Just getting to grips with lldb atm. It doesn’t seem to want to let me put breakpoints into my JNI source. Jan 24 00:26:19 Haven't really tried native-code debugging out. But the automatic native method lookup worked fine for me. Jan 24 00:31:07 How did you build the library? I’ve used ndk-build and just done it as a completely separate thing outside Android Studio. Then I symlinked my src/main/jniLibs folder to the libs folder in my NDK project. Jan 24 00:31:32 That appears to have been sufficient to allow System.loadLibrary() to load, but I’m wondering if there’s something more I should have done. Jan 24 00:32:08 Android Studio is highlighting my native method and saying it can’t find the JNI implementation, although it builds and loads the library Jan 24 00:32:50 I'm building it from source as part of the app, with the experimental Gradle plugin (com.android.tools.build:gradle-experimental:0.4.0) -- bleeding edge and all that. Jan 24 00:34:20 FWIW, Android Studio did occasionally decide to not find the implementation even with that, though that went away at some Gradle sync. Jan 24 00:35:10 (It does a nifty bidirectional shortcut link between the native method declaration in the .java file and the implementation in the .c when it does realize what goes where.) Jan 24 00:35:33 u know i keep getting this "recycler" error on my android 2.3 device with android studio, whenever i restart the app on my device, anyone experienced this before? Jan 24 00:36:06 Maybe I should look into that. The bit about migrating the DSL to a different version based on an example amid warnings that it’ll probably change further put me off :-) Jan 24 00:36:43 Talking of which, is there any info on when that might cease to be “experimental”? Jan 24 00:37:18 omnicognate: Well, I didn't have anything to migrate from, since this was all new. :) Anyhow, I'd expect build / library-inclusion problems to show up as an immediate UnsatisfiedLinkError at the loadLibrary call, but on the other hand you seem to have already checked for all the likely problems. Jan 24 00:38:21 Yeah, it’s a puzzler Jan 24 00:38:51 And it’s well after midnight… Jan 24 00:39:03 Guess I’ll sleep on it. Thanks for your help! Jan 24 00:39:30 I wouldn't call it all that helpful, but np. Jan 24 00:39:42 :-) Jan 24 00:59:54 when trying to create a new activity it keeps saying "Package name is not a valid package name" Jan 24 01:00:00 no matter what i put for the Package Name Jan 24 01:01:44 tripknotix: Try selecting from the dropdown. Jan 24 01:02:30 i twasnt there but a google search tells me its the package name of the app Jan 24 01:02:34 like com.something.somethingelse Jan 24 01:02:48 what happens is if i select a folder, it puts that in the default as package name Jan 24 01:09:28 if the folder has a space in it I imagine it wouldn't like that **** ENDING LOGGING AT Sun Jan 24 02:59:59 2016