2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 05:07:40 +00:00

tv: Greatly improve focus behavior on device list

This commit is contained in:
Philip Cohn-Cort 2024-04-06 14:54:23 -04:00 committed by Albert Vaca Cintora
parent 769f054355
commit eeeb5678c1
No known key found for this signature in database

View File

@ -24,6 +24,7 @@ import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
@ -110,6 +111,15 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
return devicesListBinding.getRoot();
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// Configure focus order for Accessibility, for touchpads, and for TV remotes
// (allow focus of items in the device list)
devicesListBinding.devicesList.setItemsCanFocus(true);
}
@Override
public void onDestroyView() {
super.onDestroyView();