0
사용자 토스트에 약간 문제가 있습니다. 토스트 그 자체와 세 텍스트 뷰의 위치가 예상대로 작동합니다. 나는 한 textview에 대해 검은 색을 설정하고 다른 textview에는 녹색을 설정합니다. 녹색 하나는 녹색이지만 검은 색 텍스트 색상이있는 것은 어두운 회색 배경에 검정색과 빨간색이 혼합 된 것입니다. 사실, 내부 텍스트는 검은 색이고 붉은 색 그림자입니다. 이 동작에 대한 설명이 있으십니까?Android 사용자 정의 토스트 : 검은 색으로 설정되었지만 빨간색 그림자가 있습니다.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mytoast_layout"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:weightSum="100"
android:orientation="vertical"
android:background="@drawable/toast_frame">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="100"
android:layout_weight="90"
android:background="#444444" >
<TextView
android:id="@+id/leftview"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="50"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:gravity="center"
android:textColor = "#000000"
android:textAppearance="@style/myToast_small"
android:shadowColor="#BB0000"
android:shadowRadius="2.75" />
<TextView
android:id="@+id/rightview"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="50"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:gravity="center"
android:textColor = "#00FF00"
android:textAppearance="@style/myToast_small"
android:shadowColor="#BB0000"
android:shadowRadius="2.75" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/mainview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAppearance="@style/myToast_small"
android:textColor="#FFFFFF"
android:shadowColor="#BB0000"
android:shadowRadius="2.75" />
</LinearLayout>
</LinearLayout>
슬프게도 나는 그것을 가지고 있었다. 그러나 lib와 코드에는 내가 전화로 테스트하고 복사했다. 고전적인 사람의 실수는 늦었고 코딩하는 동안 TV를보고 있습니다 :/ –
@MarkusProske 그것은 우리에게 가장 좋은 일입니다 - 나는 "여기에 간단한 것을 넣지 마라."라고 많은 시간을 말했다. 그것은. 걱정 마. :) – Eric