Мне нужно создать полупрозрачный Fragment
с непрозрачными (полужирными) кнопками.Полупрозрачный фрагмент с непрозрачными кнопками
Я пытаюсь управлять Fragment
прозрачность с помощью alpha
, как:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/templateListLayout"
android:orientation="vertical"
android:alpha="0.5"
>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabCustom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:visibility="visible"
app:elevation="4dp"
app:borderWidth="1dp"
app:fabSize="mini"
android:layout_marginRight="24dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_above="@id/anchor"
android:layout_alignParentRight="true"
android:alpha="1.0"
/>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:id="@+id/anchor"
android:background="#000000"
android:visibility="invisible"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
Но это бесполезно, фрагмент становится полупрозрачным с помощью кнопки, а также. Но мне нужна кнопка, чтобы быть непрозрачной.
Фрагмент создан как:
Fragment fragment = SelectTemplateFragment.newInstance();
getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, fragment).addToBackStack(null).commit();
Любые идеи?
Отлично, это работает! – barmaley