mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
parent
fa05c751e1
commit
532dd2c2a6
@ -27,6 +27,7 @@ import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
@ -142,6 +143,22 @@ public class AppDetailsActivity extends BaseActivity {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if(keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
|
||||
// Clicking "right" from the connections view goes to the fab down item
|
||||
if (mPager.getCurrentItem() == POS_CONNECTIONS) {
|
||||
RecyclerView rview = findViewById(R.id.connections_view);
|
||||
|
||||
if (rview.getFocusedChild() != null) {
|
||||
Log.d(TAG, "onKeyDown (right) focus " + rview.getFocusedChild());
|
||||
|
||||
View fab = findViewById(R.id.fabDown);
|
||||
|
||||
if (fab != null) {
|
||||
fab.requestFocus();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.onKeyDown(keyCode, event);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user