Skip to content

Commit

Permalink
Merge pull request #3 from bradmartin/androidx
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
bradmartin committed Jul 31, 2019
2 parents 164e8dc + 2cf4a98 commit fdcf39c
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 60 deletions.
9 changes: 7 additions & 2 deletions smartwearos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.support:wearable:2.4.0'
compileOnly 'com.google.android.wearable:wearable:2.4.0'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.wear:wear:1.0.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
compileOnly 'com.google.android.wearable:wearable:2.4.0'

}
66 changes: 30 additions & 36 deletions smartwearos/src/main/res/layout/activity_failure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
android:layout_height="match_parent"
tools:context=".SuccessActivity"
tools:deviceIds="wear"
android:padding="@dimen/box_inset_layout_padding"
app:boxedEdges="all">
android:padding="@dimen/box_inset_layout_padding">

<FrameLayout
android:layout_width="match_parent"
Expand All @@ -18,42 +17,37 @@
android:background="@color/black"
app:boxedEdges="all">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linearLayout">
<ScrollView
android:background="@color/black"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<ImageView
android:src="@drawable/ic_full_sad"
android:id="@+id/imageView2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:scaleType="centerInside"
android:adjustViewBounds="false"
android:cropToPadding="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/message"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="32dp"
app:layout_constraintHorizontal_bias="0.494"
app:layout_constraintVertical_bias="0.0"
android:contentDescription="@string/ic_full_sad_icon"/>
<ImageView
android:src="@drawable/ic_full_sad"
android:id="@+id/imageView2"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:scaleType="centerInside"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:layout_marginTop="10dp"
android:contentDescription="@string/ic_full_sad_icon"/>

<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="1dp"
app:layout_constraintBottom_toBottomOf="parent"
android:fontFamily="@font/roboto"
android:textSize="14sp"
android:textColor="@color/white"
android:textAlignment="center"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/message"
android:layout_width="141dp"
android:layout_height="67dp"
android:text="@string/hello_world"
android:layout_marginStart="1dp"
android:fontFamily="@font/roboto"
android:textSize="14sp"
android:textColor="@color/white"
android:textAlignment="center"/>

</LinearLayout>
</ScrollView>
</FrameLayout>
</androidx.wear.widget.BoxInsetLayout>
63 changes: 41 additions & 22 deletions smartwearos/src/main/res/layout/activity_success.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,56 @@
tools:deviceIds="wear"
android:padding="@dimen/box_inset_layout_padding" app:boxedEdges="all">


<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/inner_frame_layout_padding"
app:boxedEdges="all"
android:background="@color/black">
android:background="@color/black"
app:boxedEdges="all">

<androidx.constraintlayout.widget.ConstraintLayout
<ScrollView
android:background="@color/black"
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/linearLayout">
<ImageView
android:src="@drawable/ic_round_check_white"
android:id="@+id/imageView2"
android:background="@drawable/accept_deny_dialog_positive_bg" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:scaleType="centerInside"
android:adjustViewBounds="false" android:cropToPadding="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toTopOf="@+id/message"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="32dp"
app:layout_constraintHorizontal_bias="0.494" app:layout_constraintVertical_bias="0.0"
android:contentDescription="@string/ic_round_check_white"/>
<TextView
android:id="@+id/message"
android:layout_height="match_parent">

<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal">

<ImageView
android:src="@drawable/ic_round_check_white"
android:id="@+id/imageView2"
android:background="@drawable/accept_deny_dialog_positive_bg"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:scaleType="centerInside"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:layout_marginTop="10dp"
android:contentDescription="@string/ic_round_check_white"/>
</LinearLayout>

<TextView
android:id="@+id/message"
android:layout_width="141dp"
android:layout_height="67dp"
android:text="@string/hello_world"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="1dp"
app:layout_constraintBottom_toBottomOf="parent" android:fontFamily="@font/roboto"
android:textSize="14sp" android:textColor="@color/white"/>
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_marginStart="1dp"
android:fontFamily="@font/roboto"
android:textSize="14sp"
android:textColor="@color/white"
android:textAlignment="center"/>

</LinearLayout>

</ScrollView>
</FrameLayout>
</androidx.wear.widget.BoxInsetLayout>

0 comments on commit fdcf39c

Please sign in to comment.