【问题标题】:create android circle fragment创建 android 圆圈片段
【发布时间】:2016-08-27 07:39:08
【问题描述】:

我想要一个圆形片段。我已经搜索并发现我应该创建一个圆形视图。我现在已经创建了一个视图。如果可以这样做,我如何将我的片段添加到视图中?如果不可能,请帮助创建圆形片段。

【问题讨论】:

  • 你想要什么..你能显示屏幕或ui吗?

标签: android view fragment android-custom-view


【解决方案1】:

circle.xml

<?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
        <gradient android:startColor="@color/yourColor" android:endColor="@color/yourColor"
            android:angle="270"/>
    </shape>

在片段视图中

<LinearLayout android:layout_width="50dp"
    android:layout_height="50dp"
    android:background="@drawable/circle"/>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-03
    • 2016-04-25
    • 1970-01-01
    • 1970-01-01
    • 2019-07-19
    • 1970-01-01
    • 2011-08-26
    • 1970-01-01
    相关资源
    最近更新 更多