Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #106 from amardeshbd/new-release
Browse files Browse the repository at this point in the history
[UPDATE] [#102] Layout to be more pleasing to eye and consistent positioning of play icon.
  • Loading branch information
hossain-khan authored Jun 4, 2019
2 parents 803efbf + 69caf36 commit 906d80d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.hossainkhan.android.constraintlayout"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 109
versionName "1.9-constraint-layout-demo"
versionCode 200
versionName "2.0-constraint-layout-demo"
versionNameSuffix "-${gitSha()}"

buildConfigField "String", "GIT_SHA", "\"${gitSha()}\""
Expand Down Expand Up @@ -103,7 +103,7 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-core:$rootProject.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
testImplementation "androidx.arch.core:core-testing:$rootProject.archComponentVersion"
}

Expand Down
25 changes: 16 additions & 9 deletions app/src/main/res/layout/list_item_resource_tech_talk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
android:layout_width="64dp"
android:layout_height="wrap_content"
android:tint="@color/md_red_500"
app:layout_constraintBottom_toBottomOf="@+id/resource_summary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_start"
app:layout_constraintTop_toTopOf="@+id/resource_title"
app:srcCompat="@drawable/ic_play_circle_filled_black_42dp" />

Expand All @@ -51,7 +50,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/material_content_distance_small"
android:text="@{data.summary}"
app:layout_constraintEnd_toStartOf="@+id/action_play"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_end"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_start"
app:layout_constraintTop_toBottomOf="@+id/resource_author"
tools:text="In this session you will learn best practices of using ConstraintLayout on Android, particularly covering tips and tricks in the Layout Editor and new features introduced in the 2.0 version. We will go over how to take advantage of those to create UI more efficiently." />
Expand All @@ -72,13 +71,14 @@
android:id="@+id/resource_title"
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="0dp"
android:gravity="end"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/material_vertical_margin"
android:text="@{data.title}"
app:layout_constraintEnd_toStartOf="@+id/action_play"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_start"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_end"
app:layout_constraintStart_toEndOf="@id/action_play"
app:layout_constraintTop_toTopOf="parent"
tools:text="This is the title of the talk." />
tools:text="This is the title of the talk. This can become multi line" />


<TextView
Expand All @@ -89,8 +89,8 @@
android:layout_marginTop="@dimen/material_content_distance_small"
android:gravity="end"
android:text="@{@string/tech_talk_author_and_venue(data.author, data.event)}"
app:layout_constraintEnd_toStartOf="@+id/action_play"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_start"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_end"
app:layout_constraintStart_toEndOf="@+id/action_play"
app:layout_constraintTop_toBottomOf="@+id/resource_title"
tools:text="by Author of the talk." />

Expand All @@ -99,7 +99,14 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />
app:layout_constraintGuide_begin="@dimen/material_horizontal_margin" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_end"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_end="@dimen/material_horizontal_margin" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
Expand Down

0 comments on commit 906d80d

Please sign in to comment.