Set default value and add selectable background for switch

This commit is contained in:
M M Arif
2022-03-17 00:54:19 +05:00
parent bb31bb84c0
commit 3051cae1b1
4 changed files with 4 additions and 3 deletions

View File

@@ -192,7 +192,7 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
if(issue.getLabels() != null) {
if(!tinyDb.getBoolean("showLabelsInList")) { // default
if(!tinyDb.getBoolean("showLabelsInList", false)) { // default
labelsScrollViewWithText.setVisibility(View.GONE);
labelsScrollViewDots.setVisibility(View.VISIBLE);

View File

@@ -178,7 +178,7 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
if(issue.getLabels() != null) {
if(!tinyDb.getBoolean("showLabelsInList")) { // default
if(!tinyDb.getBoolean("showLabelsInList", false)) { // default
labelsScrollViewWithText.setVisibility(View.GONE);
labelsScrollViewDots.setVisibility(View.VISIBLE);

View File

@@ -169,7 +169,7 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
if(pullRequest.getLabels() != null) {
if(!tinyDb.getBoolean("showLabelsInList")) { // default
if(!tinyDb.getBoolean("showLabelsInList", false)) { // default
labelsScrollViewWithText.setVisibility(View.GONE);
labelsScrollViewDots.setVisibility(View.VISIBLE);

View File

@@ -250,6 +250,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
android:paddingTop="10dp"
android:paddingBottom="10dp">