0
버튼이 텍스트 아래에 있습니다. 버튼 클릭시 텍스트 뷰의 텍스트 색상을 어떻게 바꿀 수 있습니까? 선택기에 추가해야합니까? 또는 자바 코드 내에서?버튼 클릭시 textView 텍스트 색상을 변경하는 방법
<?xml version="1.0" encoding="utf-8"?>
<item android:state_pressed="false">
<shape android:shape="oval">
<solid
android:color="@color/blue_800"/>
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="oval">
<solid android:color="@color/blue_300"/>
</shape>
</item>
그리고 지금까지 레이아웃 : 여기
은 선택입니다<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/imageUploader1"
android:background="@drawable/round_button"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginRight="2dp"
android:layout_marginLeft="2dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Main"
android:layout_gravity="center"/>
</LinearLayout>
Pff, 정말 고마워! – user6456773