-
Notifications
You must be signed in to change notification settings - Fork 1
Description
New to github; not sure if this is the right way to ask a question...
I've copied the source code for scroll2d-tut and am trying to build the app (in my own library). I have several questions...
I proceeding iteratively as in the video. When I nest a vertical ScrollView inside a horizontal ScrollView, the app behaves as expected (horizontal or vertical scrolling, but no "diagonal" scrolling).
When I try to introduce the OuterHorizontalScrollView I have problems.
-
I tried using OuterHorizontalScrollView without the "binding" statements in my main activity. The "bigpic" appears, but, the app crashes when I touch the screen with a
"NullPointerException: Attempt to invoke virtual method 'boolean android.widget.ScrollView.onInterceptTouchEvent(android.view.MotionEvent)' on a null object reference" (the scrollView.onInterceptTouchEvent statement) -
Thinking that was surely due to the missing "binding" statements in the main activity, I added then, but I can't compile the app due to "cannot resolve symbol" errors on "import android.databinding.DataBindingUtil" and "ActivityScrollBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
binding.horizontal.scrollView = binding.vertical;"
I have no idea what to do, as I can't find any reference when I google "android studio activityscrollbinding", so I don't know where to go next for information. Have you any suggestions? -
Final question... After updating the methods in the OuterHorizontalScrollView, you said "now I just have to hook up this reference", referring to the "public ScrollView scrollview" statement, and it sounded like you pressed a couple keys, but I don't know what you actually did. Can you tell me?
Thank you!
Thank you.