Minor refactoring to StartServer layout/activity_start_server

This commit is contained in:
Adeel Zafar 2019-08-05 22:48:35 +05:00
parent 5ae358c3d0
commit 0265800170
2 changed files with 4 additions and 4 deletions

View File

@ -14,12 +14,12 @@ public class StartServer extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start_server); setContentView(R.layout.activity_start_server);
setUpToolbar();
FragmentManager fragmentManager = getSupportFragmentManager(); FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
ZimFileSelectFragment fragment = new ZimFileSelectFragment(); ZimFileSelectFragment fragment = new ZimFileSelectFragment();
fragmentTransaction.add(R.id.frameLayoutServer, fragment); fragmentTransaction.add(R.id.frameLayoutServer, fragment);
fragmentTransaction.commit(); fragmentTransaction.commit();
setUpToolbar();
} }
private void setUpToolbar() { private void setUpToolbar() {

View File

@ -5,6 +5,7 @@
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:fitsSystemWindows="true"
android:id="@+id/constraintLayoutId" android:id="@+id/constraintLayoutId"
tools:context=".webserver.StartServer" tools:context=".webserver.StartServer"
> >
@ -38,7 +39,7 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:textAlignment="center" android:textAlignment="center"
android:text="@string/server_textview_default_message" android:text="@string/server_textview_default_message"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout2" app:layout_constraintTop_toBottomOf="@+id/toolbar"
/> />
<FrameLayout <FrameLayout
@ -47,8 +48,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@+id/textView" app:layout_constraintTop_toBottomOf="@+id/textView"
tools:layout_editor_absoluteX="0dp" />
></FrameLayout>
</LinearLayout> </LinearLayout>