"Your success will not be determined by your gender or your ethnicity, but only on the scope of your dreams and your hard work to achieve them." -Zaha Hadid (source)
I'm not the most familiar with everything in every language I use. I just kind of get by and when I need to do something new it takes me a few days to pick up how
For android wear yeah. I'm having a big issue with not being able to set a textview's text right now. It's holding my project back.
without any help though I managed to get a button that causes the smart watch to vibrate working... so that's interesting.
My intention is to make a set of digital pets you download onto the watch which make the device vibrate and buzz you randomly through out the day (maybe even night if you don't set sleep hours), and when it does it pops up with what the pet wants and a simple glance UI to choose to do it. Ie FEED. Play. Etc. It won't have any fancy animations. Or sprites.
It will though have maybe an icon for the pet..
Instead of having the pet be interactable it's going to be more of a grinding app. You will level the pet up by interacting with it. eventually causing it to do certain things.
In java if a object is a member of a class and you initialize it in a function scope but then try to access it outside that function's scope but still within the class's functions, is it void or null?
on Line 77 setText is not valid for mTextView and returns a nullpointer issue..
If it were uncommented.
If line 65 were uncommented however, at that scope it causes no error.
I'm pissed off because the scope I want mTextView to be valid within is outside of the scope of the function: public void onLayoutInflated(WatchViewStub stub) {
once mTextView has a reference to an object it should stay referenced even after the function onLayoutInflated has ended execution. I don't know why it doesn't work that way. mTextView is a class member therefore within class scope it should be valid after it's been initialized to some<arbitrary>object.. why.. doesn't this work.
Blue Drop, Familiar of zero (not all of it), Some Fairy Tale, I used to think Gundam Seed was cool but meh, Log Horizon haven't finished it yet. there's more just can't think of them right now.
Why can't I keep the object reference mTextView alive outside the scope of the function where it was assigned and casted?
it is a class member.
https://pastebin.com/BRVwU635 on line 77 mTextView throws a nullreference error IF you uncomment line 77. It works within any scope within: @Override public void onLayoutInflated(WatchViewStub stub) { though.
Better yet, how can I force java (or the android API) to hold a static reference of it once assigned so that it doesn't become null again outside the scope that declared it.
Alright so.. like normaly right? i'm doing this coming from C#, if you set an object to be intialized in a function in C#, then anything else in the class will keep that reference if it's a CLASS member. Why does this behave differently? Should it behave differently?
So I just need something. The end goal right now is to have a setup where the app starts up then sets up some variables, then when it is not active it has a pending activity that's launched. Every so often a background worker will force the app into focus and set a vibration alert and display the ui Elements which are just a textbox, as well as some buttons.
room topic changed to Java and Android era : Important: Read dos and don'ts here: gist.github.com/droiddev24/fe5ead90fdb3fc17577e2c2c08601fe6. Mark this room as your favorite to stay in touch with! :) [android] [android-layout] [android-studio] [android-wear] [class-design] [design] [design-patterns] [java] [kotlin]
I have a layout below a recycler view when there are more items the recycler view the layout below also scrolls along with it...what could be the problem ? Googled but couldn't find the source of the problem
room topic changed to Java and Android era : Important: Read dos and don'ts here: goo.gl/bjVbxw . Mark this room as your favorite to stay in touch with! :) [android] [android-layout] [android-studio] [android-wear] [class-design] [design] [design-patterns] [java] [kotlin]