Skip to content

Commit 4edfa2a

Browse files
committed
Merge branch 'develop'
# Conflicts: # .gitignore
2 parents a4e8643 + f4fcd2c commit 4edfa2a

File tree

1,016 files changed

+171441
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,016 files changed

+171441
-940
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ lint/tmp/
8686

8787
ComposePlane/.idea/
8888

89+
AndroidDoubleColorBall/\.idea/
90+
8991
AndroidComposeExamples/.idea/
9092

9193
AndroidGradlePluginsSample/.idea/
@@ -97,3 +99,5 @@ AndroidJetpackComposeSample/.idea/
9799
ASanTest/\.idea/
98100

99101
LooperLinearLayoutManager/\.idea/
102+
103+
\.idea/

AndroidASMSample/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'greeting'
55
}
66

7-
apply plugin: 'asm-gradle-plugin'
7+
//pply plugin: 'asm-gradle-plugin'
88

99
android {
1010
compileSdk 31

AndroidASMSample/gradle.properties

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1717
android.useAndroidX=true
1818
# Automatically convert third-party libraries to use AndroidX
1919
android.enableJetifier=true
20-
org.gradle.java.home=/work/android/android-studio-4.0/android-studio/jre
20+
# 替换成实际的JDK 11的路径
21+
org.gradle.java.home=/work/android/android-studio/jre
22+
23+
# 填入成你自己的key和secret
24+
gradle.publish.key=AJaM95kZyhPcGMOUcAeHfi4v93dHL96d
25+
gradle.publish.secret=ZeBa9hltMiExByWoFtl4LGHExjrQk93n

AndroidASMSample/keystore.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 线上版本持续集成使用环境变量,本地开发时手动填上对应的值
2+
gradlePublishKey = AJaM95kZyhPcGMOUcAeHfi4v93dHL96d
3+
gradlePublishSecret= gradle.publish.secret=ZeBa9hltMiExByWoFtl4LGHExjrQk93n

AndroidComposeExamples/app/src/main/java/com/nxg/compose/MainActivity.kt

+36-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ package com.nxg.compose
22

33
import android.animation.ArgbEvaluator
44
import android.os.Bundle
5+
import android.util.Log
56
import androidx.activity.ComponentActivity
67
import androidx.activity.compose.setContent
78
import androidx.compose.animation.core.*
89
import androidx.compose.foundation.background
910
import androidx.compose.foundation.clickable
10-
import androidx.compose.foundation.layout.Box
11-
import androidx.compose.foundation.layout.fillMaxSize
12-
import androidx.compose.foundation.layout.size
11+
import androidx.compose.foundation.layout.*
1312
import androidx.compose.foundation.shape.RoundedCornerShape
1413
import androidx.compose.material.MaterialTheme
1514
import androidx.compose.material.Surface
@@ -18,6 +17,7 @@ import androidx.compose.runtime.*
1817
import androidx.compose.ui.Alignment
1918
import androidx.compose.ui.Modifier
2019
import androidx.compose.ui.graphics.Color
20+
import androidx.compose.ui.graphics.graphicsLayer
2121
import androidx.compose.ui.text.TextStyle
2222
import androidx.compose.ui.tooling.preview.Preview
2323
import androidx.compose.ui.unit.dp
@@ -32,9 +32,9 @@ class MainActivity : ComponentActivity() {
3232
AndroidComposeExamplesTheme {
3333
// A surface container using the 'background' color from the theme
3434
Surface(color = MaterialTheme.colors.background) {
35-
Greeting("Android")
35+
//Greeting("Android")
3636

37-
TestComposeGradientColorAnimate()
37+
TestComposeGradientColorAnimate2()
3838
}
3939
}
4040
}
@@ -43,6 +43,7 @@ class MainActivity : ComponentActivity() {
4343

4444
@Composable
4545
fun Greeting(name: String) {
46+
4647
Text(text = "Hello $name!")
4748
}
4849

@@ -130,3 +131,33 @@ fun TestComposeGradientColorAnimate() {
130131
}
131132

132133
}
134+
135+
136+
/**
137+
* 测试渐变动画
138+
*/
139+
@Composable
140+
fun TestComposeGradientColorAnimate2() {
141+
142+
//触发渐变动画用的状态
143+
var state by remember {
144+
mutableStateOf(0)
145+
}
146+
147+
148+
149+
print("state $state")
150+
151+
Box(
152+
modifier = Modifier
153+
.size(100.dp)
154+
.background(Color.DarkGray)
155+
.offset(x = 100.dp, y = (100).dp)
156+
.clickable {
157+
print("触发渐变动画-------->")
158+
state++
159+
}
160+
)
161+
162+
}
163+

AndroidDoubleColorBall/.idea/gradle.xml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AndroidDoubleColorBall/.idea/misc.xml

+17-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AndroidDoubleColorBall/ScrollView/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ dependencies {
4141
testImplementation 'junit:junit:4.+'
4242
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
4343
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
44+
implementation 'com.github.xiangang:LooperLinearLayoutManager:v1.0.0-alpha01'
4445
}

AndroidDoubleColorBall/ScrollView/src/main/java/com/nxg/srollview/widget/LooperLinearLayoutManager.java

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import androidx.annotation.NonNull;
3333
import androidx.core.view.ViewCompat;
3434
import androidx.recyclerview.widget.ItemTouchHelper;
35-
import androidx.recyclerview.widget.LinearLayoutManager;
3635
import androidx.recyclerview.widget.LinearSmoothScroller;
3736
import androidx.recyclerview.widget.OrientationHelper;
3837
import androidx.recyclerview.widget.RecyclerView;

AndroidDoubleColorBall/app/src/main/java/com/nxg/ssq/ui/notifications/NotificationsFragment.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ class NotificationsFragment : Fragment() {
5656
val scrollView6: ScrollView = binding.scrollView6
5757
val scrollView7: ScrollView = binding.scrollView7
5858
val configurationBlue = ScrollView.build {
59-
scrollAnimatorDuration = 6000L
59+
scrollAnimatorDuration = 3000L
6060
itemLayoutId = R.layout.item_text_blue
6161
}
6262
val configurationRed = ScrollView.build {
63-
scrollAnimatorDuration = 6000L
63+
scrollAnimatorDuration = 3000L
6464
itemLayoutId = R.layout.item_text_red
6565
}
6666
scrollView.setConfiguration(configurationRed)

AndroidDoubleColorBall/app/src/main/res/drawable/shape_scroll_view_blue.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77

88
<solid android:color="@android:color/transparent" />
99

10-
<corners android:radius="20dp" />
10+
<corners android:radius="22dp" />
1111
</shape>

AndroidDoubleColorBall/app/src/main/res/drawable/shape_scroll_view_red.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77

88
<solid android:color="@android:color/transparent" />
99

10-
<corners android:radius="20dp" />
10+
<corners android:radius="22dp" />
1111
</shape>

AndroidDoubleColorBall/app/src/main/res/layout/fragment_notifications.xml

+14-14
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
app:layout_constraintVertical_bias="0.3">
3434

3535
<LinearLayout
36-
android:layout_width="wrap_content"
37-
android:layout_height="wrap_content"
36+
android:layout_width="44dp"
37+
android:layout_height="44dp"
3838
android:background="@drawable/shape_scroll_view_red"
3939
android:gravity="center"
4040
android:orientation="vertical"
@@ -56,8 +56,8 @@
5656
android:layout_height="match_parent" />
5757

5858
<LinearLayout
59-
android:layout_width="wrap_content"
60-
android:layout_height="wrap_content"
59+
android:layout_width="44dp"
60+
android:layout_height="44dp"
6161
android:background="@drawable/shape_scroll_view_red"
6262
android:gravity="center"
6363
android:orientation="vertical"
@@ -80,8 +80,8 @@
8080

8181

8282
<LinearLayout
83-
android:layout_width="wrap_content"
84-
android:layout_height="wrap_content"
83+
android:layout_width="44dp"
84+
android:layout_height="44dp"
8585
android:background="@drawable/shape_scroll_view_red"
8686
android:gravity="center"
8787
android:orientation="vertical"
@@ -103,8 +103,8 @@
103103
android:layout_height="match_parent" />
104104

105105
<LinearLayout
106-
android:layout_width="wrap_content"
107-
android:layout_height="wrap_content"
106+
android:layout_width="44dp"
107+
android:layout_height="44dp"
108108
android:background="@drawable/shape_scroll_view_red"
109109
android:gravity="center"
110110
android:orientation="vertical"
@@ -126,8 +126,8 @@
126126
android:layout_height="match_parent" />
127127

128128
<LinearLayout
129-
android:layout_width="wrap_content"
130-
android:layout_height="wrap_content"
129+
android:layout_width="44dp"
130+
android:layout_height="44dp"
131131
android:background="@drawable/shape_scroll_view_red"
132132
android:gravity="center"
133133
android:orientation="vertical"
@@ -150,8 +150,8 @@
150150

151151

152152
<LinearLayout
153-
android:layout_width="wrap_content"
154-
android:layout_height="wrap_content"
153+
android:layout_width="44dp"
154+
android:layout_height="44dp"
155155
android:background="@drawable/shape_scroll_view_red"
156156
android:gravity="center"
157157
android:orientation="vertical"
@@ -173,8 +173,8 @@
173173
android:layout_height="match_parent" />
174174

175175
<LinearLayout
176-
android:layout_width="wrap_content"
177-
android:layout_height="wrap_content"
176+
android:layout_width="44dp"
177+
android:layout_height="44dp"
178178
android:background="@drawable/shape_scroll_view_blue"
179179
android:gravity="center"
180180
android:orientation="vertical"

AndroidGradlePluginsSample/StandaloneGradlePluginProject/build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'java-gradle-plugin'
33
id 'maven-publish'
4+
id 'org.jetbrains.kotlin.jvm' // 注意要应用Kotlin 插件
45
}
56

67
//定义Maven仓库信息
@@ -33,8 +34,6 @@ publishing {
3334
maven {
3435
url = layout.buildDirectory.dir(MAVEN_NAME)
3536
}
36-
maven {
37-
url = "/home/xiangang/.m2/repository/"
38-
}
37+
mavenLocal()
3938
}
4039
}

AndroidGradlePluginsSample/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ plugins {
22
id 'com.android.application'
33
id 'kotlin-android'
44
id 'com.nxg.plugins.greeting'
5-
//如果是本地没发过该插件,需要先注释掉这里,插件发布后在打开注释
6-
id 'com.nxg.plugins.greeting-standalone' version '1.0.0'
5+
//如果本地没发布过该插件,需要先注释掉这里,插件发布后再打开注释
6+
//id 'com.nxg.plugins.greeting-standalone' version '1.0.0'
77
}
88

99

AndroidGradlePluginsSample/gradle.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ android.useAndroidX=true
1919
android.enableJetifier=true
2020
# Kotlin code style for this project: "official" or "obsolete":
2121
kotlin.code.style=official
22-
org.gradle.java.home=/work/android/android-studio-4.0/android-studio/jre
22+
# 替换成实际的JDK 11的路径
23+
org.gradle.java.home=/work/android/android-studio/jre

AndroidGradlePluginsSample/settings.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ pluginManagement {
1111
repositories {
1212
mavenLocal()
1313
gradlePluginPortal()
14-
maven {
15-
url = "/home/xiangang/.m2/repository/"
16-
}
1714
}
1815
}
1916
dependencyResolutionManagement {

AndroidJetpackComposeSample/AudioRecordUtil/src/androidTest/java/com/nxg/audiorecord/ExampleInstrumentedTest.java

-26
This file was deleted.

0 commit comments

Comments
 (0)