Loading res/layout/app_authentication_item.xml +5 −2 Original line number Diff line number Diff line Loading @@ -26,7 +26,8 @@ android:layout_width="24dp" android:layout_height="24dp"/> <LinearLayout <RelativeLayout android:id="@+id/app_details" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/app_icon" Loading @@ -44,16 +45,18 @@ <TextView android:id="@+id/number_of_uris" style="@style/AppAuthenticationPolicyNumberOfUrisText" android:layout_below="@id/app_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> <androidx.recyclerview.widget.RecyclerView android:id="@+id/uris" android:layout_below="@id/app_name" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </RelativeLayout> <ImageView android:id="@+id/expand" Loading src/com/android/settings/security/CredentialManagementAppAdapter.java +13 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; Loading Loading @@ -61,6 +62,7 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle private final boolean mIncludeHeader; private final boolean mIncludeExpander; private final boolean mIsLayoutRtl; /** * View holder for the header in the request manage credentials screen. Loading Loading @@ -113,6 +115,15 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle mChildRecyclerView = view.findViewById(R.id.uris); mExpandedApps = new ArrayList<>(); if (mIsLayoutRtl) { RelativeLayout appDetails = view.findViewById(R.id.app_details); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) appDetails.getLayoutParams(); params.addRule(RelativeLayout.LEFT_OF, R.id.app_icon); params.addRule(RelativeLayout.RIGHT_OF, R.id.expand); view.setLayoutParams(params); } mExpanderIconView.setOnClickListener(view1 -> { final String appName = mSortedAppNames.get(getBindingAdapterPosition()); if (mExpandedApps.contains(appName)) { Loading Loading @@ -195,6 +206,8 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle mViewPool = new RecyclerView.RecycledViewPool(); mIncludeHeader = includeHeader; mIncludeExpander = includeExpander; mIsLayoutRtl = context.getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; } /** Loading Loading
res/layout/app_authentication_item.xml +5 −2 Original line number Diff line number Diff line Loading @@ -26,7 +26,8 @@ android:layout_width="24dp" android:layout_height="24dp"/> <LinearLayout <RelativeLayout android:id="@+id/app_details" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/app_icon" Loading @@ -44,16 +45,18 @@ <TextView android:id="@+id/number_of_uris" style="@style/AppAuthenticationPolicyNumberOfUrisText" android:layout_below="@id/app_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> <androidx.recyclerview.widget.RecyclerView android:id="@+id/uris" android:layout_below="@id/app_name" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </RelativeLayout> <ImageView android:id="@+id/expand" Loading
src/com/android/settings/security/CredentialManagementAppAdapter.java +13 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; Loading Loading @@ -61,6 +62,7 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle private final boolean mIncludeHeader; private final boolean mIncludeExpander; private final boolean mIsLayoutRtl; /** * View holder for the header in the request manage credentials screen. Loading Loading @@ -113,6 +115,15 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle mChildRecyclerView = view.findViewById(R.id.uris); mExpandedApps = new ArrayList<>(); if (mIsLayoutRtl) { RelativeLayout appDetails = view.findViewById(R.id.app_details); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) appDetails.getLayoutParams(); params.addRule(RelativeLayout.LEFT_OF, R.id.app_icon); params.addRule(RelativeLayout.RIGHT_OF, R.id.expand); view.setLayoutParams(params); } mExpanderIconView.setOnClickListener(view1 -> { final String appName = mSortedAppNames.get(getBindingAdapterPosition()); if (mExpandedApps.contains(appName)) { Loading Loading @@ -195,6 +206,8 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle mViewPool = new RecyclerView.RecycledViewPool(); mIncludeHeader = includeHeader; mIncludeExpander = includeExpander; mIsLayoutRtl = context.getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; } /** Loading