Skip to content

Commit b7447f6

Browse files
authored
Merge pull request #93 from hossain-khan/move-compose-up
[MINOR] Moved compose example first
2 parents 68b4cb6 + aec33db commit b7447f6

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

example/src/main/java/dev/hossain/ynaash/example/ui/demoprismjs/PrismJsComposeDemoActivity.kt

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,26 @@ fun PrismJsComposeDemoScreen() {
107107
text = "Jetpack Compose Syntax Highlighting",
108108
style = MaterialTheme.typography.headlineMedium
109109
)
110+
111+
Text(
112+
text = "Jetpack Compose View Example",
113+
style = MaterialTheme.typography.titleMedium
114+
)
115+
116+
Card(
117+
modifier = Modifier
118+
.fillMaxWidth()
119+
.height(170.dp)
120+
) {
121+
SyntaxHighlighter(
122+
sourceCode = SampleSourceCode.jetpackComposeView,
123+
language = "kotlin",
124+
showLineNumbers = false,
125+
modifier = Modifier.fillMaxSize()
126+
)
127+
}
128+
129+
Spacer(modifier = Modifier.height(8.dp))
110130

111131
Text(
112132
text = "Fragment onViewCreated Example",
@@ -162,23 +182,7 @@ fun PrismJsComposeDemoScreen() {
162182
)
163183
}
164184

165-
Text(
166-
text = "Compose Example",
167-
style = MaterialTheme.typography.titleMedium
168-
)
169185

170-
Card(
171-
modifier = Modifier
172-
.fillMaxWidth()
173-
.height(200.dp)
174-
) {
175-
SyntaxHighlighter(
176-
sourceCode = SampleSourceCode.jetpackComposeView,
177-
language = "kotlin",
178-
showLineNumbers = false,
179-
modifier = Modifier.fillMaxSize()
180-
)
181-
}
182186
Spacer(modifier = Modifier.height(32.dp))
183187
}
184188
}

0 commit comments

Comments
 (0)