android: Show selected user identity in profile list
This also readds the colons that were removed from the labels.
This commit is contained in:
+9
-3
@@ -63,12 +63,18 @@ public class VpnProfileAdapter extends ArrayAdapter<VpnProfile>
|
|||||||
TextView tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_name);
|
TextView tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_name);
|
||||||
tv.setText(profile.getName());
|
tv.setText(profile.getName());
|
||||||
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_gateway);
|
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_gateway);
|
||||||
tv.setText(getContext().getString(R.string.profile_gateway_label) + " " + profile.getGateway());
|
tv.setText(getContext().getString(R.string.profile_gateway_label) + ": " + profile.getGateway());
|
||||||
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_username);
|
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_username);
|
||||||
if (profile.getVpnType().has(VpnTypeFeature.USER_PASS))
|
if (profile.getVpnType().has(VpnTypeFeature.USER_PASS))
|
||||||
{ /* if the view is reused we make sure it is visible */
|
{ /* if the view is reused we make sure it is visible */
|
||||||
tv.setVisibility(View.VISIBLE);
|
tv.setVisibility(View.VISIBLE);
|
||||||
tv.setText(getContext().getString(R.string.profile_username_label) + " " + profile.getUsername());
|
tv.setText(getContext().getString(R.string.profile_username_label) + ": " + profile.getUsername());
|
||||||
|
}
|
||||||
|
else if (profile.getVpnType().has(VpnTypeFeature.CERTIFICATE) &&
|
||||||
|
profile.getLocalId() != null)
|
||||||
|
{
|
||||||
|
tv.setVisibility(View.VISIBLE);
|
||||||
|
tv.setText(getContext().getString(R.string.profile_user_select_id_label) + ": " + profile.getLocalId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -77,7 +83,7 @@ public class VpnProfileAdapter extends ArrayAdapter<VpnProfile>
|
|||||||
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_certificate);
|
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_certificate);
|
||||||
if (profile.getVpnType().has(VpnTypeFeature.CERTIFICATE))
|
if (profile.getVpnType().has(VpnTypeFeature.CERTIFICATE))
|
||||||
{
|
{
|
||||||
tv.setText(getContext().getString(R.string.profile_user_certificate_label) + " " + profile.getUserCertificateAlias());
|
tv.setText(getContext().getString(R.string.profile_user_certificate_label) + ": " + profile.getUserCertificateAlias());
|
||||||
tv.setVisibility(View.VISIBLE);
|
tv.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user