Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit ad56f30

Browse files
committed
Initial hero commit
1 parent ed02093 commit ad56f30

34 files changed

Lines changed: 503 additions & 4 deletions

File tree

ConstraintLayoutExamples/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ buildscript {
2929
appCompatVersion = '1.1.0-alpha03'
3030
constraintLayoutVersion = '2.0.0-beta3'
3131
glideVersion = '4.8.0'
32-
kotlinVersion = '1.3.11'
32+
kotlinVersion = '1.3.71'
3333
lifeCycleVersion = '2.0.0'
3434
lottieVersion = '2.5.1'
3535
materialVersion = '1.1.0-alpha05'
3636
junitVersion = '4.12'
37+
kotlin_version = '1.3.71'
3738
}
3839

3940
dependencies {
40-
classpath 'com.android.tools.build:gradle:3.5.2'
41+
classpath 'com.android.tools.build:gradle:3.6.3'
4142
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
4243

4344
// NOTE: Do not place your application dependencies here; they belong
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Nov 19 18:33:58 JST 2019
1+
#Tue May 05 16:40:29 PDT 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-android-extensions'
4+
5+
android {
6+
compileSdkVersion 29
7+
buildToolsVersion "29.0.2"
8+
9+
defaultConfig {
10+
applicationId "com.example.androidstudio.motionlayoutintegrations"
11+
minSdkVersion 18
12+
targetSdkVersion 29
13+
versionCode 1
14+
versionName "1.0"
15+
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
26+
viewBinding {
27+
enabled = true
28+
}
29+
30+
}
31+
32+
dependencies {
33+
implementation fileTree(dir: 'libs', include: ['*.jar'])
34+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
35+
implementation 'androidx.appcompat:appcompat:1.1.0'
36+
implementation 'androidx.core:core-ktx:1.2.0'
37+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
38+
testImplementation 'junit:junit:4.12'
39+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
40+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
41+
42+
implementation 'com.google.android.material:material:1.1.0'
43+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.example.androidstudio.motionlayoutintegrations
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.example.androidstudio.motionlayoutintegrations", appContext.packageName)
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.example.androidstudio.motionlayoutintegrations">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
12+
<activity android:name=".ViewPagerCarousel"></activity>
13+
<activity android:name=".Entrance" />
14+
<activity android:name=".CollapsingToolbar" />
15+
<activity android:name=".MainActivity">
16+
<intent-filter>
17+
<action android:name="android.intent.action.MAIN" />
18+
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.example.androidstudio.motionlayoutintegrations
2+
3+
import androidx.appcompat.app.AppCompatActivity
4+
import android.os.Bundle
5+
6+
class CollapsingToolbar : AppCompatActivity() {
7+
8+
override fun onCreate(savedInstanceState: Bundle?) {
9+
super.onCreate(savedInstanceState)
10+
setContentView(R.layout.activity_collapsing_toolbar)
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.example.androidstudio.motionlayoutintegrations
2+
3+
import androidx.appcompat.app.AppCompatActivity
4+
import android.os.Bundle
5+
6+
class Entrance : AppCompatActivity() {
7+
8+
override fun onCreate(savedInstanceState: Bundle?) {
9+
super.onCreate(savedInstanceState)
10+
setContentView(R.layout.activity_entrance)
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.example.androidstudio.motionlayoutintegrations
2+
3+
import android.content.Intent
4+
import androidx.appcompat.app.AppCompatActivity
5+
import android.os.Bundle
6+
import com.example.androidstudio.motionlayoutintegrations.databinding.ActivityMainBinding
7+
8+
class MainActivity : AppCompatActivity() {
9+
10+
override fun onCreate(savedInstanceState: Bundle?) {
11+
super.onCreate(savedInstanceState)
12+
val binding = ActivityMainBinding.inflate(layoutInflater)
13+
val view = binding.root
14+
setContentView(view)
15+
16+
binding.entranceButton.setOnClickListener {
17+
val intent = Intent(this, Entrance::class.java)
18+
startActivity(intent)
19+
}
20+
binding.toolbarButton.setOnClickListener {
21+
val intent = Intent(this, CollapsingToolbar::class.java)
22+
startActivity(intent)
23+
}
24+
binding.viewPagerButton.setOnClickListener {
25+
val intent = Intent(this, ViewPagerCarousel::class.java)
26+
startActivity(intent)
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)