diff options
Diffstat (limited to 'main/src')
4 files changed, 20 insertions, 20 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java b/main/src/main/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java index 94247fab..05adef0d 100644 --- a/main/src/main/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java +++ b/main/src/main/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java @@ -159,7 +159,7 @@ public class ConnectionsAdapter extends RecyclerView.Adapter<ConnectionsAdapter. return mConnections.length; } - private void displayWarningifNoneEnabled() + public void displayWarningifNoneEnabled() { int showWarning = View.VISIBLE; for(Connection conn:mConnections) { diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Connections.java b/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Connections.java index 60008136..db620c52 100644 --- a/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Connections.java +++ b/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Connections.java @@ -70,9 +70,12 @@ public class Settings_Connections extends Fragment implements View.OnClickListen mConnectionsAdapter = new ConnectionsAdapter(getActivity(), this, mProfile); //mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(columns, StaggeredGridLayoutManager.VERTICAL)); + mRecyclerView.setHasFixedSize(true); mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity(),LinearLayoutManager.VERTICAL,false)); mRecyclerView.setAdapter(mConnectionsAdapter); + mConnectionsAdapter.displayWarningifNoneEnabled(); + ImageButton fab_button = (ImageButton) v.findViewById(R.id.add_new_remote); if(fab_button!=null) fab_button.setOnClickListener(this); diff --git a/main/src/main/res/layout/connections.xml b/main/src/main/res/layout/connections.xml index 1c44d498..011d3472 100644 --- a/main/src/main/res/layout/connections.xml +++ b/main/src/main/res/layout/connections.xml @@ -12,25 +12,10 @@ - <TextView - android:id="@+id/noserver_active_warning" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_margin="10dp" - android:background="@drawable/white_rect" - android:drawableLeft="@drawable/ic_dialog_alert" - android:drawablePadding="10dp" - android:elevation="10dp" - android:gravity="center_vertical" - android:padding="@dimen/stdpadding" - android:text="You need to enable at least one server." - android:visibility="visible" - tools:visibility="visible" /> <CheckBox android:text="Use connection entries in random order on connect" android:id="@+id/remote_random" - android:layout_below="@id/noserver_active_warning" android:padding="@dimen/stdpadding" android:layout_width="wrap_content" android:layout_height="wrap_content" /> @@ -44,6 +29,22 @@ android:horizontalSpacing="@dimen/stdpadding" /> + + <TextView + android:id="@+id/noserver_active_warning" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="10dp" + android:background="@drawable/white_rect" + android:drawableLeft="@drawable/ic_dialog_alert" + android:drawablePadding="10dp" + android:elevation="2dp" + android:gravity="center_vertical" + android:padding="@dimen/stdpadding" + android:text="You need to enable at least one server." + android:visibility="visible" + tools:visibility="visible" /> + <include layout="@layout/connection_fab" /> </RelativeLayout>
\ No newline at end of file diff --git a/main/src/main/res/layout/log_fragment.xml b/main/src/main/res/layout/log_fragment.xml index 6271ef1b..4fec942e 100644 --- a/main/src/main/res/layout/log_fragment.xml +++ b/main/src/main/res/layout/log_fragment.xml @@ -27,10 +27,6 @@ android:layout_height="wrap_content"/> </LinearLayout> - - - - <ListView android:id="@android:id/list" android:transcriptMode="normal" |