Screen on main activity broken
h312m4one opened this issue · 8 comments
Can I see XML of your activity?
Currently touch event's is not dispatched to main layout (in other words - you can't make it clickable). Is it required? When side menu is shown, user should be concentrated on it and not on main layout. Also if you'll look at YouTube app, you'll see that main layout is not clickable. If you still think that this is required - create new issue with explanation about why this is important.
<com.agimind.widget.SlideHolder xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/slideHolder"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ListView
android:id="@+id/menu_list"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:background="#333"
android:cacheColorHint="#333"
/>
<ImageView
android:id="@+id/btnHeader"
android:layout_width="45dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dip"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="@drawable/backgroud_title_btn"
android:clickable="true"
android:contentDescription="@string/app_name"
android:src="@drawable/header_icon"
android:text="@string/app_name" />
<TextView
android:id="@+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/btnHeader"
android:text="@string/app_name"
android:textColor="#ffffff"
android:textSize="19sp" />
<com.markupartist.android.widget.PullToRefreshListView
android:id="@+id/info_berita_list_view"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="5dp">
</com.markupartist.android.widget.PullToRefreshListView>
</com.agimind.widget.SlideHolder>
I think that problem is that you don't set background for LinearLayout (it's transparent currently). I mentioned in README that you must provide some non-transparent background.
Try to set something like android:background="@android:color/white" and let me know if that helps.
Thanks.. work!!
my second question..
How can make clickable at main app, when slide menu was opened??
I provided answer in very first comment in this topic :)
Oh I'm sorry.. I didnt see it :D
This is a excellent library, it is easy to use, now we use it in our project.
Sometime the exception happened, when touch the screen for a long idle time.
Log:
07-02 12:29:17.910: E/AndroidRuntime(3893): FATAL EXCEPTION: main
07-02 12:29:17.910: E/AndroidRuntime(3893): java.lang.IllegalArgumentException: pointerIndex out of range
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.MotionEvent.nativeGetAxisValue(Native Method)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.MotionEvent.getY(MotionEvent.java:2010)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.widget.ScrollView.onTouchEvent(ScrollView.java:588)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.View.dispatchTouchEvent(View.java:7127)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2170)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1905)
07-02 12:29:17.910: E/AndroidRuntime(3893): at com.agimind.widget.SlideHolder.dispatchTouchEvent(SlideHolder.java:486)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2176)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1919)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2176)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1919)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2176)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1919)
07-02 12:29:17.910: E/AndroidRuntime(3893): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1925)
07-02 12:29:17.910: E/AndroidRuntime(3893): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1379)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.app.Activity.dispatchTouchEvent(Activity.java:2396)
07-02 12:29:17.910: E/AndroidRuntime(3893): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1873)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.View.dispatchPointerEvent(View.java:7307)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3172)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3117)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4153)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4132)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4224)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:163)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4203)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4243)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.Choreographer.doFrame(Choreographer.java:523)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.os.Handler.handleCallback(Handler.java:615)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.os.Handler.dispatchMessage(Handler.java:92)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.os.Looper.loop(Looper.java:137)
07-02 12:29:17.910: E/AndroidRuntime(3893): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-02 12:29:17.910: E/AndroidRuntime(3893): at java.lang.reflect.Method.invokeNative(Native Method)
07-02 12:29:17.910: E/AndroidRuntime(3893): at java.lang.reflect.Method.invoke(Method.java:511)
07-02 12:29:17.910: E/AndroidRuntime(3893): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-02 12:29:17.910: E/AndroidRuntime(3893): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-02 12:29:17.910: E/AndroidRuntime(3893): at dalvik.system.NativeStart.main(Native Method)
07-02 12:34:17.980: I/Process(3893): Sending signal. PID: 3893 SIG: 9
@Estejin please, open a new issue for this bug and don't forget to provide your stack trace :)