X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Fprofiles%2FProfileDetailFragment.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Fprofiles%2FProfileDetailFragment.java;h=672acf0ec4a58cb37d7ba0a897c8065b9433feae;hp=e4fa95aebc817576afe68deb37e77e43e3e8559f;hb=b296570e4c84379133927f7f35e1220b9b1d6862;hpb=bcf517d0eae491de46b71a1e0f288852ca3d64df diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java index e4fa95ae..672acf0e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java @@ -29,7 +29,6 @@ import android.view.MenuItem; import android.view.View; import android.widget.LinearLayout; import android.widget.PopupMenu; -import android.widget.Switch; import android.widget.TextView; import androidx.annotation.NonNull; @@ -42,6 +41,7 @@ import androidx.lifecycle.ViewModelProvider; import com.google.android.material.appbar.CollapsingToolbarLayout; import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.switchmaterial.SwitchMaterial; import com.google.android.material.textfield.TextInputLayout; import net.ktnx.mobileledger.BuildConfig; @@ -86,7 +86,7 @@ public class ProfileDetailFragment extends Fragment { private boolean defaultCommoditySet; private TextInputLayout urlLayout; private LinearLayout authParams; - private Switch useAuthentication; + private SwitchMaterial useAuthentication; private TextView userName; private TextInputLayout userNameLayout; private TextView password; @@ -242,14 +242,14 @@ public class ProfileDetailFragment extends Fragment { cpf.show(activity.getSupportFragmentManager(), "currency-selector"); }); - Switch showCommodityByDefault = context.findViewById(R.id.profile_show_commodity); + SwitchMaterial showCommodityByDefault = context.findViewById(R.id.profile_show_commodity); showCommodityByDefault.setOnCheckedChangeListener( (buttonView, isChecked) -> model.setShowCommodityByDefault(isChecked)); model.observeShowCommodityByDefault(viewLifecycleOwner, showCommodityByDefault::setChecked); View postingSubItems = context.findViewById(R.id.posting_sub_items); - Switch postingPermitted = context.findViewById(R.id.profile_permit_posting); + SwitchMaterial postingPermitted = context.findViewById(R.id.profile_permit_posting); model.observePostingPermitted(viewLifecycleOwner, isChecked -> { postingPermitted.setChecked(isChecked); postingSubItems.setVisibility(isChecked ? View.VISIBLE : View.GONE); @@ -257,7 +257,7 @@ public class ProfileDetailFragment extends Fragment { postingPermitted.setOnCheckedChangeListener( ((buttonView, isChecked) -> model.setPostingPermitted(isChecked))); - Switch showCommentsByDefault = context.findViewById(R.id.profile_show_comments); + SwitchMaterial showCommentsByDefault = context.findViewById(R.id.profile_show_comments); model.observeShowCommentsByDefault(viewLifecycleOwner, showCommentsByDefault::setChecked); showCommentsByDefault.setOnCheckedChangeListener( ((buttonView, isChecked) -> model.setShowCommentsByDefault(isChecked)));