1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<LinearLayout xmlns : android =" http://schemas.android.com/apk/res/android"
3
+ xmlns : app =" http://schemas.android.com/apk/res-auto"
3
4
xmlns : tools =" http://schemas.android.com/tools"
4
5
android : layout_width =" match_parent"
5
- xmlns : app =" http://schemas.android.com/apk/res-auto"
6
- android : orientation =" vertical"
7
- android : gravity =" center"
8
6
android : layout_height =" match_parent"
7
+ android : gravity =" center"
8
+ android : orientation =" vertical"
9
9
tools : context =" .MainActivity" >
10
10
11
11
<androidx .constraintlayout.widget.ConstraintLayout
12
12
android : layout_width =" match_parent"
13
- android : orientation =" horizontal"
14
- android : gravity =" center"
15
13
android : layout_height =" wrap_content"
14
+ android : layout_marginTop =" ?actionBarSize"
15
+ android : gravity =" center"
16
+ android : orientation =" horizontal"
16
17
tools : context =" .MainActivity" >
17
18
18
- <Button
19
- android : layout_marginTop = " 20dp "
20
- app : layout_constraintTop_toTopOf = " parent "
21
- app : layout_constraintStart_toStartOf = " parent "
22
- app : layout_constraintEnd_toEndOf = " parent "
23
- android : layout_marginStart =" 30dp"
24
- android : layout_marginEnd =" 30dp"
25
- android : id =" @+id/onlinePdf "
26
- android : backgroundTint = " @color/colorPrimary "
27
- android : textColor =" #ffffff"
28
- android : layout_width = " 0dp "
29
- android : layout_height = " wrap_content "
30
- android : text = " Sample Online PDF " />
19
+ <Button
20
+ android : id = " @+id/onlinePdf "
21
+ android : layout_marginTop = " ?actionBarSize "
22
+ android : layout_width = " 0dp "
23
+ android : layout_height = " wrap_content "
24
+ android : layout_marginStart =" 30dp"
25
+ android : layout_marginEnd =" 30dp"
26
+ android : backgroundTint =" @color/colorPrimary "
27
+ android : text = " Sample Online PDF "
28
+ android : textColor =" #ffffff"
29
+ app : layout_constraintEnd_toEndOf = " parent "
30
+ app : layout_constraintStart_toStartOf = " parent "
31
+ app : layout_constraintTop_toTopOf = " parent " />
31
32
32
33
<Button
33
34
android : id =" @+id/pickPdfButton"
34
35
android : layout_width =" 0dp"
35
36
android : layout_height =" wrap_content"
37
+ android : layout_marginStart =" 30dp"
38
+ android : layout_marginEnd =" 30dp"
36
39
android : backgroundTint =" @color/colorPrimary"
37
40
android : text =" Pick PDF"
38
41
android : textColor =" #ffffff"
39
- app : layout_constraintTop_toBottomOf =" @id/onlinePdf"
40
- app : layout_constraintStart_toStartOf =" parent"
41
42
app : layout_constraintEnd_toEndOf =" parent"
42
- android : layout_marginStart = " 30dp "
43
- android : layout_marginEnd = " 30dp " />
43
+ app : layout_constraintStart_toStartOf = " parent "
44
+ app : layout_constraintTop_toBottomOf = " @id/onlinePdf " />
44
45
45
46
<Button
46
47
android : id =" @+id/fromAssets"
47
48
android : layout_width =" 0dp"
48
49
android : layout_height =" wrap_content"
50
+ android : layout_marginStart =" 30dp"
51
+ android : layout_marginEnd =" 30dp"
49
52
android : backgroundTint =" @color/colorPrimary"
50
53
android : text =" Sample from assets"
51
54
android : textColor =" #ffffff"
52
- app : layout_constraintTop_toBottomOf =" @id/pickPdfButton"
53
- app : layout_constraintStart_toStartOf =" parent"
54
55
app : layout_constraintEnd_toEndOf =" parent"
55
- android : layout_marginStart = " 30dp "
56
- android : layout_marginEnd = " 30dp " />
56
+ app : layout_constraintStart_toStartOf = " parent "
57
+ app : layout_constraintTop_toBottomOf = " @id/pickPdfButton " />
57
58
58
59
<Button
59
60
android : id =" @+id/openInCompose"
60
61
android : layout_width =" 0dp"
61
62
android : layout_height =" wrap_content"
63
+ android : layout_marginStart =" 30dp"
64
+ android : layout_marginEnd =" 30dp"
62
65
android : backgroundTint =" @color/colorPrimary"
63
66
android : text =" Compose view"
64
67
android : textColor =" #ffffff"
65
- app : layout_constraintTop_toBottomOf =" @id/fromAssets"
66
- app : layout_constraintStart_toStartOf =" parent"
67
68
app : layout_constraintEnd_toEndOf =" parent"
68
- android : layout_marginStart = " 30dp "
69
- android : layout_marginEnd = " 30dp " />
69
+ app : layout_constraintStart_toStartOf = " parent "
70
+ app : layout_constraintTop_toBottomOf = " @id/fromAssets " />
70
71
71
72
72
73
<Button
73
74
android : id =" @+id/showInView"
74
75
android : layout_width =" 0dp"
75
76
android : layout_height =" wrap_content"
77
+ android : layout_marginStart =" 30dp"
78
+ android : layout_marginEnd =" 30dp"
76
79
android : backgroundTint =" @color/colorPrimary"
77
80
android : text =" Show pdf in a View"
78
81
android : textColor =" #ffffff"
79
- app : layout_constraintTop_toBottomOf =" @id/openInCompose"
80
- app : layout_constraintStart_toStartOf =" parent"
81
82
app : layout_constraintEnd_toEndOf =" parent"
82
- android : layout_marginStart = " 30dp "
83
- android : layout_marginEnd = " 30dp " />
83
+ app : layout_constraintStart_toStartOf = " parent "
84
+ app : layout_constraintTop_toBottomOf = " @id/openInCompose " />
84
85
85
86
86
87
</androidx .constraintlayout.widget.ConstraintLayout>
87
88
88
89
89
- <LinearLayout android : layout_width =" match_parent"
90
- android : orientation =" horizontal"
91
- android : gravity =" center"
92
- android : layout_marginTop =" 40dp"
90
+ <LinearLayout
91
+ android : layout_width =" match_parent"
93
92
android : layout_height =" match_parent"
93
+ android : layout_marginTop =" 40dp"
94
+ android : gravity =" center"
95
+ android : orientation =" horizontal"
94
96
tools : context =" .MainActivity" >
95
97
96
- <com .rajat.pdfviewer.PdfRendererView
97
- android : id =" @+id/pdfView"
98
- android : layout_width =" match_parent"
99
- android : layout_height =" match_parent"
100
- app : pdfView_divider =" @drawable/pdf_viewer_divider"
101
- app : pdfView_showDivider =" false" />
98
+ <com .rajat.pdfviewer.PdfRendererView
99
+ android : id =" @+id/pdfView"
100
+ android : layout_width =" match_parent"
101
+ android : layout_height =" match_parent"
102
+ app : pdfView_divider =" @drawable/pdf_viewer_divider"
103
+ app : pdfView_showDivider =" false" />
102
104
</LinearLayout >
103
105
</LinearLayout >
0 commit comments