다른 질문과 유사하지 않으므로 내 문제를 이해하십시오. 나는XML 드로어 블이 실제 장치에 나타나지 않습니다.
test.xml의
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring" >
<size
android:height="30dp"
android:width="30dp" />
<solid android:color="#009688" />
을 가지고 있고 그것은 녹색 원으로 텍스트보기를 표시해야
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.bradley.learndrawable.MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/test"
android:text="2"
android:textStyle="bold"
android:gravity="center"
android:textColor="#FFFFFF" />
를 다음과 같이 내 텍스트 뷰가 색상 및 흰색으로 숫자가 표시됩니다. 그래픽보기에서는 정상적으로 작동하지만 실제 장치에서는 정상적으로 작동하지 않습니다.
모든 드로어 블 폴더에 드로어 블을 복사했습니다. 아직도 나를 위해 행운이 없습니다.
도움말! :)
그 후에는 drawable 폴더에 있어야합니다. – CaseyB
이클립스 동생을 사용합니다 ☺ –
텍스트 색상을 검정색으로 설정하면 어떻게됩니까? 텍스트가 표시됩니까? – MidasLefko