- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 SlidingUpPanel .一切都很好。 :) 我想要实现的是将图像中面板的背景颜色更改为透明,以便显示它后面的图像部分。我尝试将 SLidingPaneLayout 的背景颜色设置为透明,但它不起作用。当我将颜色更改为其他颜色(如红色)时,它会显示红色,但在透明时不会出现同样的情况。
我也试过将窗口背景设置为透明,但它留下了黑色背景。
Window window = this.getWindow();
window.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
请帮忙。
<?xml version="1.0" encoding="utf-8"?>
<com.app.custom.SlidingUpPanelLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:blurView="http://schemas.android.com/tools"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoDragView="@+id/dragView"
sothree:umanoPanelHeight="110dp"
sothree:umanoParalaxOffset="0dp"
sothree:umanoShadowHeight="0dp">
<!-- MAIN CONTENT -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imgProfileLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="centerCrop"
android:src="@drawable/profile" />
<RelativeLayout
android:id="@+id/layoutDetails"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone">
<com.app.custom.UnscrollableViewPager
android:id="@+id/facesPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true" />
<com.app.custom.CirclePageIndicator
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:padding="10dp" />
</RelativeLayout>
</FrameLayout>
<!-- SLIDING LAYOUT -->
<com.app.custom.FrameLayoutWithBluredBackground
android:id="@+id/dragView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="false"
blurView:blurRadius="20">
<ViewFlipper
android:id="@+id/mViewFlipper"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/layoutImages"
layout="@layout/layout_faces_thumb" />
<LinearLayout
android:id="@+id/layoutMore"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="horizontal">
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:textSize="14sp" />
<Button
android:id="@+id/follow"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textSize="14sp" />
</LinearLayout>
<ImageView
android:id="@+id/imgClickMe"
android:layout_width="match_parent"
android:layout_height="150dp"
android:scaleType="fitStart"
android:src="@drawable/graphic" />
</LinearLayout>
</ViewFlipper>
</com.app.custom.FrameLayoutWithBluredBackground>
最佳答案
尝试将此行添加到您的 SlidingPanel:
sothree:umanoOverlay="true"
并在xml中为背景添加透明:
<com.app.custom.FrameLayoutWithBluredBackground
android:id="@+id/dragView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="false"
blurView:blurRadius="20"
android:background="@android:color/transparent"
>
关于android - SlidingPaneLayout 背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31455285/
我在我的应用程序中使用 NavigationDrawer 作为主菜单。我的一些 fragment 使用了 SlidingPaneLayout。 目前,我在右边显示 NavigationDrawer,在
我想要的是用户第一次打开我的应用程序时,左侧面板可以使用全屏!然后我需要调整它的大小。 最佳答案 阅读 SlidingPaneLayout 源代码后:SlidingPaneLayout.java ,您
我正在尝试使用 SlidingPaneLayout 制作原型(prototype)应用。我的 SlidingPaneLayout 是灰色的,正文 View 是纯白色的。但是当我滑入时,正文页面的小可见
我正在使用 SlidingUpPanel .一切都很好。 :) 我想要实现的是将图像中面板的背景颜色更改为透明,以便显示它后面的图像部分。我尝试将 SLidingPaneLayout 的背景颜色设置为
我正在尝试使用 SlidingPaneLayout。左 View 是 ListFragment,右 View 是详细 View 。布局显示正确,我可以滑动它。但是如果详细 View 在列表前面并且我点
是否有可能以某种方式使用 Android 的 SlidingPaneLayout 来做它所做的,除了从相反的一侧? 即我想滑动屏幕的右侧而不是左侧以显示第二个 Pane ,它从右侧而不是左侧滑入。 理
你好我是 android 的初学者,在我的应用程序中我必须在右侧显示 SlidingPaneLayout 但使用我下面的代码它来自左侧。 请帮帮我。 如何让它在右侧? 第二,我的要求是我的 Slidi
我有一个带有 SlidingPaneLayout 的 Activity,里面有两个 fragment :一个 ListView 在左边,一个 MapFragment 在左边正确的。如何拦截产生的触摸事
我想使用 SlidingPaneLayout.getState();但没有找到。是否被删除以及何时删除? public void showAudioPlayer() { mActivi
是否可以将SlidingPaneLayout的触摸事件限制在屏幕链接的最左边缘发生在DrawerLayout中? 最佳答案 是的,但是您想创建自己的 SlidingPaneLayout 实现并重写 o
我正在尝试创建一个在滑动 Pane 中具有 MapFragment 的应用程序。 map 位于一个 fragment 上,该 fragment 滑开进入主要内容,一个 ListView。但是,我无法完
我正在开发一个带有滑动 Pane 的应用程序并且工作正常,但我不知道如何像 Hangouts Google 应用程序一样放置阴影。 有点难解释,看这个: 我正在尝试使用 setShadowResour
有没有办法让 SlidingPaneLayout 从下往上滑动,而不是从右往左滑动。 最佳答案 试试这个库: https://github.com/umano/AndroidSlidingUpPane
我在我的应用程序中使用了 SlidingPaneLayout,但我遇到了一个问题,因为当我打开滑动 Pane 时,整个被覆盖的 Pane 不会淡出,而只有其中的一些元素会淡出,例如 TextView、
我有一个包含 ListView 的滑动 Pane 布局。我有一个按钮可以打开滑动 Pane 。因此,我想禁用此滑动 Pane 的滑动手势,这在我尝试访问同一布局中的任何其他 View 时会产生问题。
我在我的 SlidingPaneLayout 中使用 ListView 作为辅助 View 。主视图是一个 map fragment 。 ListView 充当菜单。问题是 onItemClicked
我需要禁用滑动来打开/关闭 SlidingPaneLayout,因为我的主视图是 map 。我将使用按钮打开/关闭它。 最佳答案 子类 SlidingPaneLayout,覆盖 onIntercept
我在 Activity 中使用 SlidingPaneLayout: ... ... 我希望菜单覆盖页面的 3/4 我希望它可以在所有手机上使用,所以我不能放例如 android:la
我正在使用 android.support.v4.widget.SlidingPaneLayout 制作滑动菜单。唉,SlidingPaneLayout 只推送主要内容,不包括操作栏。我也希望这个布局
我对 SlidingPaneLayout 有疑问。当我打开菜单(用 spl 制作)时,所有 View ( TextView 、 ImageView 等)在屏幕截图上看起来像这些 TextView (它
我是一名优秀的程序员,十分优秀!