Skip to content

Most visited

Recently visited

navigation
FingerprintDialog / res / layout /

activity_main.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
  ~ Copyright (C) 2015 The Android Open Source Project
4
  ~
5
  ~ Licensed under the Apache License, Version 2.0 (the "License");
6
  ~ you may not use this file except in compliance with the License.
7
  ~ You may obtain a copy of the License at
8
  ~
9
  ~      http://www.apache.org/licenses/LICENSE-2.0
10
  ~
11
  ~ Unless required by applicable law or agreed to in writing, software
12
  ~ distributed under the License is distributed on an "AS IS" BASIS,
13
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
  ~ See the License for the specific language governing permissions and
15
  ~ limitations under the License
16
  -->
17
<ScrollView
18
        xmlns:android="http://schemas.android.com/apk/res/android"
19
        android:layout_width="match_parent"
20
        android:layout_height="match_parent">
21
 
22
    <LinearLayout
23
            android:layout_width="match_parent"
24
            android:layout_height="wrap_content"
25
            android:orientation="vertical">
26
 
27
        <ImageView
28
                android:layout_width="150dp"
29
                android:layout_height="150dp"
30
                android:layout_marginTop="32dp"
31
                android:layout_marginBottom="32dp"
32
                android:layout_gravity="center_horizontal"
33
                android:scaleType="fitCenter"
34
                android:src="@drawable/android_robot"
35
                android:contentDescription="@string/description_bugdroid_icon"/>
36
 
37
        <LinearLayout
38
                android:layout_width="match_parent"
39
                android:layout_height="wrap_content"
40
                android:layout_marginTop="8dp"
41
                android:layout_marginStart="8dp"
42
                android:layout_marginEnd="8dp"
43
                android:orientation="vertical"
44
                android:background="@drawable/card"
45
                android:elevation="4dp"
46
                android:paddingTop="16dp"
47
                android:paddingBottom="16dp"
48
                android:paddingStart="16dp"
49
                android:paddingEnd="16dp">
50
 
51
            <TextView
52
                    android:layout_width="wrap_content"
53
                    android:layout_height="wrap_content"
54
                    android:textAppearance="@android:style/TextAppearance.Material.Headline"
55
                    android:text="@string/item_title"/>
56
 
57
            <TextView
58
                    android:layout_width="wrap_content"
59
                    android:layout_height="wrap_content"
60
                    android:textAppearance="@android:style/TextAppearance.Material.Body2"
61
                    android:textColor="?android:attr/colorAccent"
62
                    android:text="@string/item_price"/>
63
 
64
            <TextView
65
                    android:layout_width="wrap_content"
66
                    android:layout_height="wrap_content"
67
                    android:layout_marginTop="16dp"
68
                    android:textAppearance="@android:style/TextAppearance.Material.Body1"
69
                    android:textColor="?android:attr/textColorSecondary"
70
                    android:text="@string/item_description"/>
71
 
72
        </LinearLayout>
73
        <Button style="@android:style/Widget.Material.Button.Colored"
74
                android:layout_width="wrap_content"
75
                android:layout_height="wrap_content"
76
                android:layout_marginTop="8dp"
77
                android:layout_marginEnd="4dp"
78
                android:layout_gravity="end"
79
                android:textColor="?android:attr/textColorPrimaryInverse"
80
                android:text="@string/purchase"
81
                android:id="@+id/purchase_button" />
82
 
83
        <Button style="@android:style/Widget.Material.Button.Colored"
84
            android:layout_width="wrap_content"
85
            android:layout_height="wrap_content"
86
            android:layout_marginTop="8dp"
87
            android:layout_marginEnd="4dp"
88
            android:layout_gravity="end"
89
            android:textColor="?android:attr/textColorPrimaryInverse"
90
            android:text="@string/purchase_not_invalidated"
91
            android:id="@+id/purchase_button_not_invalidated" />
92
 
93
        <TextView
94
            android:id="@+id/purchase_button_not_invalidated_description"
95
            android:layout_width="match_parent"
96
            android:layout_height="wrap_content"
97
            android:layout_marginEnd="4dp"
98
            android:gravity="end"
99
            android:textAlignment="gravity"
100
            android:text="@string/purchase_button_not_invalidated_description"
101
            />
102
 
103
        <TextView
104
                android:id="@+id/confirmation_message"
105
                android:layout_width="wrap_content"
106
                android:layout_height="wrap_content"
107
                android:layout_marginTop="16dp"
108
                android:paddingStart="16dp"
109
                android:paddingEnd="16dp"
110
                android:textAppearance="@android:style/TextAppearance.Material.Body2"
111
                android:textColor="?android:attr/colorAccent"
112
                android:text="@string/purchase_done"
113
                android:visibility="gone"/>
114
 
115
        <TextView
116
                android:id="@+id/encrypted_message"
117
                android:layout_width="wrap_content"
118
                android:layout_height="wrap_content"
119
                android:layout_marginTop="16dp"
120
                android:paddingStart="16dp"
121
                android:paddingEnd="16dp"
122
                android:textAppearance="@android:style/TextAppearance.Material.Body2"
123
                android:textColor="?android:attr/colorAccent"
124
                android:text="@string/purchase_done"
125
                android:visibility="gone"/>
126
    </LinearLayout>
127
</ScrollView>
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.