0
내 응용 프로그램에서 DrawerLayout을 구현하기 시작했으며 버튼의 선택기가 매우 느리게 응답하는 것으로 나타났습니다. DrawerLayout을 LinearLayout으로 변경하면 지연이 사라집니다. 이것이이 지체 또는 다른 것을 초래하는 DrawerLayout에서 발생하는 여분의 터치 처리로 인해 발생하는지 확실하지 않습니다. 이 지연을 줄이기 위해 제가 할 수있는 일이 있습니까? 있는 LinearLayout은 그래서 지연을 생성하는 것처럼DrawerLayout 느린 선택기 발생
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/my_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/button_background"
android:text="" />
</android.support.v4.widget.DrawerLayout>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="#000080"/>
</shape>
</item>
<item>
<shape>
<solid android:color="#0000ff"/>
</shape>
</item>
</selector>