Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
testDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyh
testDemo
Commits
3d2a4c34
Commit
3d2a4c34
authored
Dec 24, 2025
by
jiangyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android页面
parent
ebf023b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
MainActivity.kt
...c/androidMain/kotlin/com/example/testdemo/MainActivity.kt
+15
-3
libkn.so
harmonyapp/entry/libs/arm64-v8a/libkn.so
+0
-0
No files found.
composeApp/src/androidMain/kotlin/com/example/testdemo/MainActivity.kt
View file @
3d2a4c34
package
com.example.testdemo
import
android.app.Activity
import
android.os.Bundle
import
android.view.Gravity
import
android.widget.LinearLayout
import
android.widget.TextView
import
androidx.activity.ComponentActivity
import
androidx.activity.compose.setContent
...
...
@@ -13,10 +16,19 @@ class MainActivity : ComponentActivity() {
val
message
=
com
.
example
.
testdemo
.
appInfo
()
// 如果你用原生 View
setContentView
(
TextView
(
this
).
apply
{
val
root
=
LinearLayout
(
this
).
apply
{
orientation
=
LinearLayout
.
VERTICAL
gravity
=
Gravity
.
CENTER
setPadding
(
24
,
24
,
24
,
24
)
}
val
msgView
=
TextView
(
this
).
apply
{
text
=
message
textSize
=
24f
})
}
root
.
addView
(
msgView
)
setContentView
(
root
)
}
}
\ No newline at end of file
harmonyapp/entry/libs/arm64-v8a/libkn.so
View file @
3d2a4c34
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment