Skip to content

Commit fcd9eda

Browse files
committed
Added drawables
1 parent 5b016e6 commit fcd9eda

File tree

9 files changed

+270
-26
lines changed

9 files changed

+270
-26
lines changed

.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<gradient
5+
android:startColor="#FF1B2338"
6+
android:endColor="#FF1C2747"
7+
android:angle="90"/>
8+
</shape>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<gradient
5+
android:startColor="#FFFFFF"
6+
android:endColor="#FFFFFF"
7+
android:angle="90"/>
8+
9+
<corners
10+
android:radius="10dp"/>
11+
</shape>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
2+
<corners
3+
android:radius="20dp"
4+
/>
5+
<solid
6+
android:color="#1349B6"
7+
/>
8+
<size
9+
android:width="150dp"
10+
android:height="30dp"
11+
/>
12+
</shape>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
3+
<corners
4+
android:radius="10dp"
5+
/>
6+
<solid
7+
android:color="#2690ED"
8+
/>
9+
<size
10+
android:width="300dp"
11+
android:height="30dp"
12+
/>
13+
</shape>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FFFFFF"
8+
android:pathData="M12,5.9c1.16,0 2.1,0.94 2.1,2.1s-0.94,2.1 -2.1,2.1S9.9,9.16 9.9,8s0.94,-2.1 2.1,-2.1m0,9c2.97,0 6.1,1.46 6.1,2.1v1.1L5.9,18.1L5.9,17c0,-0.64 3.13,-2.1 6.1,-2.1M12,4C9.79,4 8,5.79 8,8s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,13c-2.67,0 -8,1.34 -8,4v3h16v-3c0,-2.66 -5.33,-4 -8,-4z"/>
9+
</vector>

app/src/main/res/layout/activity_connect_to_user.xml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,24 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7+
android:background="@color/black"
78
tools:context=".ConnectToUserActivity"
89
android:orientation="vertical"
910
android:gravity="center">
10-
11+
<LinearLayout
12+
android:orientation="vertical"
13+
android:layout_width="match_parent"
14+
android:layout_height="match_parent">
15+
<ImageView
16+
android:background="@drawable/background_gradient"
17+
android:layout_weight="1"
18+
android:layout_width="match_parent"
19+
android:layout_height="0dp" />
20+
<ImageView
21+
android:layout_weight="1"
22+
android:layout_width="match_parent"
23+
android:layout_height="0dp" />
24+
</LinearLayout>
1125
<LinearLayout
1226
android:id="@+id/linearLayout2"
1327
android:layout_width="match_parent"
@@ -19,20 +33,22 @@
1933
app:layout_constraintBottom_toBottomOf="parent"
2034
app:layout_constraintEnd_toEndOf="parent"
2135
app:layout_constraintTop_toTopOf="parent"
22-
app:layout_constraintVertical_bias="0.286">
36+
app:layout_constraintVertical_bias="0.186">
2337

2438
<TextView
2539
android:id="@+id/textView3"
2640
android:layout_width="wrap_content"
2741
android:layout_height="wrap_content"
42+
android:textColor="#FFFFFF"
2843
android:text="IP Address : "
2944
android:textSize="20sp"
3045
android:textStyle="bold" />
3146

3247
<EditText
3348
android:id="@+id/ipInput"
3449
android:layout_width="match_parent"
35-
android:layout_height="wrap_content"
50+
android:layout_height="35dp"
51+
android:backgroundTint="#fff"
3652
android:inputType="number|textWebEditText" />
3753

3854
</LinearLayout>
@@ -57,6 +73,7 @@
5773
android:id="@+id/textView"
5874
android:layout_width="wrap_content"
5975
android:layout_height="wrap_content"
76+
android:textColor="#FFFFFF"
6077
android:text="Port Number : "
6178
android:textSize="20sp"
6279
android:textStyle="bold" />
@@ -65,6 +82,7 @@
6582
android:id="@+id/portInput"
6683
android:layout_width="match_parent"
6784
android:layout_height="wrap_content"
85+
android:backgroundTint="#fff"
6886
android:inputType="number|textWebEditText" />
6987
</LinearLayout>
7088

@@ -78,11 +96,13 @@
7896
android:layout_marginBottom="8dp"
7997
android:onClick="connectBtnListener"
8098
android:text="Connect"
99+
android:textColor="#FFFFFF"
81100
app:layout_constraintBottom_toBottomOf="parent"
82101
app:layout_constraintEnd_toEndOf="parent"
83102
app:layout_constraintStart_toStartOf="parent"
84103
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
85-
app:layout_constraintVertical_bias="0.069" />
104+
app:layout_constraintVertical_bias="0.03"
105+
android:background="@drawable/buttonscan"/>
86106

87107
<Button
88108
android:id="@+id/scan_button"
@@ -91,9 +111,12 @@
91111
android:layout_marginStart="8dp"
92112
android:layout_marginEnd="8dp"
93113
android:layout_marginBottom="80dp"
114+
android:textColor="#FFFFFF"
94115
android:text="Scan QR CODE"
95116
app:layout_constraintBottom_toBottomOf="parent"
96117
app:layout_constraintEnd_toEndOf="parent"
97118
app:layout_constraintStart_toStartOf="parent"
98-
android:onClick="onScanBtnClick"/>
119+
android:onClick="onScanBtnClick"
120+
android:background="@drawable/buttonscan"
121+
/>
99122
</androidx.constraintlayout.widget.ConstraintLayout>

app/src/main/res/layout/activity_main.xml

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,98 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
6+
android:background="@color/black"
67
android:layout_height="match_parent"
78
tools:context=".MainActivity"
89
android:gravity="center"
910
android:orientation="vertical">
1011

1112
<LinearLayout
12-
android:id="@+id/linearLayout"
13+
android:orientation="vertical"
14+
android:layout_width="match_parent"
15+
android:layout_height="match_parent">
16+
<ImageView
17+
android:background="@drawable/background_gradient"
18+
android:layout_weight="1"
19+
android:layout_width="match_parent"
20+
android:layout_height="0dp" />
21+
<ImageView
22+
android:layout_weight="1"
23+
android:layout_width="match_parent"
24+
android:layout_height="0dp" />
25+
</LinearLayout>
26+
27+
28+
<LinearLayout
29+
1330
android:layout_width="match_parent"
1431
android:layout_height="wrap_content"
15-
android:layout_marginStart="8dp"
16-
android:layout_marginTop="8dp"
17-
android:layout_marginEnd="8dp"
18-
android:layout_marginBottom="8dp"
19-
app:layout_constraintBottom_toTopOf="@+id/showInfo"
32+
android:layout_marginStart="45dp"
33+
android:layout_marginTop="0dp"
34+
android:layout_marginEnd="45dp"
35+
android:layout_marginBottom="0dp"
36+
37+
app:layout_constraintBottom_toTopOf="@+id/enterInfo"
2038
app:layout_constraintEnd_toEndOf="parent"
2139
app:layout_constraintHorizontal_bias="0.0"
2240
app:layout_constraintStart_toStartOf="parent"
2341
app:layout_constraintTop_toTopOf="parent"
24-
app:layout_constraintVertical_bias="0.613">
42+
app:layout_constraintVertical_bias="0.8">
43+
2544

2645
<TextView
2746
android:id="@+id/textView"
2847
android:layout_width="wrap_content"
2948
android:layout_height="wrap_content"
49+
android:textColor="#FFFFFF"
3050
android:text="Name : "
3151
android:textSize="20sp"
3252
android:textStyle="bold"
33-
android:layout_marginLeft="30dp"/>
53+
android:layout_marginLeft="5dp"/>
3454

3555
<EditText
56+
android:drawablePadding="20dp"
57+
android:drawableRight="@drawable/ic_person"
3658
android:id="@+id/nameInput"
3759
android:layout_width="match_parent"
3860
android:layout_height="wrap_content"
39-
android:layout_marginLeft="20dp"
40-
android:layout_marginRight="20dp"
61+
android:backgroundTint="#fff"
62+
android:layout_marginLeft="0dp"
63+
android:layout_marginRight="5dp"
4164
android:paddingLeft="10dp" />
4265
</LinearLayout>
4366

4467
<Button
4568
android:id="@+id/showInfo"
46-
android:layout_width="wrap_content"
47-
android:layout_height="wrap_content"
69+
android:textColor="#FFFFFF"
70+
android:textSize="15sp"
71+
android:layout_width="350dp"
72+
android:layout_height="50dp"
73+
4874
android:layout_marginStart="8dp"
4975
android:layout_marginEnd="8dp"
50-
android:layout_marginBottom="16dp"
76+
android:layout_marginBottom="250dp"
5177
android:text="Show information"
52-
app:layout_constraintBottom_toTopOf="@+id/enterInfo"
78+
app:layout_constraintBottom_toBottomOf="parent"
5379
app:layout_constraintEnd_toEndOf="parent"
54-
app:layout_constraintStart_toStartOf="parent" />
80+
app:layout_constraintStart_toStartOf="parent"
81+
android:background="@drawable/buttonshape"/>
5582

5683
<Button
5784
android:id="@+id/enterInfo"
58-
android:layout_width="wrap_content"
59-
android:layout_height="wrap_content"
85+
android:textColor="#FFFFFF"
86+
android:textSize="15sp"
87+
android:layout_width="350dp"
88+
android:layout_height="50dp"
6089
android:layout_marginStart="8dp"
6190
android:layout_marginEnd="8dp"
62-
android:layout_marginBottom="332dp"
91+
android:layout_marginBottom="16dp"
6392
android:text="Enter Ip : port"
64-
app:layout_constraintBottom_toBottomOf="parent"
93+
app:layout_constraintBottom_toTopOf="@+id/showInfo"
94+
6595
app:layout_constraintEnd_toEndOf="parent"
66-
app:layout_constraintStart_toStartOf="parent" />
96+
app:layout_constraintStart_toStartOf="parent"
97+
android:background="@drawable/buttonshape"/>
6798

6899

69100
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)