我正在开发一个应用程序,我想在整个屏幕上放置一个透明视图,我在这方面取得了一定的成功,但我的屏幕包含浮动操作按钮,
我也无法将透明布局放在浮动操作按钮上方
这是我的 xml
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.groomefy.consumer.Trending.DetailedActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="370dp"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<RelativeLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-10dp"
app:layout_collapseMode="parallax">
<ImageView
android:id="@+id/main_image"
android:layout_width="match_parent"
android:layout_height="430dp"
android:scaleType="fitEnd"
android:src="@drawable/image_placeholder_square" />
<!--
<ImageView
android:id="@+id/curve_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_marginBottom="-20dp"
android:scaleType="fitEnd"
android:src="@drawable/postdetail_curve"
app:layout_anchor="@id/main_image"
app:layout_collapseMode="none" />
-->
</RelativeLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
app:contentInsetEnd="0dp"
app:contentInsetLeft="0dp"
app:contentInsetRight="0dp"
app:contentInsetStart="0dp"
app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<ImageButton
android:id="@+id/btn_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@android:color/transparent"
android:padding="10dp"
android:src="@drawable/backicon" …Run Code Online (Sandbox Code Playgroud) android transparent floating-action-button android-coordinatorlayout
需要有透明的导航栏
有什么建议吗?
我是颤振的初学者,尝试在颤振中制作透明容器。它与背景应该是 100% 透明。我尝试使用Colors.transparent作为容器的颜色属性,但这不是我想要的。
应用程序屏幕上覆盖着图像,有一个底部应用程序栏,我需要将背景图像视为透明。
我使用 svg 图标作为底部导航栏图标。同一屏幕顶部应用栏是透明的,但底部应用栏显示白色。
BottomAppBar _buildBottomNavigationBar() {
return BottomAppBar(
color: Colors.transparent,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
IconButton(
onPressed: () {},
icon: SvgPicture.asset(
'assets/icons/home.svg',
color: Colors.black,
),
//color: Colors.black,
),
IconButton(
onPressed: () {},
icon: SvgPicture.asset('assets/icons/location.svg'),
color: Colors.black,
),
IconButton(
onPressed: () {},
icon: SvgPicture.asset('assets/icons/fish.svg'),
color: Colors.black,
),
IconButton(
onPressed: () {},
icon: SvgPicture.asset('assets/icons/menu.svg'),
color: Colors.black,
),
],
),
);
}
Run Code Online (Sandbox Code Playgroud) 我正在用C语言编写一个OpenGL程序,它实现了alpha透明的Bill Boarding粒子,它通过pnglib使用PNG(透明度)作为纹理.但是,我发现粒子的透明区域仍然会替换它前面的粒子.换句话说,新调用的粒子虽然在某些区域是透明的,但是完全重叠在它们之前调用的一些粒子,相反,那些先前称为粒子的粒子应该透过透明度来显示.
为了可视化它所具有的效果,我附上一些图像来显示问题:
最初我称这些粒子从最老到最新: 
但是,当视图更改时,重叠效果显而易见: 
当我决定撤销通话顺序时,我得出相反的结论:

我认为解决这个问题的方法是将粒子从最远离相机调到最近.然而,遍历每个活动粒子,从最远到最近的顺序排序,然后每个显示帧调用每个粒子,计算量很大.我希望找到一个更简单,更有效的解决方案.我已经试过了,glBlendFunc()但没有sfactor或dfactor似乎工作.
我想将richtextbox的背景颜色设置为透明在c#中你可以帮我取悦它是一个winform应用程序
我想设计一个与下图完全相同的布局。
当我将线性布局 alpha 设置为透明时,其中的所有图标也变得透明并且完全正常。但我想要一种只有透明背景而不是所有项目的方法!
我想要一个像这样的透明布局:
但我的布局显示如下:
这是我的代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:alpha="0.5"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="1"
>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333"
android:padding="10dp"
>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333"
android:padding="10dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333"
android:padding="10dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent" …Run Code Online (Sandbox Code Playgroud) transparent ×8
flutter ×3
android ×2
dart ×2
alpha ×1
c ×1
c# ×1
containers ×1
layout ×1
libpng ×1
navbar ×1
opengl ×1
particles ×1
xamarin.ios ×1