Skip to content

Commit 4723b31

Browse files
authored
Merge pull request #15 from Bijay555/profile
added profile pages java
2 parents fe18894 + 15842c2 commit 4723b31

17 files changed

+350
-13
lines changed

.idea/codeStyles/Project.xml

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ dependencies {
2626
implementation fileTree(dir: "libs", include: ["*.jar"])
2727
implementation 'androidx.appcompat:appcompat:1.2.0'
2828
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
29+
implementation 'com.google.android.material:material:1.2.1'
30+
implementation 'androidx.navigation:navigation-fragment:2.1.0'
31+
implementation 'androidx.navigation:navigation-ui:2.1.0'
2932
testImplementation 'junit:junit:4.12'
3033
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
3134
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
35+
implementation 'de.hdodenhof:circleimageview:2.1.0'
3236

3337
}

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:supportsRtl="true"
1111
android:theme="@style/AppTheme">
12+
<activity
13+
android:name=".ProfileActivity"
14+
android:label="@string/title_activity_profile"
15+
android:theme="@style/AppTheme.NoActionBar"></activity>
1216
<activity
1317
android:name=".SplashActivity"
1418
android:theme="@style/SplashScreenTheme">

app/src/main/java/com/sanscript/bhavti_abhay/MainActivity.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,31 @@
22

33
import androidx.appcompat.app.AppCompatActivity;
44

5+
import android.content.Intent;
56
import android.os.Bundle;
7+
import android.view.View;
8+
import android.widget.Button;
69

710
public class MainActivity extends AppCompatActivity {
11+
private Button b1;
812

913
@Override
1014
protected void onCreate(Bundle savedInstanceState) {
1115
super.onCreate(savedInstanceState);
1216
setContentView(R.layout.activity_main);
17+
b1=(Button)findViewById(R.id.button);
18+
19+
b1.setOnClickListener(new View.OnClickListener()
20+
{
21+
public void onClick(View v)
22+
{
23+
OpenProfile();
24+
}
25+
});
26+
}
27+
28+
public void OpenProfile(){
29+
Intent intent = new Intent(this, ProfileActivity.class);
30+
startActivity(intent);
1331
}
1432
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.sanscript.bhavti_abhay;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
6+
public class ProfileActivity extends Activity {
7+
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
setContentView(R.layout.profile_main);
12+
13+
}
14+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="28dp" android:tint="#FF6D75"
2+
android:viewportHeight="24" android:viewportWidth="24"
3+
android:width="28dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:alpha="0.85" android:height="24dp"
2+
android:tint="#FF6D75" android:viewportHeight="24"
3+
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:alpha="0.85" android:height="24dp"
2+
android:tint="#FF6D75" android:viewportHeight="24"
3+
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:alpha="0.85" android:height="24dp"
2+
android:tint="#FF6D75" android:viewportHeight="24"
3+
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:alpha="0.85" android:height="24dp"
2+
android:tint="#FF6D75" android:viewportHeight="24"
3+
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
5+
</vector>

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,26 @@
77
tools:context=".MainActivity">
88

99
<TextView
10+
android:id="@+id/textView"
1011
android:layout_width="wrap_content"
1112
android:layout_height="wrap_content"
12-
android:text="@string/app_name"
1313
android:fontFamily="@font/montserratbold"
14+
android:text="@string/app_name"
1415
android:textSize="@dimen/title_text_size"
1516
app:layout_constraintBottom_toBottomOf="parent"
1617
app:layout_constraintLeft_toLeftOf="parent"
1718
app:layout_constraintRight_toRightOf="parent"
1819
app:layout_constraintTop_toTopOf="parent" />
1920

21+
<Button
22+
android:id="@+id/button"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:layout_marginStart="40dp"
26+
android:layout_marginTop="48dp"
27+
android:text="Profile"
28+
app:layout_constraintStart_toStartOf="@+id/textView"
29+
app:layout_constraintTop_toBottomOf="@+id/textView" />
30+
31+
2032
</androidx.constraintlayout.widget.ConstraintLayout>
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:orientation="vertical"
8+
tools:context=".ProfileActivity">
9+
10+
<include
11+
layout="@layout/toolbar"
12+
android:layout_width="match_parent"
13+
android:layout_height="wrap_content" />
14+
15+
<LinearLayout
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"
18+
android:gravity="center"
19+
android:paddingTop="15dp"
20+
android:orientation="vertical">
21+
22+
23+
<de.hdodenhof.circleimageview.CircleImageView
24+
android:layout_width="110dp"
25+
android:layout_height="90dp"
26+
android:src="@drawable/ic_baseline_circle_24" />
27+
28+
<TextView
29+
android:layout_width="wrap_content"
30+
android:layout_height="wrap_content"
31+
android:text="Your Name"
32+
android:textColor="@color/colorPrimaryDark"
33+
android:textSize="20dp"
34+
android:layout_marginTop="8dp"
35+
android:textStyle="bold"/>
36+
37+
<View
38+
android:layout_width="match_parent"
39+
android:layout_height="1dp"
40+
android:background="@color/colorPrimaryDark"
41+
android:layout_marginTop="10dp"
42+
/>
43+
44+
</LinearLayout>
45+
46+
<LinearLayout
47+
android:layout_width="match_parent"
48+
android:layout_height="wrap_content"
49+
android:orientation="horizontal"
50+
android:paddingRight="8dp"
51+
android:paddingLeft="8dp"
52+
android:layout_marginTop="20dp"
53+
android:layout_gravity="center_vertical">
54+
55+
<ImageView
56+
android:layout_width="30dp"
57+
android:layout_height="30dp"
58+
android:src="@drawable/ic_baseline_person_24"/>
59+
60+
<TextView
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
63+
android:text="Name"
64+
android:textStyle="bold"
65+
android:textSize="20dp"
66+
android:textColor="@android:color/black"
67+
android:layout_marginLeft="5dp"
68+
/>
69+
70+
<TextView
71+
android:layout_width="wrap_content"
72+
android:layout_height="wrap_content"
73+
android:text="Your Name"
74+
android:textSize="18dp"
75+
android:textColor="@android:color/darker_gray"
76+
android:layout_marginLeft="85dp"
77+
/>
78+
79+
</LinearLayout>
80+
81+
<View
82+
android:layout_width="match_parent"
83+
android:layout_height="1dp"
84+
android:background="@android:color/darker_gray"
85+
android:layout_marginTop="10dp"
86+
android:layout_marginLeft="15dp"
87+
android:layout_marginRight="15dp"
88+
/>
89+
90+
<LinearLayout
91+
android:layout_width="match_parent"
92+
android:layout_height="wrap_content"
93+
android:orientation="horizontal"
94+
android:paddingRight="8dp"
95+
android:paddingLeft="8dp"
96+
android:layout_marginTop="20dp"
97+
android:layout_gravity="center_vertical">
98+
99+
<ImageView
100+
android:layout_width="30dp"
101+
android:layout_height="30dp"
102+
android:src="@drawable/ic_baseline_email_24"/>
103+
104+
<TextView
105+
android:layout_width="wrap_content"
106+
android:layout_height="wrap_content"
107+
android:text="Email"
108+
android:textStyle="bold"
109+
android:textSize="20dp"
110+
android:textColor="@android:color/black"
111+
android:layout_marginLeft="5dp"
112+
/>
113+
114+
<TextView
115+
android:layout_width="wrap_content"
116+
android:layout_height="wrap_content"
117+
android:text="Your Email"
118+
android:textSize="18dp"
119+
android:textColor="@android:color/darker_gray"
120+
android:layout_marginLeft="85dp"
121+
/>
122+
123+
</LinearLayout>
124+
125+
<View
126+
android:layout_width="match_parent"
127+
android:layout_height="1dp"
128+
android:background="@android:color/darker_gray"
129+
android:layout_marginTop="10dp"
130+
android:layout_marginLeft="15dp"
131+
android:layout_marginRight="15dp"
132+
/>
133+
134+
<LinearLayout
135+
android:layout_width="match_parent"
136+
android:layout_height="wrap_content"
137+
android:orientation="horizontal"
138+
android:paddingRight="8dp"
139+
android:paddingLeft="8dp"
140+
android:layout_marginTop="20dp"
141+
android:layout_gravity="center_vertical">
142+
143+
<ImageView
144+
android:layout_width="30dp"
145+
android:layout_height="30dp"
146+
android:src="@drawable/ic_baseline_phone_24"/>
147+
148+
<TextView
149+
android:layout_width="wrap_content"
150+
android:layout_height="wrap_content"
151+
android:text="Contact"
152+
android:textStyle="bold"
153+
android:textSize="20dp"
154+
android:textColor="@android:color/black"
155+
android:layout_marginLeft="5dp"
156+
/>
157+
158+
<TextView
159+
android:layout_width="wrap_content"
160+
android:layout_height="wrap_content"
161+
android:text="Your Phone No"
162+
android:textSize="18dp"
163+
android:textColor="@android:color/darker_gray"
164+
android:layout_marginLeft="65dp"
165+
/>
166+
167+
</LinearLayout>
168+
169+
<View
170+
android:layout_width="match_parent"
171+
android:layout_height="1dp"
172+
android:background="@android:color/darker_gray"
173+
android:layout_marginTop="10dp"
174+
android:layout_marginLeft="15dp"
175+
android:layout_marginRight="15dp"
176+
/>
177+
178+
179+
180+
181+
</LinearLayout>

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent">
6+
7+
<LinearLayout
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:orientation="horizontal"
11+
android:id="@+id/linear_li"
12+
android:padding="10dp">
13+
14+
<ImageView
15+
android:layout_width="35dp"
16+
android:layout_height="35dp"
17+
android:layout_alignParentLeft="true"
18+
android:src="@drawable/ic_baseline_arrow" />
19+
20+
<TextView
21+
android:layout_width="10dp"
22+
android:layout_height="wrap_content"
23+
android:layout_gravity="center"
24+
android:layout_weight="10"
25+
android:text="Profile"
26+
android:textSize="25dp"
27+
android:gravity="center"
28+
android:textStyle="bold"
29+
/>
30+
31+
</LinearLayout>
32+
33+
<View
34+
android:layout_width="match_parent"
35+
android:layout_height="1dp"
36+
android:background="@color/colorPrimaryDark"
37+
android:layout_below="@id/linear_li"
38+
android:paddingRight="8dp"
39+
android:paddingLeft="8dp"
40+
/>
41+
</RelativeLayout>

0 commit comments

Comments
 (0)