Return to full description Technique to create Button with own rectangle shape
1: <?xml version="1.0" encoding="utf-8"?>
2: <androidx.constraintlayout.widget.ConstraintLayout
3: xmlns:android="http://schemas.android.com/apk/res/android"
4: xmlns:app="http://schemas.android.com/apk/res-auto"
5: xmlns:tools="http://schemas.android.com/tools"
6: android:layout_width="match_parent"
7: android:id="@+id/main"
8: android:layout_height="match_parent"
9: tools:context=".activities.DialerActivity">
10:
11: <EditText
12: android:id="@+id/phoneNumberEditText"
13: android:layout_width="0dp"
14: android:layout_height="wrap_content"
15: android:layout_marginBottom="16dp"
16: android:background="@drawable/edit_text_border"
17: android:hint="@string/enter_phone_number"
18: android:inputType="phone"
19: android:padding="12dp"
20: android:textSize="20sp"
21: app:layout_constraintEnd_toEndOf="parent"
22: app:layout_constraintStart_toStartOf="parent"
23: app:layout_constraintTop_toTopOf="parent" />
24:
25: <GridLayout
26: android:id="@+id/dailPad"
27: android:layout_width="0dp"
28: android:layout_height="wrap_content"
29: android:columnCount="3"
30: android:columnOrderPreserved="true"
31: android:rowCount="4"
32: app:layout_constraintEnd_toEndOf="parent"
33: app:layout_constraintStart_toStartOf="parent"
34: app:layout_constraintTop_toBottomOf="@id/phoneNumberEditText">
35:
36: <Button
37: android:id="@+id/button1"
38: style="@style/DialerButton"
39: android:text="1" />
40:
41: <Button
42: android:id="@+id/button2"
43: style="@style/DialerButton"
44: android:text="2" />
45:
46: <Button
47: android:id="@+id/button3"
48: style="@style/DialerButton"
49: android:text="3" />
50:
51: <Button
52: android:id="@+id/button4"
53: style="@style/DialerButton"
54: android:text="4" />
55:
56: <Button
57: android:id="@+id/button5"
58: style="@style/DialerButton"
59: android:text="5" />
60:
61: <Button
62: android:id="@+id/button6"
63: style="@style/DialerButton"
64: android:text="6" />
65:
66: <Button
67: android:id="@+id/button7"
68: style="@style/DialerButton"
69: android:text="7" />
70:
71: <Button
72: android:id="@+id/button8"
73: style="@style/DialerButton"
74: android:text="8" />
75:
76: <Button
77: android:id="@+id/button9"
78: style="@style/DialerButton"
79: android:text="9" />
80:
81: <Button
82: android:id="@+id/buttonStar"
83: style="@style/DialerButton"
84: android:text="*" />
85:
86: <Button
87: android:id="@+id/button0"
88: style="@style/DialerButton"
89: android:text="0"
90: android:drawableBottom="@drawable/plus_sign"
91: android:gravity="center"
92: android:paddingBottom="8dp" />
93:
94: <Button
95: android:id="@+id/buttonHash"
96: style="@style/DialerButton"
97: android:text="#" />
98:
99: </GridLayout>
100:
101: <Button
102: android:id="@+id/callButton"
103: android:layout_width="0dp"
104: android:layout_height="wrap_content"
105: android:layout_marginTop="16dp"
106: android:backgroundTint="@color/voip"
107: android:text="Voice Call by phone"
108: android:textColor="@color/white"
109: app:layout_constraintEnd_toEndOf="parent"
110: app:layout_constraintStart_toStartOf="parent"
111: app:layout_constraintTop_toBottomOf="@id/dailPad" />
112:
113: <Button
114: android:id="@+id/callVoiceVoipsButton"
115: android:layout_width="0dp"
116: android:layout_height="wrap_content"
117: android:layout_marginTop="16dp"
118: android:backgroundTint="@color/voip"
119: android:text="Voice Call by VOIP"
120: android:textColor="@color/white"
121: app:layout_constraintEnd_toEndOf="parent"
122: app:layout_constraintStart_toStartOf="parent"
123: app:layout_constraintTop_toBottomOf="@id/callButton" />
124:
125: <Button
126: android:id="@+id/addContactButton"
127: android:layout_width="0dp"
128: android:layout_height="wrap_content"
129: android:layout_marginTop="16dp"
130: android:backgroundTint="@color/voip"
131: android:text="Add To Contact"
132: android:textColor="@color/white"
133: app:layout_constraintEnd_toEndOf="parent"
134: app:layout_constraintStart_toStartOf="parent"
135: app:layout_constraintTop_toBottomOf="@id/callVoiceVoipsButton" />
136:
137: <com.google.android.material.tabs.TabLayout
138: android:id="@+id/tabLayout"
139: android:layout_width="match_parent"
140: android:layout_height="wrap_content"
141: android:background="@color/material_dynamic_neutral90"
142: app:layout_constraintBottom_toBottomOf="parent"
143: app:layout_constraintEnd_toEndOf="parent"
144: app:layout_constraintStart_toStartOf="parent"/>
145:
146: </androidx.constraintlayout.widget.ConstraintLayout>
147:
Return to full description
AndroidMosaic context:
- 2025 year: Resolve class conflicts #AndroidMosaic
- 2025 year: Application level parameters in configuration #AndroidMosaic
- 2025 year: Create test with junit and pass or dismiss test before application launch #AndroidMosaic
- 2025 year: Ask special permission and listen answer #AndroidMosaic
- 2025 year: Service lifecycle #AndroidMosaic
- 2025 year: AtomicInteger and accept service callback in UI thread, stop progressBar that was run in UiThread #AndroidMosaic
- 2025 year: Generate random data and pass it to RecyclerView with Adapter #AndroidMosaic
- 2025 year: Pass data to new form with Intent and getParcelableExtra #AndroidMosaic
- 2025 year: Access to Contact list #AndroidMosaic
- 2025 year: Using Query and Cursor to read data sequence and fill DataAdapter for RecyclerView #AndroidMosaic
- 2025 year: Custom TabSwithcer #AndroidMosaic
- 2025 year: Custom Dropdownlist with default value based on Spinner #AndroidMosaic
- 2025 year: Create MMS service and route MMS to Emulator #AndroidMosaic
- 2025 year: Vector drawable - fastest way to create icons #AndroidMosaic
- 2025 year: Technique to create Button with own rectangle shape #AndroidMosaic
- 2025 year: Simple HTTP service #AndroidMosaic
- 2025 year: Simple key-value service with Local Storage #AndroidMosaic
- 2025 year: Cryptographic local storage key-value service #AndroidMosaic
- 2025 year: WebRTC service #AndroidMosaic
- 2025 year: SIP service #AndroidMosaic
- 2025 year: Global objects with references to all application services #AndroidMosaic
Comments (
)

Link to this page:
http://www.vb-net.com/AndroidMosaic/Index15.htm
|