-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from riggaroo/cl-2.0.0-beta2
ConstraintLayout 2.0.0 beta4 + Flow Example
- Loading branch information
Showing
12 changed files
with
254 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
app/src/main/java/za/co/riggaroo/constraintlayoutdemo/FlowActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package za.co.riggaroo.constraintlayoutdemo | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
|
||
class FlowActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_flow) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?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" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/textViewHeading" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginEnd="16dp" | ||
android:text="Flow Layout" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Display2" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<com.google.android.material.chip.Chip | ||
android:id="@+id/chip" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Design" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:layout_editor_absoluteX="28dp" /> | ||
|
||
<com.google.android.material.chip.Chip | ||
android:id="@+id/chip2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Data" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:layout_editor_absoluteX="118dp" /> | ||
|
||
<com.google.android.material.chip.Chip | ||
android:id="@+id/chip3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Engineering" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:layout_editor_absoluteX="190dp" /> | ||
|
||
<com.google.android.material.chip.Chip | ||
android:id="@+id/chip4" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Marketing" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:layout_editor_absoluteX="298dp" /> | ||
|
||
<com.google.android.material.chip.Chip | ||
android:id="@+id/chip5" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Finance" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:layout_editor_absoluteX="25dp" /> | ||
|
||
<com.google.android.material.chip.Chip | ||
android:id="@+id/chip6" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Android" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:layout_editor_absoluteX="108dp" /> | ||
|
||
<androidx.constraintlayout.helper.widget.Flow | ||
android:id="@+id/flowLayout" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginEnd="16dp" | ||
app:constraint_referenced_ids="chip,chip2,chip3,chip4,chip5,chip6" | ||
app:flow_firstHorizontalStyle="packed" | ||
app:flow_horizontalAlign="end" | ||
app:flow_lastHorizontalStyle="packed" | ||
app:flow_wrapMode="aligned" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/textViewHeading" /> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Nov 08 08:27:13 PST 2018 | ||
#Sat Oct 26 16:05:43 SAST 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip |