私のアプリにはEditText
、TextInputLayout
ラップされた がいくつかあります。ほとんどの場合、これで問題なく動作しますが、ハンドラーを の FocusChange イベントにアタッチするEditText
と、ヒントのアニメーション化に失敗します。
Android フォーラムでこの問題を見つけましたが、彼は OnFocusChangeListener を使用しています。イベントでは、呼び出しをプロキシする必要はありませんよね?
この問題に関するアイデアはありますか?Xamarin Android デザイン サポート NuGet パッケージのバグですか?
前もって感謝します
レイアウト コード:
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<EditText
android:id="@+id/txtProductCode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:inputType="textCapCharacters|textNoSuggestions"
android:hint="Artikelcode" />
</android.support.design.widget.TextInputLayout>
フラグメント コード:
public override void OnStart()
{
base.OnStart();
txtProductCode.FocusChange += txtProductCode_FocusChange;
// ...
}
void txtProductCode_FocusChange(object sender, View.FocusChangeEventArgs e)
{
if (!e.HasFocus)
txtDescription.Text = GetProductDescription();
}