Comments (6)
This took me hours to find the cause after stripping my entire application. Does anyone have a good work around for this?
from androidslidinguppanel.
I'll look into the bug when I have time, work around: manually set the title for the action bar.
from androidslidinguppanel.
Looking at the problem description a little closer, my problem is a little different. The DrawerItemClickListener is never triggered when clicking an item. It simply closes the drawer as if there was no selection.
from androidslidinguppanel.
You can test by putting the DrawerLayout xml around the SlidingUpPanelLayout as shown below. As soon as you remove the SlidingUpPanelLayout, the DrawerLayout items become clickable.
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/fragment_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#111"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
<com.sothree.slidinguppanel.SlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Main Content"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:text="The Awesome Sliding Up Panel"
android:textSize="16sp" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</android.support.v4.widget.DrawerLayout>
from androidslidinguppanel.
I solved the problem. I needed to move the ListView outside of the SlidingUpPanelLayout. This will make the items clickable as well as change the action bar title
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/fragment_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<com.sothree.slidinguppanel.SlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Main Content"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:text="The Awesome Sliding Up Panel"
android:textSize="16sp" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#111"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
from androidslidinguppanel.
It looks good. Thanks.
from androidslidinguppanel.
Related Issues (20)
- Cause: org/gradle/api/tasks/testing/AbstractTestTask
- java.lang.IllegalArgumentException happened occasionally
- Very Good HOT 1
- Scroll RecyclerView when panel is at Anchored Point HOT 2
- Slideable view - margin left and right
- Question: Is there an easy way to dismiss panel when user taps on main content? HOT 1
- DrawerLayout with SlidingUpPanel doesn't fit system windows HOT 1
- Ridiculous bug. Panel refuses to expand!
- default grey line on top of sliding panel which needs to expand or collapsed HOT 1
- 🔴🔴🔴 IMP Repo seems dead, New commits at https://github.com/hannesa2/AndroidSlidingUpPanel/
- Black space between main and draggable content on new Samsung devices
- mLastMotionY 数组越界问题
- Change position of a specific view in SlidingUpPanel Layout. HOT 1
- Rounded Corners at the top
- SlidingUpPanel with BottomNavigation Help ....
- never recalculate the layout height after replace it programmatically
- com.sothree.slidinguppanel.SlidingUpPanelLayout.onMeasure (SlidingUpPanelLayout.java:803)
- Build Analyzer found problems for update to AndroidX (Jetifier)
- Avoid panel collapsewhen click in screen. HOT 2
- Drawable drawable/above_shadow has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int). HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidslidinguppanel.