**** BEGIN LOGGING AT Sat Mar 29 03:00:00 2014 Mar 29 03:03:52 is there anyone have ads in her apps? Mar 29 03:45:33 woohoo, weather - that means ad impressions! Mar 29 03:47:16 I should ads to my live wallpaper. I'm sure users would love that! :) Mar 29 03:47:44 All 750 of them. lol Mar 29 03:49:21 soon you'll be at 1000 Mar 29 03:49:57 nah, the installbase is headed the other direction :p Mar 29 03:54:57 Hey, how would I make an app resume in the state it left off in if the power is turned off and then back on. I have pause and the back button working that way, but can't figure out the power button. Mar 29 03:55:30 Is that really a good idea? Mar 29 03:56:08 JesusFreke: oh Mar 29 04:23:52 yay! android 4.4.3 : "multiple Bluetooth fixes" Mar 29 04:24:07 great, how long until everyone updates to 4.4.3 :| Mar 29 04:29:20 maybe never lol.... Mar 29 04:31:25 What was it google was trying to do to get Hardware people to update there crap? Mar 29 04:33:00 Does google give a cut of Google Play Store sales to the hardware ppls? Seems like an incentive to make them keep the OS more up to date. Mar 29 04:34:05 is there such a thing like findviewgroupbyid? Mar 29 04:34:29 a viewgroup is a view.. Mar 29 04:34:57 you can use the usual findViewByID Mar 29 04:36:52 K thanks Mar 29 04:37:41 for weird cases you can use findViewByTag if you need Mar 29 04:39:35 Ah, might come in handy Mar 29 04:57:01 "How to Stop Sucking and Be Awesome Instead" hm, i need this book Mar 29 05:00:55 indeed Mar 29 05:11:16 most of the world needs it g00s :-P Mar 29 05:11:36 :) Mar 29 05:13:09 so, how is life Mar 29 05:14:01 <_nedr> guys .. question hypothetically, if i were to write an android tutorial today and the coming months ... should i write it targetting Eclipse, IntelliJ or Android Studio? Mar 29 05:16:33 hm, i guess the first question is - is another tutorial necessary ? Mar 29 05:16:54 maybe in 2009. not 2014 Mar 29 05:18:04 tutorials remain necessary Mar 29 05:18:34 i get the impression, we're talking "general android". but d.adnroid.com has good tutorials there Mar 29 05:18:38 but it's really easy, step 1:learn java... Mar 29 05:18:59 step 2:???, step 3:profit! Mar 29 05:19:32 you mean step 3: not profit Mar 29 05:23:52 maybe tell people like me to how to use maven's power instead of sticking with ant Mar 29 05:24:18 using maven is easy Mar 29 05:24:32 Get a template pom file and you're done Mar 29 05:25:34 g00s, work for someone else if you can't make money on your own... Mar 29 05:25:44 yeah its looking that way Mar 29 05:26:37 pfn: where can one start looking for money making ideas Mar 29 05:26:44 now that lastpass updated their app, I want to do something similar for KeepShare... Mar 29 05:26:49 is there an app for that :-P Mar 29 05:27:04 most ideas are not worth money Mar 29 05:28:17 but using a clipboard is so insecure... Mar 29 05:34:05 Is there a resource in which I can lookup core log message? I'm trying to figure out why my phone isn't working Mar 29 05:34:46 <_nedr> Looney, pfn, thanks for reply ... sorry for seeing it late.. Yes i think as long as there are newbies there will be tutorials... the root of my question is if i were to write a tutorial would it be targeting IntelliJ or Android Studio (which i think is the future of Android) or Eclipse which has such a solid user-base? Mar 29 05:36:55 well, in that case I would like to say what has been repeated Mar 29 05:37:00 its 2014 Mar 29 05:40:27 <_nedr> Looney, ok new question... 1. which ide do you use currently? 2. Which would you encourage new users to use to learn? Mar 29 05:42:09 I use no IDE :'( Mar 29 05:42:21 back then, I had Eclipse Mar 29 05:42:44 it would fail and be a pain in "you know where" whenever it wanted to Mar 29 05:42:50 so I gave up on it Mar 29 05:43:01 use ant for building project/code Mar 29 05:54:39 did i read somewhere that you should have a setting for notifications Mar 29 05:55:03 whether to show them or not Mar 29 05:56:09 ah yes Mar 29 05:56:24 "Make notifications optional" Mar 29 06:08:31 Looney hah Mar 29 06:08:39 "back then, I had Eclipse" Mar 29 06:08:53 * g00s hears sad country song in the background Mar 29 06:09:07 "horse died, truck stopped working" Mar 29 06:10:11 "woman left" Mar 29 06:39:36 where can i get the ADT stand-alone, not the builtin one to eclipse-bundle? Mar 29 06:42:50 Looney: that must be painfull Mar 29 06:42:51 ;) Mar 29 07:37:44 g00s: you got any info on unit testing rx? Mar 29 07:58:09 yolo Mar 29 07:58:31 is google now an open source ? can i modify its GUI and redistribute Mar 29 07:59:14 nope Mar 29 08:29:14 Why do I get a CursorIndexOutOfBounds on the line famr.setId(cursor.getLong(0))? http://pastebin.com/iif5jN8Q Mar 29 08:30:47 gordon_: well, there is a bit of learning curve issue Mar 29 08:31:07 but I do not have to worry about eclipse bailing on me when it feels like Mar 29 08:33:26 for the lolx https://pay.reddit.com/r/LifeProTips/comments/21ngzg/lpt_when_you_cut_your_nails_leave_one_nail_uncut/ Mar 29 08:35:02 Hi Mar 29 08:36:09 delay as I can put in a variable? Mar 29 08:41:28 Question: Any variables, objects etc in an activity may be garbage collected if the activity isn't in focus right? Would a simple way around this be to check if the variable, object, etc is null in onResume()? Mar 29 08:46:58 bbdude objects aren't garbage collected if you still have a reference to them Mar 29 08:48:07 [09:46] bbdude objects aren't garbage collected if you still have a reference to them Mar 29 08:48:07 [09:47] as then they wouldn't be 'garbage' Mar 29 08:48:27 hmm doesn't android clean itself up after awhile for whatever reason? Mar 29 08:48:44 I'm developing an app and if I try to resume after awhile it'll crash Mar 29 08:49:22 It'd totally be cool if crashlytics would do its job and email me the details but i'm left a chicken without a head :( Mar 29 08:49:41 What the heck. long insertId = database.insert(FavegaOpenHelper.TABLE_FARMS, null, values); tells me there's no column called farms in my table called farms. The table does exist, where is it getting that farms is the column name? Mar 29 08:49:55 I'm inserting this value: values.put(FavegaOpenHelper.COLUMN_NAME, name); Mar 29 08:51:03 bbdude yes, stuff may be automagically cleaned up, your activity may be destroyed, etc, but your activity's variables and objects are not garbage collected when your activity object still exists (unless you use soft/weak references, which you'll know if you do) Mar 29 08:52:33 what is possible is that your activity has actually been destroyed and recreated by the system Mar 29 08:53:01 see I'm completely perplexed at that, because it "remembers" the state of the ui Mar 29 08:53:17 I have tabs with 4 fragments and it remembers the tab that was selected Mar 29 08:53:28 yes it does, it'll remember the state of every UI element that has an ID, pretty much Mar 29 08:53:49 furthermore, several components automatically save and restore their own info Mar 29 08:54:22 if this destroying/recreating is the issue, look into the activity lifecycle, and look at onSaveInstanceState and onRestoreInstanceState and such calls Mar 29 08:54:30 - those are for Activity, Fragments have their own counterparts Mar 29 08:54:49 Bah just got it to crash Mar 29 08:54:57 Chainfire> yes it does, it'll remember the state of every UI element that has an ID, pretty much Mar 29 08:55:01 why is that btw? Mar 29 08:55:34 I guess it does that because it needs the id as key to store/retrieve the information Mar 29 08:55:39 I have not looked into that in-depth Mar 29 08:56:22 bbdude a good way to test this is to enable the "Settings->Developer Options->Don't keep activities" setting Mar 29 08:56:30 this will destroy your activity as soon as you leave it Mar 29 08:56:45 returning to it immediately will crash if you don't have all of this handled correctly Mar 29 08:57:07 Will it keep a reference to what activity it needs to recreate if I press back? Mar 29 08:57:11 note that this doesn't play nice with activities started for results, for some reason (may be my coding) Mar 29 08:57:25 I'll try that now, sounds interesting Mar 29 08:57:35 bbdude use the home button, not the back button Mar 29 08:57:39 the back button closes the activity Mar 29 08:57:44 the home button hides it Mar 29 08:57:59 finish() ends activity righT? Mar 29 08:58:03 yes Mar 29 08:58:07 is that what the back button's doing? Mar 29 08:58:13 pretty much Mar 29 08:58:43 don't ask me too much about Android navigation, only a handful of devs fully understand it, and users certainly don't... Mar 29 08:58:51 I figured that, it's kinda weird when I see startActivityForResult() and then finish() immediately afterwards Mar 29 08:59:18 there's up, back, and home, and who knows what else lol Mar 29 08:59:33 and none of these things ever do what you instinctively expect them to do Mar 29 08:59:44 NavigateUpFromSameTask, don't get it Mar 29 08:59:55 appears to kill previous task and recreate it Mar 29 08:59:59 er, activity Mar 29 09:00:14 apparently it references a pre-specified parent in the manifest Mar 29 09:00:24 yes it does Mar 29 09:00:32 but it recreates the parent, which is kinda weird to me Mar 29 09:00:55 try setting the parent's launchMode to singleInstance or smth Mar 29 09:02:17 will startActivity and startActivityForResult always recreate the activity? Mar 29 09:02:26 rather, create a new instance? Mar 29 09:02:44 unless you change the launchMode, yes Mar 29 09:03:02 okay, that's cool with me Mar 29 09:03:31 you could I guess make a bad comparison between doing "new Object()" by default or the static "Object.getInstance()" :) Mar 29 09:04:12 right Mar 29 09:04:36 speaking of singleton, I set up my fragments to do that for sanity Mar 29 09:04:42 is that the worst idea ever Mar 29 09:04:58 because I heard that it goes against the android m/o on fragment lifecycle Mar 29 09:04:59 elaborate Mar 29 09:05:28 well, I have 4 fragments in my main activity that only exist once and I only want one reference to them ever, so I made them singleton and use getinstance to get a reference Mar 29 09:05:41 because I found i was constantly trying to get data to and from them Mar 29 09:05:44 To add stuff to my database, I should use values.put(column, data) and then db.insert(table, null, values), right? Mar 29 09:07:07 you made the fragment variables singletons? if your activity would be launched multiple times ( == multiple instances) calls from one activity would call the fragment in a different activity Mar 29 09:07:11 that doesn't sound right Mar 29 09:07:38 autrilla> pretty much Mar 29 09:08:04 Chainfire, hm. I'm doing pretty much that and I'm getting table farms has no column named farms (code 1): , while compiling: INSERT INTO farms(farms) VALUES (?) Mar 29 09:08:37 And I'm doing values.put("name", name); db.insert("farms", null, values) Mar 29 09:08:50 Chainfire I see what you mean. In this particular circumstance, they exist in an activity that should only exist once, so I think I should just set the launchmode for the activity to singleInstance Mar 29 09:09:21 I only use them in that one activity so I should be fine, but yeah, that would be pretty bad if I used them in multiple activities Mar 29 09:10:00 bbdude> if you only use them from one activity instance, why would you make them a singleton anyway? Mar 29 09:10:05 autrilla> not sure Mar 29 09:11:24 bbdude> why not in your activity's onCreate do something like getFragmentManager().findFragmentById(R.id.yourfragment) for each fragment and have non-static references? Mar 29 09:12:48 Chainfire, I have methods in my fragment class that I call from outside the fragment to change stuff inside of the fragment. The methods referenced stuff that would only be there had the fragment been instantiated, and since I was a little noobish on the lifecycles of android things, I wanted to be sure that I had a fragment to reference Mar 29 09:13:10 The ViewPager was basically recreating my fragments as they lost focus Mar 29 09:13:23 right, several things: Mar 29 09:13:35 - your use of singletons here is bad, I would urge to recode that Mar 29 09:13:44 - there's an option somewhere for viewpage to not do this nonsense Mar 29 09:14:02 Yeah, you can set it so it keeps all of them "running" when not in focus Mar 29 09:14:21 I should probably do that Mar 29 09:15:08 Duly noted on the bad use of singletons, unfortunately I may have to ship with my stupidity intact as long as it works Mar 29 09:15:46 you have to ship what you have to ship, what works works, and getting the job done may be more important than getting the job done perfectly, you'll get no argument from me there :) Mar 29 09:16:30 sooner or later it will probably bit you in the ass, somehow, though Mar 29 09:23:19 what's the best way to display tabular data in android? Mar 29 09:24:17 I looked at GridView, but it isn't what I'm looking for Mar 29 09:25:12 just a classic table with a header row, rows and columns Mar 29 09:25:44 at this point after some googling I'm seriously considering just putting in a WebView with generated HTML, but I'd rather avoid that if I can Mar 29 09:26:17 itamz sounds bad, right, but the last time I ran into this issue with a large amount of data that needed to be displayed tabularly, that's exactly what I did Mar 29 09:27:00 yeah, sounds like the path of least resistance Mar 29 09:33:42 ok guys I got a problem Mar 29 09:34:30 I got a listview at the top and I want the picture and details to pop up at the bottom when I long press each item Mar 29 09:34:57 the problem is the details pops up but it goes past the bottom of the screen Mar 29 09:35:38 I need it to stay in the screen and make listview move up and shrink so it gets a scrollbar Mar 29 09:35:58 but I need it to be LinearLayout vertical Mar 29 09:35:59 what's your layout like Mar 29 09:36:28 and LinearLayout doesn't support android:layout_alignParentBottom Mar 29 09:36:40 of course not Mar 29 09:37:09 but I feel there is still a way , there has to be Mar 29 09:37:18 what's the issue Mar 29 09:37:20 I just don't know yet Mar 29 09:37:21 what is your alyout like Mar 29 09:37:39 RelativeLayout? Mar 29 09:37:45 ? Mar 29 09:38:06 yes and that's inside another vertical LinearLayout Mar 29 09:38:38 I mean the contents of the view for details is vertical, and then that's inside another vertical with listview Mar 29 09:38:40 so yeah Mar 29 09:38:56 LoaderCallbacks with a Cursor, how can I tell the cursor the data is invalid? Mar 29 09:38:59 do any of them have a fixed height Mar 29 09:39:04 no Mar 29 09:39:21 fill_parent Mar 29 09:39:33 have the listview fill the remainging space of the linearlayout Mar 29 09:40:06 yuizy: is that fill_parent or match_parent ? Mar 29 09:40:14 use weights Mar 29 09:41:17 ok I'll try that but I don't know how that insures alignment with the bottom on all screen sizes Mar 29 09:41:47 right now the listview seems to expand at the top and push the details off the screen if its a small screen Mar 29 09:42:11 that should not happen if you don't have fixed heights Mar 29 09:42:12 but if I pop up the details at the top , the listview actually behaves correctly and fits itself at the bottom Mar 29 09:43:11 yuizy: ok I'll search around for a fixed height and try weights, thanks for the tips Mar 29 09:44:39 The fill_parent is old name for match_parent. Mar 29 09:44:52 oh ok Mar 29 09:45:00 they need to stop changing things Mar 29 09:45:07 ;) Mar 29 09:46:28 shmooz, you could pretend the detailView is always there when making things how you want it for the long press, and then programmatically do setVisibility(View.GONE) or View.VISIBLE when you long press Mar 29 09:46:48 bbdude: I do that Mar 29 09:47:02 guys now you use which version kernel? Mar 29 09:55:57 ademoglu: people test on different versions Mar 29 09:56:10 I test on 4.4.2 and 2.3.3 Mar 29 09:57:47 hello all Mar 29 10:01:09 shmooz, android version != kernel version, but he could've been mistaken lol Mar 29 10:03:51 oh ok right, thanks for being precise bbdude :) Mar 29 10:04:21 my kernel version on the 4.4.2 is 3.4.0-gac9222c Mar 29 10:05:58 and on the 2.3.3 its 2.6.35.10... Mar 29 10:07:01 bankai_au th only advice i can give for testing rx, is to look at the rxjava unit tests. remember, everything is synchronous unless you specify obServeOn or subscribeOn Mar 29 10:07:15 unit testing is for chumps Mar 29 10:07:17 :) Mar 29 10:14:52 any familiar with animation in android? both view animation and bitmap animation? Mar 29 10:52:30 Hi Mar 29 10:53:46 Question : http://stackoverflow.com/questions/22626132/why-some-broadcast-receiver-can-only-be-registered-through-androidmanifest Mar 29 11:00:30 Willams it's simply not true Mar 29 11:00:41 you can register ACTION_SCREEN_ON/OFF in code Mar 29 11:00:44 I've done it lots of times Mar 29 11:01:09 I know several cases where its the other way around Mar 29 11:01:24 i.e. they don't work if registered through manifest - but afaik they all work through code Mar 29 11:30:46 hey. does anyone here have experience with actionbar tabs and fragments? Mar 29 11:31:00 just ask Mar 29 11:31:07 ^ Mar 29 11:32:04 I've modified the standart template offered by android studio and now I'm trying to set the fragment content everytime the OnTabSelected method is called. The data are not set consistiently. sometimes they are set, sometimes not - most times not. Mar 29 11:35:32 *So the question's: How can I make sure the data is entered correctly once I switch the item on the viewpager / tab? Mar 29 11:37:23 you're using viewpager? Mar 29 11:38:34 Yes, I think so. I'm pretty new to Java / Android (Used C# before). I just used the EmptyActivity template with the tab swiper preset :) Mar 29 11:39:03 I never used any presets Mar 29 11:39:07 mmhm Mar 29 11:39:38 can you put some code on a pastebin Mar 29 11:42:18 Yes, of course. Wait a sec Mar 29 11:43:22 Zharf, sent the link to you via query Mar 29 11:50:12 yeah you're not understanding fragments Mar 29 11:50:36 Okay =0 Mar 29 11:51:18 plus your C# background is showing Mar 29 11:51:34 you shouldn't make the first character of a function name upper case :) Mar 29 11:51:41 it makes them look like class names Mar 29 11:51:50 They way you say it makes it sound like he accidently dropped his pants. Mar 29 11:52:04 xD Mar 29 11:52:20 ha Mar 29 11:52:21 "hey, pssh, your C# is showing" Mar 29 11:52:34 Well, I learned to camelize variables and to Write write method-names like that Mar 29 11:52:47 Guess so.. Just started using Android // Java thursday ^^ Mar 29 11:53:51 I'll fix those method names asap. But, do you know where I actually can load the data for the fragment? Mar 29 11:58:25 I'll need to study it more after this episode of B5... you might get somenoe to do that faster if you link it on the channel too Mar 29 11:59:23 Okay, thanks a lot for your help! Mar 29 11:59:23 http://pastebin.com/YymUQYvY Mar 29 11:59:41 ^ The link we've been talking about. Would be really really happy if anyone can help me. Mar 29 12:08:14 Chainfire : As I know, this does not work when you register this in your code Mar 29 12:08:51 This receiver : SCREEN_ON, SCREEN_OFF and ON Mar 29 12:10:11 Willams as I said, you are wrong Mar 29 12:10:16 those do work, so you're doing something else wrong Mar 29 12:11:04 okay might be, there are others also which works same, need to either register through only code or some time only through AndroidManifest.xml, reason why it so ? Mar 29 12:11:26 because you're doing something wrong Mar 29 12:11:33 I've never run into a case where a receiver didn't work through code Mar 29 12:13:41 Busk, mmhm, you're downloading some data and parsing it and then setting views based on that data... but those views are in fragments, right? Mar 29 12:14:03 in one fragment, yes Mar 29 12:14:21 Those data change based on the tab viewed, but all tabs have the same fragment / layout. Mar 29 12:14:31 you should have the fragment handle its own data Mar 29 12:15:20 Okay, so download and parse the data in the fragment onCreateView, right? Mar 29 12:15:34 no... Mar 29 12:15:43 oh, sorry ^^ Mar 29 12:15:45 Where then? Mar 29 12:16:09 it's a little difficult to get a proper idea of this mess you have ;) Mar 29 12:18:02 I really am sorry for having this kind of a mess there. It's just such a big change from C# to Java. While most syntax is the same, the way both works are fundamentally different. Mar 29 12:20:28 that's nothing to be sorry about Bush, it happens to most who switch at first. The big chance is really not C# to Java, that's just syntax, it's that Android completely 'reinvented' the window, UI parts, etc Mar 29 12:21:08 fragments confuse people even more :) Mar 29 12:21:17 I'm trying to think how this thing should be done Mar 29 12:21:59 I'd love to exclude the fragment part, but I need those tabs. The app's going to be a timetable for my school ("Stundenplan" in German, hence the name of the project on top). Mar 29 12:22:33 you really don't want to exclude fragments, they're awesome Mar 29 12:22:38 :) Mar 29 12:22:51 but could be creating more confusion for newcomers Mar 29 12:23:02 Chainfire, thanks for the kind words. Android really is different from WPF and WinForms Mar 29 12:26:18 let's just ignore the fact that a fragment doesn't have to have a layout... a fragment is a piece of a machine that has its own view and its own logic... you can have multiples of one fragment and they could work on different set of data to look slightly different... which is what you have here Mar 29 12:26:59 Okay, I guess I understand. Kind of like an activity inside an activity... Right? Mar 29 12:27:19 you could think of it as such Mar 29 12:27:54 a fragment has its own lifecycle, much like an activity... with it's onCreate, onCreateView, onStart, onStop, onPause, onResume, etc... Mar 29 12:28:39 Okay, I see. Mar 29 12:29:05 and it has it's layout has views that should not be touched by other fragments/activity directly Mar 29 12:29:25 what kind of data are you downloading? timetable for one day? Mar 29 12:30:22 or is it whole week or something Mar 29 12:30:33 Well, at the moment I'm downloading all the timetables and ones, split them into a Map. That map contains the keyword "Day;Lesson" and a "TimeTable" object. the object itself carries all data known for that specific lesson. Mar 29 12:30:42 whole week it is. Mar 29 12:31:37 it'd be slightly easier to implement/understand if each download had a single day, but that's fine... Mar 29 12:32:18 for starters, remove those fill methods Mar 29 12:32:56 /done Mar 29 12:33:32 just put the data structure in some field in the activity Mar 29 12:33:56 Sorry, what do you mean by that? Mar 29 12:34:34 you have it already, apparently.. the timeTable map Mar 29 12:34:57 Ah, okay Mar 29 12:35:48 next, you had all these findViewById's... I assume that the id's were actually in the fragment layout Mar 29 12:36:21 yes Mar 29 12:38:19 in the fragment's onViewCreated find all those id's from the view parameter in that function and put them into fields, so you don't have to find them again Mar 29 12:38:23 Simplest way to interact with a JSON API in Android? Mar 29 12:38:26 Willams> if you're wondering why some intents cannot be received by declaring them in the manifest, these intents are sent with the FLAG_RECEIVER_REGISTERED_ONLY flag Mar 29 12:38:32 Cyph0n_, olley Mar 29 12:38:34 volley* Mar 29 12:38:45 Cyph0n_: REST or SOAP? Mar 29 12:38:45 Zharf, thanks, I'll check it out Mar 29 12:38:50 gdrc, REST Mar 29 12:38:58 Cyph0n_, coupled with gson :) Mar 29 12:39:01 volley is ok Mar 29 12:40:49 Zharf, when I find those id's from the findViewByID in the onCreateView of the fragment, he tells me that: "non-static method 'findViewById(int)' cannot be referenced from a static context" Mar 29 12:41:24 Busk: do you even java?? 8-)... you tried to call findViewById (which is non static) in a static method.. Mar 29 12:41:50 no, i try to java. I usually c# :P Mar 29 12:42:10 which should have the same syntax here afaik Mar 29 12:42:37 Busk: http://www.dotnetperls.com/static-method "a static method cannot access non static members" Mar 29 12:42:44 Busk: so.. do you even c#?? 8-)) Mar 29 12:42:52 yeah, I just tried to do what Zharf told me. Guess I just misunderstood him. Mar 29 12:43:25 Problem's I don't really get fragments, yet. I thought my fragment's an object class and not static. Mar 29 12:43:28 onCreateView is not supposed to be static Mar 29 12:43:38 Busk: seems like you marked onViewCreated as static.. did you put a @Override annotation above your method? Mar 29 12:43:40 Well he just tells me it is. Mar 29 12:43:50 yes, @override is set. Mar 29 12:43:55 oO Mar 29 12:44:01 Busk: !paste Mar 29 12:44:07 hm Mar 29 12:44:10 hows that bot workin? Mar 29 12:44:11 found the error Mar 29 12:44:18 the fragment class itself was static Mar 29 12:44:22 lol Mar 29 12:44:33 It's the one generated by android studio itself. Mar 29 12:44:37 oO Mar 29 12:44:53 I doubt that android studio created a static subclass of fragment Mar 29 12:44:57 You know, the template the setup offers you when you create a new activity... Mar 29 12:45:15 my templates do not contain a static keyword in front of class Mar 29 12:45:32 i doubt anybody's do Mar 29 12:45:36 yes Mar 29 12:45:45 that would be silly Mar 29 12:46:00 and there is no silliness in Android Mar 29 12:46:09 if you select new activity, blank activity and choose under "additional features" the "action bar tabs (with viewpager)" you'll see yourself Mar 29 12:46:12 ok I would doubt that as well but I agree with static 8-)) Mar 29 12:46:21 Busk: lemme try Mar 29 12:46:24 Why is a static inner class silly? Mar 29 12:46:39 the inner class being static still should not trigger that error Mar 29 12:47:02 SimonVT: what inner class? did Busk pasted code I've overseen? Mar 29 12:47:12 http://pastebin.com/YymUQYvY Mar 29 12:47:22 i didnt see a static inner class either Mar 29 12:47:24 Well, if the class is static, it has to be an inner class Mar 29 12:47:34 aw, damn. that pastebin got deleted already Mar 29 12:47:56 Busk instead of changing the class to be non-static, try getActivity().findViewById() instead of just findViewById() Mar 29 12:47:57 it indeed is an inner class Mar 29 12:48:08 Okay, thanks Chainfire. I'll do that. Mar 29 12:48:21 Busk, like I said, call findViewById on the view parameter of the function Mar 29 12:48:34 or if you are calling v = inflater.inflater in onCreateView, then v.findViewById() Mar 29 12:48:55 ah, you mean the viewgroup. okay. done. Mar 29 12:49:12 onViewCreated(View view, Bundle s) { foo = view.findViewById(R.id.foo); } or something Mar 29 12:49:46 View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Mar 29 12:49:48 also good - but he was using onCreateView before this Mar 29 12:50:14 Ionly use onCreateView for actaully creating the view Mar 29 12:50:21 then onViewCreated for finding stuff from the view Mar 29 12:50:23 but that's just me :) Mar 29 12:50:30 you could do it all in onCreateView Mar 29 12:50:51 in that case, container.findViewById is correct? Mar 29 12:50:58 as container is a ViewGroup object Mar 29 12:51:49 it doesn't have to be a viewgroup to findviewbyid's from it :) Mar 29 12:52:47 Don't call it on the container, call it on the view you're inflating Mar 29 12:53:09 Busk, maybe it is handy if you pastebin your onCreateView code Mar 29 12:54:22 Okay, a sec Mar 29 12:55:51 http://pastebin.com/m2H27sz8 Mar 29 12:56:28 Busk right, rootView.findViewById, seems fine Mar 29 12:59:32 Okay, now I'll have to wait for Zharf as I have no idea what his intention was :D Mar 29 13:00:10 sorry, waiting for taxi... ircing on phone now :p Mar 29 13:00:19 Zharf, I'm using Android Studio. How do I import the volley src into my project? Mar 29 13:00:32 Busk: Basically, don't manipulate the fragments views outside of the fragment.. Tell the fragment where/what data to get or notify it when there's new data Mar 29 13:00:58 my intention is that when the data download is complete the activity can tell what data the fragments should use Mar 29 13:01:11 tell the fragments* Mar 29 13:01:39 By keeping a reference to the Fragment and call a setData method, or use an eventbus or something else Mar 29 13:02:44 you can iterate the fragments from fragment manager too, options are almost limitless ;) Mar 29 13:03:19 fragmentpageradapters are a little tricky in this though, I've found Mar 29 13:05:07 I see... Can I access the data getActivity().timeTable, too? Mar 29 13:05:14 *by Mar 29 13:06:02 technically, but you shouldn't do that from dataflow point of view Mar 29 13:06:20 also you'd need to cast to the right activity type Mar 29 13:06:44 Activity activity = getActivity(); Mar 29 13:06:49 yes! finally did it, thanks yuizy , weight worked ! Mar 29 13:07:08 if(activity instanceof MainActivity) Mar 29 13:07:13 and then a cast to MainActivity ? Mar 29 13:07:24 shmooz: gz! Mar 29 13:08:01 Busk, the problem with this is that you don't know when the data updates, you should just pass the data from the activity to the fragments Mar 29 13:08:10 its actually more complicated cause I have hidden horizontal views for when the user rotates so the details will show on the left instead of bottom Mar 29 13:08:28 but I figured out where to put the weight=1 so now it doesn't overflow at the bottom Mar 29 13:08:45 Why not use layout-land? Mar 29 13:09:32 Zharf, I don't know how to properly pass the data while I know how to cast that. I don't want to annoy you guys for hours with my stuff. Mar 29 13:10:37 Busk, easy way (but not necessarily the best) is to getFragmentManager().getFragments() and iterate that Mar 29 13:11:14 could be getSupportFragmentManager Mar 29 13:14:47 So I'll iterate that and push the map into the fragments? Mar 29 13:14:50 Cyph0n_, sorry... um... I'm not sure how android studio is different from intellij idea, but import module from sources? Mar 29 13:14:57 Busk, mmhm Mar 29 13:20:44 Android makes me lose my mind. Mar 29 13:20:56 :( Mar 29 13:21:05 never tried ios Mar 29 13:22:37 it's all about persistance Mar 29 13:22:48 never give up! Mar 29 13:22:59 just take breaks Mar 29 13:23:12 :) Mar 29 13:23:35 conflicting advice Mar 29 13:24:21 when frustrated Mar 29 13:25:19 ok now the next thing to get frustrated about is how do I set the damn spinner to show black background without loosing its 3D looks Mar 29 13:25:35 losing Mar 29 13:26:10 why is it called a spinner anyway Mar 29 13:26:19 I guess I have to find an image Mar 29 13:26:39 no idea, they should have called it a dropdownBox Mar 29 13:27:01 some call it a comboBox some called it optionBox Mar 29 13:27:12 it doesn't even spin Mar 29 13:27:26 maybe because of the movement you make when you scroll down on a touchscreen Mar 29 13:28:18 in html they call it