安卓:SlidingDrawer和放大器;错误的显示 [英] Android : SlidingDrawer & wrong display

查看:113
本文介绍了安卓:SlidingDrawer和放大器;错误的显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不使用SlidingDrawer在我的应用程序。我知道这个类是德precated,但它非常有用做什么,我想,所以我决定使用它。

I have to use SlidingDrawer in my app. I know this class is deprecated but it very useful to do what i want so i have decided to use it.

我用这个链接

<一个href="http://stackoverflow.com/questions/3654492/android-can-height-of-slidingdrawer-be-set-with-wrap-content/4265553#4265553">Android:可以SlidingDrawer的高度来设置WRAP_CONTENT?

为了使用WRAP_CONTENT当SlidinDrawer是开放的。它完美的作品在Android 4.2.2与AOSP ROM但对SGSII(三星ROM)的Andr​​oid 4.0.4,我有一些显示问题,当我打开或关闭SlidingDrawer。如果没有动作,则小部件显示正确。

in order to use wrap_content when the SlidinDrawer is open. It works perfect on android 4.2.2 with AOSP rom but with android 4.0.4 on SGSII (Samsung rom), i have some display problem when i open or close the SlidingDrawer. If there is no action, the widget appears correctly.

你有任何想法,为什么会出现这个问题呢?

Have you any idea why there is this problem ?

编辑:下面是截图。问题就消失了,当我把截图,所以看到这个问题我采取了与其他设备中的照片。

Edit : Here is a screenshot. The problem disappeared when i took a screenshot, so to see the problem i took a photo with another device.

推荐答案

替代品SlidingDrawer是自定义滑动抽屉。

Alternate to SlidingDrawer is "Custom Sliding Drawer".

萨菲罗斯创造之一它。它有选择上下滑动。它具有的处理程序是用来象实际手柄打开和关闭的滑动抽屉。

Sephiroth has created one of it. It has option to sliding up and down. It has handler which is used like actual handle to open and close Sliding Drawer.

我会建议你实现这一习俗之一。这将解决您的问题。

I will suggest you to implement this custom one. This will solve your problem.

您只需要定义你的布局如下

You just need to define following in your layout

<view class="it.sephiroth.demo.slider.widget.MultiDirectionSlidingDrawer"
     xmlns:my="http://schemas.android.com/apk/res/it.sephiroth.demo.slider"
     android:id="@+id/drawer"
     my:direction="topToBottom"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     my:handle="@+id/handle"
     my:content="@+id/content">

     <include android:id="@id/content"
         layout="@layout/pen_content" />

     <imageview android:id="@id/handle"
          android:layout_width="wrap_content"
          android:layout_height="40dp"
          android:src="@drawable/sliding_drawer_handle_bottom" />
</view>

这就是它。你的滑动抽屉的准备工作。

Thats it. Your sliding drawer is ready to work.

这篇关于安卓:SlidingDrawer和放大器;错误的显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆