**** BEGIN LOGGING AT Sat Nov 26 03:00:00 2016 Nov 26 03:22:10 Is there an Android-dev channel with active people? Nov 26 03:26:13 stackoverflow Nov 26 03:35:06 Maybe we should do a recruitment drive in /r/androiddev. Nov 26 04:53:19 TacticalJoke: what do you mean "active people"? Isn't people here active? Nov 26 05:47:04 So guys how is it everything going with you? Nov 26 06:56:44 Hello, how to get the filesystem App path from an static method ? Nov 26 06:57:25 Environment.getDataDirectory() <-- return only "/data" Nov 26 09:08:46 I have a strange issue. I have a recyclerview in which I have text views, which are selectable. If I scroll down a bit, the textviews become non-selectable... Nov 26 09:13:19 is textview selectable depending on something Nov 26 09:14:16 Ashiren, No, it's always selectable, defined in the XML as android:textIsSelectable="true" Nov 26 09:15:49 hmm Nov 26 09:19:45 Just verified that it happens only on my tablet (android 6) but not on the emulator (android 6) or my phone (4.4) Nov 26 10:54:15 I have swipeable card view inside a scrollview. I believe I should somehow disable the gesturerecognizer for the scrollview when the cards are being swiped, otherwise vertical gestures activate vertical scrolling instead of card swiping, which i don't want. Nov 26 11:18:21 So the question is: How do I disable the other gesturerecognizer while swiping? Nov 26 11:31:51 can't your return true to say you consumed the event? Nov 26 12:08:05 i want to know in this chunk , we are giving permission to notification manager to run our MainActivity Class ? http://paste.ubuntu.com/23537140/ Nov 26 12:20:12 what happens when you tested it Nov 26 13:18:59 whatitis: return true from where? Nov 26 14:35:33 I started with android app development today, and need a little pointer. I want to have an activity with a scrollable list of cards. So far I have found out I probably need a RecyclerView to hold the cards, is that correct? Nov 26 14:37:43 Assuming it is correct, I intend to put CardViews inside it. My question is, how can I define those view in xml, and then apply my information from the app? Instead of creating the CardViews completely programatically. Nov 26 14:38:48 I guess my question is whether there exists some kind of View templates I can define and then populate. Nov 26 14:42:09 totokaka: if you're displaying static content that doesn't change in runtime i don't think RecyclerView is necessary Nov 26 14:42:48 Well, I want the cards to be interactable, and each card may contain a counter Nov 26 14:43:30 If it's possible, I would like to make the cards expandable to reveal more information inside them. Nov 26 14:43:54 sure, but if the layout is static i think you can just create a CardView inside a LinearLayout and then assign interactivity programmatically Nov 26 14:44:48 There will be multiple cards, though, and a floatingActionButton to add more. Would it still be possible without the recyclerView_ Nov 26 14:44:52 It depends how many cards you want to show. If you're putting 20 cards in a linear layout in a scrollview, then I'd choose a recyclerview. Nov 26 14:45:31 Hmm.. For most users I guess it will be under 20, but I'd like it to be possible to have more, too Nov 26 14:46:02 sounds like you're generating dynamic content after all Nov 26 14:46:56 Did I say it wasn't? It is definitely dynamic in some aspects. Nov 26 14:47:10 you didn't Nov 26 14:47:48 hello Nov 26 14:48:05 I've got some display issues with my test widget for the app I'm developing. I've placed a file called test_widget.xml into res/layout directory. This file has a relative layout parent. I'm trying to figure out why the widget is bad displayed. This is test_widget.xml: http://pastebin.com/vcRvQZjZ and this is the screen with my widget: http://imgur.com/a/WUKcm Nov 26 14:48:14 Anyways, my main question was really the view template thing... Nov 26 14:48:27 the textview is contained into a relativelayout, inside the widget, I've tried to reduce the size but it's not working. How could I fix the xml in order to get the test widget with the same size (height and width) than the left widget? Nov 26 14:48:31 Any ideas? Nov 26 14:51:08 totokaka, if you ask how to implement the recyclerview with your custom xml view, this tutorial covers it all: http://www.vogella.com/tutorials/AndroidRecyclerView/article.html#exercise-using-recylerview Nov 26 14:52:46 Thanks, Joozey. I think the LayoutInflater was what I was really looking for Nov 26 14:56:12 totokaka, np good luck Nov 26 14:56:41 i'm trying to learn how to track MotionEvents. i need to track ACTION_DOWN and ACTION_UP on a view. can i do this with a OnTouchListener? Nov 26 14:56:49 cristian_c, show the code where this test widget is added into. Are you inflating it or using ? Nov 26 15:04:26 Android studio tells me: "The following classes could not be found: -�android.support.v7.widget.CardView" Other classes in android.support.v7.widget are available. What have I done wrong? Nov 26 15:07:23 totokaka: did you copypaste the imports? Nov 26 15:07:50 which sdk are you using Nov 26 15:07:55 I'm trying to use it in a layout. However, I can't find it in imports either. No copy-paste Nov 26 15:08:39 By "find it in imports", I mean android-studio can't auto complete it, and gives an error when I write the correct class and package. Nov 26 15:10:29 is v7 included in the dependencies of your app-level gradle file? Nov 26 15:11:37 I have "compile 'com.android.support:appcompat-v7:25.0.1'" under dependencies in app/build.gradle, yes. Nov 26 15:12:04 and it has been synced? Nov 26 15:12:29 How can I check? As I mentioned, I can import other stuff from android.support.v7 Nov 26 15:12:37 hmm ok Nov 26 15:12:58 I have minSdkVersion at 21, if that matters. Nov 26 15:13:05 studio should always ask you to sync it whenever it changes, so if you can't see such dialog then it should be fine Nov 26 15:13:41 Forced a sync now. No change Nov 26 15:15:46 I don't really need it in java (yet), however the design view of the layout xml-file, can't preview it because it can't find the class. Nov 26 15:18:40 JuliusN, Apparently CardView is its own dependency. 'com.android.support:cardview-v7:25.0.1'. Thanks for the help anyways Nov 26 15:19:26 yeah i'm a noob myself Nov 26 15:19:41 =D Nov 26 15:28:20 i'm having difficulties to understand what is the purpose of return value of the onTouch boolean in an OnTouchListener? Nov 26 15:34:22 Joozey: ok, I pastebin it Nov 26 15:35:11 JuliusN: it indicated wether it consumed the touch or not Nov 26 15:35:38 if true, the touch event wont go further in hierarchy Nov 26 15:36:11 i.e. you click button. you trigger touch event on button. button returns false. so button's parent receive the touch event. Nov 26 15:38:29 Joozey: http://pastebin.com/SgJeAN0r Nov 26 15:39:10 Joozey: as you see, I've changed the dps, but without effect Nov 26 15:39:26 *but no effects Nov 26 15:39:41 Ashiren: ah, that makes sense Nov 26 15:40:34 Ashiren: so events are passed from parent to children? Nov 26 15:40:40 Joozey: Any ideas? if you want I post other stuff, I'm available Nov 26 15:40:46 whats the best way to display a remote pdf file (url) inside an activity without using googles pdf viewer (due to privacy reasons) Nov 26 15:40:51 Ashiren: or vice versa? Nov 26 15:41:06 i want to target android >=4.1 Nov 26 15:46:05 JuliusN: from children to parent Nov 26 15:50:56 i tried adding an OnTouchListener to a CardStack, but onTouch doesn't get called upon swiping Nov 26 15:53:16 CardStack? Nov 26 15:56:47 Ashiren: it's a UI library for swipeable cards Nov 26 16:04:50 well probably it internally takes care of touch events Nov 26 16:05:01 and leaves you some swipe events Nov 26 16:05:23 Ashiren: so adding a listener doesn't actually override anything? Nov 26 17:05:53 What partitions does fastboot oem unlock touch? Does it wipe the usb/sdcard partition? Nov 26 17:59:26 Ashiren, anyone: I found the OnTouchListener that gets called when I interact with the card stack. However, even though it returns true the parent ScrollView still seems to listen to gestures. Nov 26 18:00:47 I was under the impression that when child view consumes gestures, they don't get passed on to the parents. Nov 26 18:04:15 I was able to make a tweet and send it to twitter using fabric.....does anyone know if there's a way of leaving the text unchanged and disable themodification Nov 26 18:04:24 it's important to keep the hashtags intact Nov 26 18:11:47 I was able to make a tweet and send it to twitter using fabric.....does anyone know if there's a way of leaving the text unchanged and disable themodification, it's important to keep the hashtags intact Nov 26 18:14:43 j4f-shredder: how is your spamming app going? Nov 26 18:15:40 o. Melatonina Nov 26 18:16:08 What does "o." mean? Nov 26 18:17:01 Melatonina, it's for charity on my neighbour Nov 26 18:17:35 j4f-shredder: I know you are not a spammer. It's my affectionate way to call it Nov 26 18:17:42 ajjajajaja Nov 26 18:17:59 now I'm trying to use twitter stream Nov 26 18:18:03 Are you from Spain? Nov 26 18:18:08 that's why I need the user to leave the text alone Nov 26 18:18:24 is there any way of blocking the twitter editor? Nov 26 18:18:34 once you dispatch the tweet to the twitter application with the inten? Nov 26 18:18:37 t Nov 26 18:21:33 I'd say it's improbable Nov 26 18:21:50 that there is a way to do it Nov 26 18:22:08 unless it's specifically controlled by some extra in the intent Nov 26 18:22:17 which should be clearly documented Nov 26 18:25:30 j4f-shredder: did you look at twitter components in Android Arsenal? Nov 26 18:25:31 https://android-arsenal.com/details/3/4599 Nov 26 18:26:00 https://android-arsenal.com/details/3/2453 Nov 26 18:27:42 raoul11: what does "o." mean? Nov 26 18:28:04 hello Nov 26 18:28:13 oh :9 Nov 26 18:28:16 :) Nov 26 18:28:17 Hello Nov 26 18:28:57 How is the weather in Israel today? Nov 26 18:29:02 dry Nov 26 18:30:37 it rained lightly here today but should be dry in the next days here too Nov 26 18:30:42 how is the relation with palestine? Nov 26 18:30:51 a little better? Nov 26 18:31:08 you both should stop fighting, it's time to end that shit Nov 26 18:31:11 I think that changes more slowly than the weather Nov 26 18:31:39 and I guess most people from both sides would like peace too Nov 26 18:32:25 i'm too lazy to be fighting with someone, I don't know where they get the will to do that Nov 26 18:33:04 donno, am busy tryin to deploy this game in less than 2 days Nov 26 18:33:14 I mean, palestina is just 200 square meter, who cares Nov 26 18:33:35 it's like liberland Nov 26 18:48:29 I unable to open a project(developed in android studio1.3.2) in android studio 2.2.2. Nov 26 18:48:49 gradle build is running for long time Nov 26 19:55:50 Can anyone help me build my APK? Its saying 'Could net find method android() for arguments' Nov 26 19:57:10 huh Nov 26 19:57:33 'Error:(3, 0) Could not find method android() for arguments [build_bwd1xw6kklf2inrsapz5jfpi1$_run_closure1@6cb5f22e] on root project 'WhatAndroid-master' of type org.gradle.api.Project. Nov 26 19:57:33 Open File' Nov 26 19:57:39 oops Nov 26 19:58:15 Im trying to build the APK Nov 26 19:59:10 why not use beginners method - click 'run' in android studio Nov 26 19:59:37 The thing is finished Nov 26 20:00:20 so thats why im trying to build the apk Nov 26 20:06:50 hmm ok I think I solved it Nov 26 20:07:03 I had it in the wrong build.gradle Nov 26 21:47:25 Is it worth learning / switching to qemu when I can use vmware workstation? Nov 26 23:29:01 If you start a touch gesture (i.e., you cause a TOUCH_DOWN event) and then the current window loses focus (e.g., a dialog shows in front of the current window), that touch gesture continues if you don't let go. You'll get TOUCH_MOVE, and eventually TOUCH_UP. Is this an Android bug? Nov 26 23:29:48 I can't imagine it ever being desirable for the touch in the current window continuing despite the current window losing focus. Nov 26 23:31:17 s/a touch gesture/a touch event/ Nov 26 23:45:52 how do I listen for a boolean variable change? Nov 26 23:46:05 I have an asyncTaks Nov 26 23:46:12 running on the background and I want to display a toast Nov 26 23:46:23 depending on the state of a boolean Nov 26 23:46:28 that updates inside that task Nov 26 23:49:20 j4f-shredder: Have you considered AsyncTask.publishProgress? Nov 26 23:49:34 You can't really listen to a field change without some high-level framework. Nov 26 23:50:12 mmmm Nov 26 23:50:15 are you sure about that? Nov 26 23:50:26 I saw someone using an interface Nov 26 23:50:32 not that I'm doubting of you Nov 26 23:50:42 I'm just saying, I couldn't understand the solution Nov 26 23:50:55 I'm a total noob Nov 26 23:51:55 what is publish progress? I searched Nov 26 23:51:58 but I found Nov 26 23:52:16 publishProgress((int) ((i / (float) count) * 100)); Nov 26 23:54:46 how would publishProgress would let me make a toast on the main thread from within an async task? Nov 27 00:00:15 j4f-shredder: It runs on the main thread. What is this boolean exactly? Nov 27 00:02:08 it's a "correctAnswer" from server Nov 27 00:02:27 I send to a nodejs server to post a tweet and it returns a code 200 or 500 Nov 27 00:02:35 if it's 200 it should display one toast Nov 27 00:02:41 if not it should display another Nov 27 00:02:47 maybe not a boolean Nov 27 00:02:51 but a String variable Nov 27 00:03:41 I think AsyncTask.publishProgress would work there. Nov 27 00:04:00 What else is there? It's either onPreExecute, onPostExecute, or onProgressChanged (or whatever it's called). Nov 27 00:04:12 Nothing else runs on the UI thread, AFAIR. Nov 27 00:04:33 And Java does not natively support field-change observer functionality. There's no doubt about that. Nov 27 00:05:01 I mean for basic fields (e.g., String fields). Nov 27 00:06:15 j4f-shredder: I guess you should return that boolean as result of doInBackground and show the Toast in onPostExecute Nov 27 00:08:16 j4f-shredder: unless that's an intermediate result. In that case you should publishProgress() it and show the Toast in onProgressUpdate(). But I would not use a Toast to show an intermediate result because a Toast stays on screen for a certain amount of time and in general you can't tell how often you have progresses to show. Nov 27 00:10:33 it's a final result Nov 27 00:10:42 but I thought post execute was not part of themain thread Nov 27 00:10:49 does it allow to show toasts in there? Nov 27 00:13:19 thanks Nov 27 00:13:25 the postexecute worked perfectly Nov 27 00:13:34 it seems that it let you use toasts there Nov 27 00:13:47 I don't know why cause it's part of the async task Nov 27 00:16:05 j4f-shredder: `onPostExecute` runs on the main thread. Nov 27 00:19:27 In case anyone wants to answer my SO question, here it is: http://stackoverflow.com/questions/40824528/why-dont-touch-events-cancel-when-a-dialog-shows Nov 27 00:19:48 I'm guessing it's not an Android bug, but it's kinda weird. Nov 27 00:25:31 Is there a way I can define a sliding navigation drawer using as menu? Nov 27 00:25:48 I already have the slidingness part Nov 27 00:26:05 TacticalJoke...thank you very much Nov 27 00:26:11 Saturday night... Now it's a party! Nov 27 00:26:28 heh, slightly off topic Nov 27 00:27:16 there ain't no party like a 8:30am on Sunday party Nov 27 00:28:15 if there's cops outside the place, my church people would kill me... Nov 27 00:28:31 BAD bartender Nov 27 00:29:13 you have a bartender in church? Nov 27 00:29:56 no, but they are out and about and notice such things 😉 Nov 27 00:30:55 after noon they sneak in and pretend to order... things Nov 27 00:32:31 Leeds, weren't you over in East Asia @one point? Nov 27 00:32:50 yeah, I live in UMT+8 Nov 27 00:33:00 UMT? GMT? UTC? :) Nov 27 00:33:36 umt-5 is what I spout Nov 27 00:33:39 Does anyone know how to make a sliding menu defined by a menu? Nov 27 00:34:05 I found NavigationMenuView but I'm not sure what to do with it Nov 27 00:34:51 Hello there guys, i think it's oftopic subject on android studio i have an issue with firebase cloud messaging, got this errors, debuger https://dpaste.de/DpeH , MyFirebaseMessagingService java https://dpaste.de/hRVk thanks and i apologise. Nov 27 00:35:59 guess it's -6 now Nov 27 01:05:00 and getting this in logcat I/art: Rejecting re-init on previously-failed class java.lang.Class Nov 27 01:40:09 Hello, is it a good practice to use Thread.sleep()? Nov 27 01:41:10 eZeth: Depends. I think there are some reasonable uses, but they are rare and generally covered by something else (e.g., ScheduledThreadPoolExecutor, Handler, etc.). Nov 27 01:41:37 Alright. Thanks Nov 27 01:41:53 eZeth: What is your intended use? Nov 27 01:42:39 TacticalJoke: Just to create a simple button that starts an empty progress. Nov 27 01:43:07 eZeth: You're thinking of calling Thread.sleep on the UI thread? That's really bad. Nov 27 01:43:09 TacticalJoke: Using a while loop. But without a delay, the variable would shoot up to 100 in ~0ms Nov 27 01:43:32 TacticalJoke: How would I go about? Nov 27 01:43:35 You're doing it wrong. Nov 27 01:43:48 What is your end goal? I don't understand what you mean by "starts an empty progress". Nov 27 01:44:27 TacticalJoke: I have 2 widgets. A button and a progress bar. Essentially it does nothing. Nov 27 01:44:51 If you want fake progress, you could use Handler.postDelayed. Nov 27 01:45:04 TacticalJoke: But the button listens to a click and have a variable keep on adding 1 from 0 until 100 Nov 27 01:45:39 Alright. I'll try that then Nov 27 01:47:51 You could also use AsyncTask with Thread.sleep calls in `doInBackground`, but that's a lot more wordy. Nov 27 01:49:16 Just curious of why you want a fake progress bar. I've never considered doing that on Android. :D Nov 27 01:50:07 Note that you can use indeterminate progress bars -- they just show a "busy" visual. Nov 27 01:50:17 TacticalJoke: I'm new to android developing so something simple would do. Also, i have a problem with using 'Button.setText()' Nov 27 01:52:57 Handler.postDelayed does not have a 'wait' :< Nov 27 01:53:02 It just delays the process Nov 27 01:54:28 eZeth: Why do you want to show fake progress? Nov 27 01:56:05 I don't really know how to process anything that have value of 0 to 100 that needs time Nov 27 01:56:09 TacticalJoke: Nov 27 02:00:18 eZeth: Doesn't answer my question. Nov 27 02:00:33 ... Nov 27 02:01:01 Because why not Nov 27 02:01:57 The thing is, I've already given you two good answers. Nov 27 02:02:05 And apparently you aren't experienced enough to understand them. Nov 27 02:02:42 So, in an attempt to help more, I'm trying to give you a completely different solution, which involves figuring out why you're trying to do this weird thing, but you're refusing to help. Nov 27 02:02:48 So I'll leave it at that. Nov 27 02:03:10 I don't really have a reason on why I do it Nov 27 02:03:53 "Just to learn" is a reason. Nov 27 02:04:09 Forgive me for not having a solid reason Nov 27 02:04:11 There's always a reason. Humans generally don't behave according to the casting of dice. Nov 27 02:04:39 Well, okay. I'm doing it just to learn. Nov 27 02:05:17 Okay, then I'd recommend Handler.postDelayed or AsyncTask with Thread.sleep. Nov 27 02:05:34 Handler.postDelayed is without Thread.sleep. Nov 27 02:07:08 But Handler.postDelayed does not simulate a wait :/ Nov 27 02:07:42 I mean, if I have a while loop with a Handler.postDelayed, it will all be executed once the timer runs out. Nov 27 02:08:15 You wouldn't use a `while` loop with Handler.postDelayed. Nov 27 02:08:50 Ahh, is that so Nov 27 02:17:08 TacticalJoke: Ehh, app crashed Nov 27 02:18:42 g00s: Hey. Nov 27 02:18:47 eZeth: Cmd/Alt+6. Nov 27 02:19:58 Can I declare widgets before layout is created? @ TacticalJoke Nov 27 02:20:12 hey TacticalJoke Nov 27 02:20:29 eZeth: Not sure what you mean. Nov 27 02:20:53 I set variables for widgets before the function onCreate() Nov 27 02:21:45 are there no good books on http/2 ? don't really want to read the ietf spc Nov 27 02:21:57 Okay, nevermind. Error is gone. Except progress doesn't run Nov 27 02:21:58 If you're saying `private TextView textView = (TextView) findViewById(R.id.text_view);`, definitely not. Nov 27 02:22:13 ^ Definitely that Nov 27 02:23:37 TacticalJoke: I have a variable Runnable variable = new Runnable(); How do I go about and call itself? Nov 27 02:24:49 eZeth: Probably best to make it a field: `private Runnable runnable = new Runnable() { ... }` Nov 27 02:25:48 TacticalJoke: A 'field'? Nov 27 02:26:36 eZeth: I would recommend learning Java before tackling Android. Nov 27 02:28:06 eZeth listen to TacticalJoke ;) Nov 27 02:29:43 TacticalJoke: g00s: I tried codeacademy, but everything is everything I know. Nov 27 02:29:58 everything there* Nov 27 02:32:07 Okay, got it working Nov 27 02:32:19 TacticalJoke: Thanks. Nov 27 02:33:50 TacticalJoke lol cards against humanity is digging a hole in the ground Nov 27 02:35:16 g00s: Weird. Nov 27 02:43:56 Thank you for your time Nov 27 02:51:58 g00s: It feels antisocial, somehow. Nov 27 02:52:40 As if flat land is better than dug land. Nov 27 02:57:47 They've been digging since last night Nov 27 02:58:08 Actually, like mid day yesterday **** ENDING LOGGING AT Sun Nov 27 02:59:59 2016