Skip to content

Commit

Permalink
Merge pull request #11 from OttyLab/fix-height
Browse files Browse the repository at this point in the history
Fix height
  • Loading branch information
OttyLab authored Mar 12, 2018
2 parents cde4221 + 422452d commit a69f08d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void handleMessage(Message msg) {
MainActivity activity = this.activity.get();
if (activity != null) {
String logs = Utils.rotateStringQueue(activity.logs, msg.getData().getString("msg"));
activity.textViewLog.setText(logs.toString());
activity.textViewLog.setText(logs);
}
}
}
Expand Down
75 changes: 41 additions & 34 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.ottylab.bitzenyminer.MainActivity">

<Button
android:id="@+id/buttonDrive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:text="Start"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextPassword" />

<TextView
android:id="@+id/textViewLog"
android:layout_width="match_parent"
android:layout_height="255dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:gravity="bottom"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<EditText
android:id="@+id/editTextServer"
android:layout_width="match_parent"
Expand Down Expand Up @@ -71,13 +49,42 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextUser" />

<CheckBox
android:id="@+id/checkBoxBenchmark"
android:layout_width="106dp"
android:layout_height="44dp"
android:layout_marginStart="20dp"
android:layout_marginTop="24dp"
android:text="Benchmark"
app:layout_constraintStart_toEndOf="@+id/buttonDrive"
app:layout_constraintTop_toBottomOf="@+id/editTextPassword" />
</android.support.constraint.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="horizontal">

<Button
android:id="@+id/buttonDrive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:text="Start"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextPassword" />

<CheckBox
android:id="@+id/checkBoxBenchmark"
android:layout_width="106dp"
android:layout_height="44dp"
android:layout_marginStart="20dp"
android:layout_marginTop="24dp"
android:text="Benchmark"
app:layout_constraintLeft_toRightOf="@+id/buttonDrive"
app:layout_constraintTop_toBottomOf="@+id/editTextPassword" />
</LinearLayout>

<TextView
android:id="@+id/textViewLog"
android:layout_height="100dp"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ellipsize="marquee"
android:gravity="bottom"
android:scrollbars="vertical" />
</LinearLayout>

0 comments on commit a69f08d

Please sign in to comment.