Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Android Exercises
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
AC5636
Android Exercises
Commits
440b4e8f
Unverified
Commit
440b4e8f
authored
11 months ago
by
AC5636
Browse files
Options
Downloads
Patches
Plain Diff
Update readme
parent
91ad9f71
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
BLT_NFC/README.md
+1
-0
1 addition, 0 deletions
BLT_NFC/README.md
BLT_NFC/app/src/main/java/com/example/blt_nfc/MainActivity.kt
+11
-7
11 additions, 7 deletions
...NFC/app/src/main/java/com/example/blt_nfc/MainActivity.kt
with
12 additions
and
7 deletions
BLT_NFC/README.md
+
1
−
0
View file @
440b4e8f
...
@@ -19,6 +19,7 @@ I have spent a lot of time to understand the basics of Android development and N
...
@@ -19,6 +19,7 @@ I have spent a lot of time to understand the basics of Android development and N
## Features
## Features
-
[x] Read data from an NFC tag
-
[x] Read data from an NFC tag
-
[x] Selectable text after the NFC tag is read
-
[x] Write data to an NFC tag
-
[x] Write data to an NFC tag
-
[x] Observe NFC tag state change
-
[x] Observe NFC tag state change
-
[x] Survive configuration changes
-
[x] Survive configuration changes
...
...
This diff is collapsed.
Click to expand it.
BLT_NFC/app/src/main/java/com/example/blt_nfc/MainActivity.kt
+
11
−
7
View file @
440b4e8f
...
@@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
...
@@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import
androidx.compose.foundation.layout.padding
import
androidx.compose.foundation.layout.padding
import
androidx.compose.foundation.layout.width
import
androidx.compose.foundation.layout.width
import
androidx.compose.foundation.rememberScrollState
import
androidx.compose.foundation.rememberScrollState
import
androidx.compose.foundation.text.selection.SelectionContainer
import
androidx.compose.foundation.verticalScroll
import
androidx.compose.foundation.verticalScroll
import
androidx.compose.material.icons.Icons
import
androidx.compose.material.icons.Icons
import
androidx.compose.material.icons.filled.Check
import
androidx.compose.material.icons.filled.Check
...
@@ -123,7 +124,7 @@ class MainActivity : ComponentActivity() {
...
@@ -123,7 +124,7 @@ class MainActivity : ComponentActivity() {
if
(
uiState
.
value
.
isNFCAvailable
)
{
if
(
uiState
.
value
.
isNFCAvailable
)
{
AssistChip
(
AssistChip
(
onClick
=
{
/*TODO*/
},
onClick
=
{
/*TODO*/
},
label
=
{
Text
(
text
=
if
(
uiState
.
value
.
isNFCEnabled
)
"Enabled"
else
"Disabled"
)
},
label
=
{
Text
(
text
=
if
(
uiState
.
value
.
isNFCEnabled
)
"Enabled"
else
"Disabled"
)
},
leadingIcon
=
{
leadingIcon
=
{
Icon
(
Icon
(
imageVector
=
if
(
uiState
.
value
.
isNFCEnabled
)
Icons
.
Filled
.
Check
else
Icons
.
Filled
.
Close
,
imageVector
=
if
(
uiState
.
value
.
isNFCEnabled
)
Icons
.
Filled
.
Check
else
Icons
.
Filled
.
Close
,
...
@@ -172,12 +173,15 @@ class MainActivity : ComponentActivity() {
...
@@ -172,12 +173,15 @@ class MainActivity : ComponentActivity() {
}
}
Divider
(
modifier
=
Modifier
.
padding
(
top
=
16
.
dp
,
bottom
=
4
.
dp
))
Divider
(
modifier
=
Modifier
.
padding
(
top
=
16
.
dp
,
bottom
=
4
.
dp
))
Column
(
modifier
=
Modifier
.
verticalScroll
(
state
=
rememberScrollState
()))
{
SelectionContainer
{
// TechList
Column
(
modifier
=
Modifier
.
verticalScroll
(
state
=
rememberScrollState
()))
{
Text
(
text
=
getSection
(
"TechList"
,
uiState
.
value
.
techList
))
Divider
(
modifier
=
Modifier
.
padding
(
vertical
=
4
.
dp
))
// TechList
// Records
Text
(
text
=
getSection
(
"TechList"
,
uiState
.
value
.
techList
))
Text
(
text
=
getSection
(
"Records"
,
uiState
.
value
.
records
))
Divider
(
modifier
=
Modifier
.
padding
(
vertical
=
4
.
dp
))
// Records
Text
(
text
=
getSection
(
"Records"
,
uiState
.
value
.
records
))
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment