該樓層疑似違規已被系統折疊 隐藏此樓檢視此樓
幫我看下為什麼不顯示提示?夜神模拟器、靠譜助手、真機(三星安卓4.0.4)都不顯示提示
代碼:
tts_str=(EditText)contextP.findViewById(R.id.go_txt);
tts_str.setHintTextColor(0x9f9f9f);
SpannableString ss = new SpannableString("來說兩句");
AbsoluteSizeSpan ass = new AbsoluteSizeSpan(18,true);
ss.setSpan(ass, 0, ss.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
tts_str.setHint(new SpannedString(ss));
tts_str.setMaxLines(1);
tts_str.setOnKeyListener(new KeyListener());
tts_str.setOnTouchListener(new TouchListener());
布局:
android:id="@+id/go_txt"
android:layout_width="369dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="12dp"
android:background="@null"
android:drawableBottom="@drawable/shape_et_bottom_line"
android:ellipsize="end"
android:ems="20"
android:inputType="text"
android:textAllCaps="false"
android:textColor="#f0f0f0"
android:textColorHint="#9f9f9f"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ygk_ujf_button"
app:layout_constraintVertical_bias="0.0" />