2

Basically using this library sliding menu jfeinstein_slidingMenu and on a button click posted this code :

        SlidingMenu menu = new SlidingMenu(this);
        menu.setMode(SlidingMenu.RIGHT);
        menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
        menu.setShadowWidthRes(R.dimen.shadow_width);
        menu.setShadowDrawable(R.drawable.shadow);
        menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
        menu.setFadeDegree(0.35f);
        menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
        View imgPanView = getLayoutInflater().inflate(R.layout.dropdown, null);

        menu.setMenu(imgPanView);
        menu.showMenu(true);

This is working fine code but on many times u click on and off slidemenu then it make app crash with following logcat . Instead i thought i using nested view inflating layout so when i tried single image in layout as well it is crashing on many clicks so not the issue of nested views but somehow different one may be !!!

Logcat

E/.UnCaughtException(23025): Phone Model: HTC One X

E/.UnCaughtException(23025): Android Version: 4.2.2
E/.UnCaughtException(23025): Board: unknown
E/.UnCaughtException(23025): Brand: htc
E/.UnCaughtException(23025): Device: endeavoru
E/.UnCaughtException(23025): Host: abm035
E/.UnCaughtException(23025): ID: JDQ39
E/.UnCaughtException(23025): Model: HTC One X
E/.UnCaughtException(23025): Product: htc_asia_india
E/.UnCaughtException(23025): Type: user
E/.UnCaughtException(23025): Total Internal memory: 2266497024
E/.UnCaughtException(23025): Available Internal memory: 283291648
E/.UnCaughtException(23025): Stack:
E/.UnCaughtException(23025): java.lang.StackOverflowError
E/.UnCaughtException(23025): at android.text.Layout.draw(Layout.java:205)
E/.UnCaughtException(23025): at android.text.BoringLayout.draw(BoringLayout.java:400)
E/.UnCaughtException(23025): at android.widget.TextView.onDraw(TextView.java:5272)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13877)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.support.v4.view.ViewPager.draw(ViewPager.java:2171)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13759)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.dispatchDraw(CustomViewAbove.java:827)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.dispatchDraw(CustomViewAbove.java:827)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13880)
E/.UnCaughtException(23025): at android.view.View.draw(View.java:13761)
E/.UnCaughtException(23025): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
E/.UnCaughtException(23025): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2815)
E/.UnCaughtException(23025): at com.jerem
Hamid Shatu
  • 9,664
  • 4
  • 30
  • 41
Rizvan
  • 2,335
  • 2
  • 23
  • 42
  • It is StackOverflow error many number of views on onclick of sliding menu refer http://stackoverflow.com/questions/9946368/stackoverflow-caused-by-nested-views – kalyan pvs Mar 20 '14 at 06:08

1 Answers1

0

I would recommend using the onboard android component 'SlidingDrawer'. This is very similar to the slider panel which you are trying to use. And it works quite efficiently.

Visit http://developer.android.com/reference/android/widget/SlidingDrawer.html

zIronManBox
  • 4,967
  • 6
  • 19
  • 35