Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓4.4滑动手柄消失_Android - Fatal编程技术网

Android 安卓4.4滑动手柄消失

Android 安卓4.4滑动手柄消失,android,Android,形象 当手柄下降时,手柄消失了 此问题仅在版本4.4中出现 版本4.0~4.3正常 如何解决 PS:原来的Android SlideDrawer也有同样的问题 密码 布局 } <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="f

形象

当手柄下降时,手柄消失了

此问题仅在版本4.4中出现

版本4.0~4.3正常

如何解决

PS:原来的Android SlideDrawer也有同样的问题

密码

布局

}

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#e0e0e0" >

<LinearLayout
    android:id="@+id/openglview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

</LinearLayout>

 <ImageButton
    android:id="@+id/gl_auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_centerVertical="true"
    android:background="@drawable/button_style"
    android:src="@drawable/auto_rotate" />


 <ImageButton
    android:id="@+id/gl_reset"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_centerVertical="true"
    android:background="@drawable/button_style"
    android:src="@drawable/reset" />


<com.example.aec3d.WrappingSlidingDrawer   
    android:id="@+id/slidingDrawer"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:handle="@+id/handle"
    android:content="@+id/content"
    android:allowSingleTap="true"
    android:animateOnClick="true"
    android:layout_alignParentBottom="true" >

    <ImageView
        android:id="@+id/handle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/info"/>
    
    <LinearLayout
        android:id="@+id/content"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#FFFFFF"
        android:orientation="vertical" >

    <TextView
        android:id="@+id/textView_price"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="#000000"
        android:textStyle="bold" />

    <TextView
        android:id="@+id/textView_info"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text=""
        android:textColor="#000000" />

    </LinearLayout>
    

</com.example.aec3d.WrappingSlidingDrawer>
public class WrappingSlidingDrawer extends SlidingDrawer {

public WrappingSlidingDrawer(Context context, AttributeSet attrs,
        int defStyle) {
    super(context, attrs, defStyle);

    int orientation = attrs.getAttributeIntValue("android", "orientation",
            ORIENTATION_VERTICAL);
    mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
    mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}

public WrappingSlidingDrawer(Context context, AttributeSet attrs) {
    super(context, attrs);

    int orientation = attrs.getAttributeIntValue("android", "orientation",
            ORIENTATION_VERTICAL);
    mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
    mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

    int widthSpecMode = MeasureSpec.getMode(widthMeasureSpec);
    int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec);

    int heightSpecMode = MeasureSpec.getMode(heightMeasureSpec);
    int heightSpecSize = MeasureSpec.getSize(heightMeasureSpec);

    if (widthSpecMode == MeasureSpec.UNSPECIFIED
            || heightSpecMode == MeasureSpec.UNSPECIFIED) {
        throw new RuntimeException(
                "SlidingDrawer cannot have UNSPECIFIED dimensions");
    }

    final View handle = getHandle();
    final View content = getContent();
    measureChild(handle, widthMeasureSpec, heightMeasureSpec);

    if (mVertical) {
        int height = heightSpecSize - handle.getMeasuredHeight()
                - mTopOffset;
        content.measure(widthMeasureSpec,
                MeasureSpec.makeMeasureSpec(height, heightSpecMode));
        heightSpecSize = handle.getMeasuredHeight() + mTopOffset
                + content.getMeasuredHeight();
        widthSpecSize = content.getMeasuredWidth();
        if (handle.getMeasuredWidth() > widthSpecSize)
            widthSpecSize = handle.getMeasuredWidth();
    } else {
        int width = widthSpecSize - handle.getMeasuredWidth() - mTopOffset;
        getContent().measure(
                MeasureSpec.makeMeasureSpec(width, widthSpecMode),
                heightMeasureSpec);
        widthSpecSize = handle.getMeasuredWidth() + mTopOffset
                + content.getMeasuredWidth();
        heightSpecSize = content.getMeasuredHeight();
        if (handle.getMeasuredHeight() > heightSpecSize)
            heightSpecSize = handle.getMeasuredHeight();
    }

    setMeasuredDimension(widthSpecSize, heightSpecSize);
}

private boolean mVertical;
private int mTopOffset;