如何创建带有透明边框的圆形imageview?

时间:2020-02-05 19:57:13

标签: java android xml alert

我想创建一个与图像中所示相同的警报对话框,但是我对如何创建带有透明边框的中央图像视图感到困惑。

enter image description here

1 个答案:

答案 0 :(得分:1)

您的对话框中有一些span { display: inline-block; font-size: 30px; opacity: 0; } span:nth-child(1) { transform: translateX(-15px); } span:nth-child(2) { transform: translateX(-10px); } span:nth-child(3) { transform: translateX(-5px); } span:nth-last-child(3) { transform: translateX(5px); } span:nth-last-child(2) { transform: translateX(10px); } span:nth-last-child(1) { transform: translateX(15px); },类似于<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script> <div class="text">Hello World</div>View。当然,可以编写看起来像BottomAppBar的自定义FloatingActionButton,但使用原始内容会更容易。

您可以为对话框使用以下布局(我省略了按钮栏,因为我认为您已经知道可以使用View来实现此目的):

BottomAppBar

screenshot of dialog

有关样式LinearLayout的更多信息,请参见developer documentation