2012-04-10 4 views

답변

29

뭔가 : (당김 입술에 /)

circle.xml

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="oval" > 

    <solid android:color="#aaf" /> 

</shape> 

및 circletext.xml (고해상도에서/레이아웃) :

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@android:color/white" 
    android:orientation="vertical" > 

    <TextView 
     android:layout_width="80dp" 
     android:layout_height="80dp" 
     android:layout_gravity="center" 
     android:background="@drawable/circle" 
     android:gravity="center" 
     android:shadowColor="@android:color/white" 
     android:shadowRadius="10.0" 
     android:text="4" 
     android:textColor="@android:color/black" 
     android:textSize="18sp" /> 

</FrameLayout> 

은 다음과 같습니다 :

enter image description here

+0

더 큰 숫자를 더 잘 연마하기 위해 TextView에 다음 속성을 추가했습니다. android : layout_width = "wrap_content" android : layout_height = "wrap_content" android : minHeight = "14dp" android : minWidth = "14dp" android : maxHeight = "14dp" – elprl

2

이 잘 나는 가장 간단한 방법은 하하 그냥 그런 사진을 넣어 것 같다. 서클과 함께 이미지를 사용할 수 있으며 그 위에 텍스트 위에 숫자로 레이어를 지정할 수 있습니다. 이 같은

+0

나는 좋은 성능을 위해 이미지를 사용할 수 없기 때문에 lot.so를 만들 것입니다. – Kadir

+0

간단한 게임 엔진을 사용하여 이미지를 처리 ​​할 수 ​​있습니다. 그들은 움직이지 않으면 프로세서 집약적이어서는 안됩니다. 심지어 대부분의 엔진은 충돌 시스템을 모두 적용해도 문제없이 20 또는 30 개의 움직이는 스프라이트를 처리 할 수 ​​있습니다. – WingDev

+0

소스가 비트 맵인 텍스처를 사용하더라도 페인트에서 가져온 비트 맵이 원본 인 texure를 사용하는 것보다 성능에 영향을 미치지 않습니다. 사실 그들은 동일 할 것입니다. GL에 서클을 표시하려면 먼저 비트 맵이어야합니다. –

관련 문제