0

私はカスタムタイトルでTabActivityを使用しています。EditTextがフォーカスを得られないMono Android

TabControl.xmlが活動を開始しまします

android:focusable="true" 
android:focusableInTouchMode="true" 

含まれ、デフォルトのタブがTAB0です。 TAB0の.xmlファイルで

android:focusable="true" 
android:focusableInTouchMode="true" 

カスタムタイトルバーの中に、TitleBar.xmlが含まれています

<RelativeLayout 
    //not setting android:focusable here > 

    <EditText 
      android:id="@+id/edsearch" 
      android:focusable="true" 
      android:focusableInTouchMode="true" 
      android:nextFocusUp="@id/edsearch" 
      android:nextFocusLeft="@id/edsearch" > 

をしかし、私は、任意の入力を入力しようとすると問題がありますEditTextTitleBarでは動作しません。この背後にある理由は、EditTextにフォーカスがない可能性があります。

は、それを是正するために、私が提案しIn this discussion

として:nextFocusUp:nextFocusUpを使用しかし、まだそれは動作しません。

EditTextのOnClickイベントをクリックして起動しました。

しかし、EditTextに入力を提供できないため、TextChangedイベントが実行されません。

初めての方はになりました。モノラルAndroidは、どんなヘルプにも感謝しています。

答えて

0

タブの活動から

android:focusable="true"  
android:focusableInTouchMode="true" 

を削除します。

android:focusable="true"  
android:focusableInTouchMode="true"  
android:nextFocusUp="@id/edsearch"  
android:nextFocusLeft="@id/edsearch" 
を設定する必要はありません
関連する問題