diff options
Diffstat (limited to 'remoteExample/src/main/java')
-rw-r--r-- | remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java index 2ea37861..0bb634aa 100644 --- a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java +++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java @@ -168,10 +168,13 @@ public class MainFragment extends Fragment implements View.OnClickListener, Hand try { List<APIVpnProfile> list = mService.getProfiles(); String all="List:"; - for(APIVpnProfile vp:list) { + for(APIVpnProfile vp:list.subList(0, Math.min(5, list.size()))) { all = all + vp.mName + ":" + vp.mUUID + "\n"; } + if (list.size() > 5) + all +="\n And some profiles...."; + if(list.size()> 0) { Button b= mStartVpn; b.setOnClickListener(this); |