mirror of https://github.com/NekoX-Dev/NekoX.git
fix: edit proxy info
This commit is contained in:
parent
7ef3a53a2f
commit
12bbf436a1
|
@ -207,7 +207,28 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
|
|||
checkImageView.setScaleType(ImageView.ScaleType.CENTER);
|
||||
checkImageView.setContentDescription(LocaleController.getString("Edit", R.string.Edit));
|
||||
addView(checkImageView, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, 8, 8, 8, 0));
|
||||
checkImageView.setOnClickListener(v -> presentFragment(new ProxySettingsActivity(currentInfo)));
|
||||
checkImageView.setOnClickListener(v -> {
|
||||
SharedConfig.ProxyInfo info = currentInfo;
|
||||
if (info instanceof SharedConfig.VmessProxy) {
|
||||
if (((SharedConfig.VmessProxy) info).bean.getConfigType() == V2RayConfig.EConfigType.Trojan) {
|
||||
presentFragment(new TrojanSettingsActivity((SharedConfig.VmessProxy) info));
|
||||
} else {
|
||||
presentFragment(new VmessSettingsActivity((SharedConfig.VmessProxy) info));
|
||||
}
|
||||
} else if (info instanceof SharedConfig.ShadowsocksProxy) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
presentFragment(new ShadowsocksSettingsActivity((SharedConfig.ShadowsocksProxy) info));
|
||||
}
|
||||
} else if (info instanceof SharedConfig.ShadowsocksRProxy) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
presentFragment(new ShadowsocksRSettingsActivity((SharedConfig.ShadowsocksRProxy) info));
|
||||
}
|
||||
} else if (info instanceof SharedConfig.WsProxy) {
|
||||
presentFragment(new WsSettingsActivity((SharedConfig.WsProxy) info));
|
||||
} else {
|
||||
presentFragment(new ProxySettingsActivity(info));
|
||||
}
|
||||
});
|
||||
|
||||
checkBox = new CheckBox2(context, 21);
|
||||
checkBox.setColor(Theme.key_radioBackground, Theme.key_radioBackground, Theme.key_checkboxCheck);
|
||||
|
|
Loading…
Reference in New Issue