Skip to content

Commit

Permalink
[FIX] Mock files section not scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 committed Aug 22, 2019
1 parent 94274b5 commit bf58a5b
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 91 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-alpha04'
classpath 'com.android.tools.build:gradle:3.5.0-beta04'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
14 changes: 10 additions & 4 deletions ddmock-support/src/main/res/layout/fragment_mock_entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,25 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusCodeLayout" />

<RadioGroup
android:id="@+id/files"
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:layout_marginBottom="@dimen/default_padding"
android:text="@string/mock_entry_select_file"
app:layout_constraintBottom_toTopOf="@+id/save"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/selectFile" />
app:layout_constraintTop_toBottomOf="@+id/selectFile">

<RadioGroup
android:id="@+id/files"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mock_entry_select_file" />

</ScrollView>

<Button
android:id="@+id/save"
Expand Down
174 changes: 90 additions & 84 deletions ddmock/src/main/res/layout/fragment_mock_entry.xml
Original file line number Diff line number Diff line change
@@ -1,107 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">

<TextView
android:id="@+id/pathName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:textColor="@android:color/black"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:id="@+id/pathName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:textColor="@android:color/black"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/responseTimeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:hint="@string/mock_entry_response_time"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pathName">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/responseTime"
android:id="@+id/responseTimeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:inputType="number"
android:maxLines="1" />
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:hint="@string/mock_entry_response_time"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pathName">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/responseTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:inputType="number"
android:maxLines="1"/>

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/statusCodeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:hint="@string/mock_entry_status_code"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/responseTimeLayout">

<AutoCompleteTextView
android:id="@+id/statusCode"
android:id="@+id/statusCodeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionDone"
android:inputType="number"
android:maxLines="1" />
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:hint="@string/mock_entry_status_code"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/responseTimeLayout">

<AutoCompleteTextView
android:id="@+id/statusCode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionDone"
android:inputType="number"
android:maxLines="1"/>

</com.google.android.material.textfield.TextInputLayout>

<TextView
android:id="@+id/selectFile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:text="@string/mock_entry_select_file"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusCodeLayout" />
android:id="@+id/selectFile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:text="@string/mock_entry_select_file"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusCodeLayout"/>

<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:layout_marginBottom="@dimen/default_padding"
app:layout_constraintBottom_toTopOf="@+id/save"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/selectFile">

<RadioGroup
android:id="@+id/files"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mock_entry_select_file"/>

<RadioGroup
android:id="@+id/files"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginTop="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:layout_marginBottom="@dimen/default_padding"
android:text="@string/mock_entry_select_file"
app:layout_constraintBottom_toTopOf="@+id/save"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/selectFile" />
</ScrollView>

<Button
android:id="@+id/save"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:layout_marginBottom="@dimen/default_padding"
android:backgroundTint="@color/tint_list"
android:padding="@dimen/default_padding"
android:text="@string/mock_entry_save"
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
android:id="@+id/save"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_padding"
android:layout_marginEnd="@dimen/default_padding"
android:layout_marginBottom="@dimen/default_padding"
android:backgroundTint="@color/tint_list"
android:padding="@dimen/default_padding"
android:text="@string/mock_entry_save"
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Feb 05 10:55:50 AEDT 2019
#Thu Aug 22 09:38:39 AEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 comments on commit bf58a5b

Please sign in to comment.