Skip to content
Snippets Groups Projects
Verified Commit 8465d383 authored by Torsten Grote's avatar Torsten Grote
Browse files

Add a ScrollView to HotspotFragment to account for small screens

parent 194701db
No related branches found
No related tags found
1 merge request!1Add web server for app downloading and small fixes
...@@ -33,7 +33,6 @@ public class HotspotFragment extends Fragment { ...@@ -33,7 +33,6 @@ public class HotspotFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
viewModel = new ViewModelProvider(requireActivity()).get(MainViewModel.class); viewModel = new ViewModelProvider(requireActivity()).get(MainViewModel.class);
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_hotspot, container, false); return inflater.inflate(R.layout.fragment_hotspot, container, false);
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@android:color/white" android:background="@android:color/white"
android:gravity="center" android:fillViewport="true"
android:orientation="vertical" android:orientation="vertical"
tools:context=".HotspotFragment"> tools:context=".HotspotFragment">
<ImageView <LinearLayout
android:id="@+id/qr_code" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/qr_code_description" android:gravity="center"
android:visibility="gone" /> android:orientation="vertical"
tools:context=".HotspotFragment">
<TextView <ImageView
android:id="@+id/ssid" android:id="@+id/qr_code"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp" /> android:contentDescription="@string/qr_code_description"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/password" android:id="@+id/ssid"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp" /> android:textSize="16sp" />
<Button <TextView
android:id="@+id/button" android:id="@+id/password"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp" android:textSize="16sp" />
android:text="@string/start_hotspot" />
<TextView <Button
android:id="@+id/status" android:id="@+id/button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="16sp" /> android:layout_margin="16dp"
android:text="@string/start_hotspot" />
<Button <TextView
android:id="@+id/serverButton" android:id="@+id/status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp" android:textSize="16sp" />
android:text="@string/connected"
android:visibility="gone" <Button
tools:visibility="visible" /> android:id="@+id/serverButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/connected"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout> </ScrollView>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment