Skip to content

Commit 11e2c46

Browse files
committed
Merge remote-tracking branch 'origin/main'
# Conflicts: # app/src/main/res/layout/activity_calendar.xml
2 parents 250e566 + b668f63 commit 11e2c46

20 files changed

+105
-51
lines changed

README.md

+47-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1-
# Midstart_repo
21
제 2회 여대 연대 해커톤 light IT up
3-
<밋스타트:갱년기 여성을 위한 건강 관리어플>
2+
3+
## MIDSTART, 갱년기 여성을 위한 정신건강 관리어플 👋
4+
5+
6+
7+
8+
#### Firebase를 이용한 로그인 / 회원관리
9+
10+
<img src="images\login.png" width="500"/>
11+
12+
<br>
13+
14+
#### 메인 화면
15+
16+
<img src="images\main.png" width="500"/>
17+
18+
<br>
19+
20+
#### AI 챗봇
21+
22+
23+
24+
<br>
25+
26+
#### 감정 일기
27+
28+
<img src="images\diary.png" width="500"/>
29+
30+
<br>
31+
32+
#### 우울증 자가진단
33+
34+
<img src="images\cse.png" width="500"/>
35+
36+
<br>
37+
38+
#### 갱년기 증상 자가진단
39+
40+
<img src="images\kupperman.png" width="500"/>
41+
42+
<br>
43+
44+
#### 정보성 카드뉴스
45+
46+
<img src="images\cardnews.png" width="500"/>
47+
48+

app/src/main/java/com/example/midstart/ChatBotActivity.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ public void onClick(View v) {
6060

6161
private void getResponse(String msg){
6262
chatsModalArrayList.add(new ChatsModal(msg, USER_KEY));
63-
64-
String url="http://urlurlurlurl/?msg="+msg;
65-
66-
String BASE_URL="http://urlurlurlurl/";
67-
63+
String url=" http://18607213ec4f.ngrok.io/?msg="+msg;
64+
String BASE_URL=" http://18607213ec4f.ngrok.io/";
6865
Retrofit retrofit = new Retrofit.Builder()
6966
.baseUrl(BASE_URL)
7067
.addConverterFactory(GsonConverterFactory.create())
@@ -73,11 +70,9 @@ private void getResponse(String msg){
7370
RetrofitAPI retrofitAPI = retrofit.create(RetrofitAPI.class);
7471

7572
Call<MsgModal> call = retrofitAPI.getMessage(url);
76-
Log.v("checkcall", String.valueOf(retrofitAPI.getMessage(url)));
7773
call.enqueue(new Callback<MsgModal>() {
7874
@Override
7975
public void onResponse(Call<MsgModal> call, Response<MsgModal> response) {
80-
8176
if(response.isSuccessful()){
8277
MsgModal modal = response.body();
8378
chatsModalArrayList.add(new ChatsModal(modal.getAnswer(),BOT_KEY));

app/src/main/java/com/example/midstart/DiaryActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public void onClick(View v) {
132132
"Q. 죽기 전에 꼭 하고 싶은 일이 있다면?",
133133
"Q. 나에게 주고 싶은 선물이 있다면?",
134134
"Q. 나의 신조는 무엇인가?",
135-
"Q.닮고 싶은 문학작품 속 주인공은?.",
135+
"Q. 닮고 싶은 문학작품 속 주인공은?.",
136136
"Q. _____은 재미있다.",
137137
"Q. 여름이 좋은가, 겨울이 좋은가?",
138138
"Q. 내 묘비에 남기고 싶은 말은?",

app/src/main/java/com/example/midstart/MainActivity.java

+15-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ public class MainActivity extends AppCompatActivity implements SensorEventListen
5353
private TextView stepSinceReboot; // 걸음수
5454
int stepNow;
5555

56-
// 날씨, 위치 관련
56+
57+
// 날씨, 위치
5758
final String APP_ID = "ac5471e3caa6df5bb40fbe111f57c735";
5859
final String WEATHER_URL = "https://api.openweathermap.org/data/2.5/weather";
5960
final long MIN_TIME = 5000; // 5sec
6061
final float MIN_DISTANCE = 1000;
6162
final int REQUEST_CODE = 101;
6263

63-
6464
TextView weatherState, Temperature;
6565
ImageView mweatherIcon;
6666
LocationManager mLocationManager;
@@ -179,6 +179,19 @@ public void onClick(View v) {
179179
}
180180
});
181181

182+
//로그아웃 누르면 로그인화면으로
183+
Button logout = (Button) findViewById(R.id.logout);
184+
logout.setOnClickListener(new View.OnClickListener() {
185+
@Override
186+
public void onClick(View view) {
187+
mFirebaseAuth.signOut();
188+
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
189+
startActivity(intent);
190+
191+
192+
}
193+
});
194+
182195

183196

184197
}

app/src/main/java/com/example/midstart/RegisterActivity.java

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import androidx.appcompat.app.AppCompatActivity;
55

66
import android.content.Intent;
7+
import android.content.res.ColorStateList;
78
import android.os.Bundle;
89
import android.view.View;
910
import android.widget.Button;
@@ -99,4 +100,5 @@ public void onClick(View view){
99100
}
100101
});
101102
}
103+
102104
}

app/src/main/java/com/example/midstart/calendarActivity.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,18 @@ public void onCancelled(@NonNull DatabaseError error) {
8080
}
8181
});
8282
83+
84+
85+
*/
86+
btn=findViewById(R.id.cal_home);
8387
btn.setOnClickListener(new View.OnClickListener() {
8488
@Override
8589
public void onClick(View v) {
86-
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
87-
startActivity(intent);
90+
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
91+
startActivity(intent);
8892
}
8993
});
9094

91-
*/
9295
calendarRecyclerView = findViewById(R.id.calendarRecyclerView);
9396
calCell = findViewById(R.id.parentView);
9497
monthYearText = findViewById(R.id.monthYearTV);

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

-28
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,6 @@
66
android:layout_height="match_parent"
77
tools:context=".calendarActivity">
88

9-
<androidx.constraintlayout.widget.ConstraintLayout
10-
android:id="@+id/layoutTop"
11-
android:layout_width="match_parent"
12-
android:layout_height="60dp"
13-
android:elevation="10dp"
14-
android:background="#F0E3FF"
15-
app:layout_constraintEnd_toEndOf="parent"
16-
app:layout_constraintStart_toStartOf="parent"
17-
app:layout_constraintTop_toTopOf="parent">
18-
19-
<ImageView
20-
android:id="@+id/diaryBack"
21-
android:layout_width="wrap_content"
22-
android:layout_height="wrap_content"
23-
android:layout_margin="16dp"
24-
android:src="@drawable/ic_back"
25-
app:layout_constraintStart_toStartOf="parent"
26-
app:layout_constraintTop_toTopOf="parent" />
27-
28-
29-
30-
31-
</androidx.constraintlayout.widget.ConstraintLayout>
32-
339
<LinearLayout
3410
xmlns:android="http://schemas.android.com/apk/res/android"
3511
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -39,13 +15,11 @@
3915
android:orientation="vertical"
4016
tools:context=".MainActivity">
4117

42-
4318
<LinearLayout
4419
android:layout_width="match_parent"
4520
android:layout_height="wrap_content"
4621
android:orientation="horizontal"
4722
android:layout_marginBottom="20dp"
48-
android:layout_marginTop="60dp"
4923
>
5024
<Button
5125
android:layout_width="0dp"
@@ -91,7 +65,6 @@
9165
android:layout_height="wrap_content"
9266
android:orientation="horizontal">
9367

94-
9568
<TextView
9669
android:layout_width="0dp"
9770
android:layout_height="wrap_content"
@@ -165,6 +138,5 @@
165138
android:id="@+id/calendarRecyclerView"
166139
android:layout_width="match_parent"
167140
android:layout_height="match_parent"/>
168-
169141
</LinearLayout>
170142
</androidx.constraintlayout.widget.ConstraintLayout>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
app:sliderAutoCycleEnabled="false"
5656
app:sliderIndicatorAnimationDuration="600"
5757
app:sliderIndicatorGravity="center_horizontal|bottom"
58-
app:sliderIndicatorMargin="15dp"
58+
app:sliderIndicatorMarginTop="30dp"
5959
app:sliderIndicatorOrientation="horizontal"
6060
app:sliderIndicatorPadding="3dp"
6161
app:sliderIndicatorRadius="2dp"

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
android:id="@+id/et_email"
1414
android:layout_width="270dp"
1515
android:layout_height="60dp"
16-
android:fontFamily="@font/cafe24oneprettynight"
16+
1717
android:ems="10"
1818
android:textColor="@color/black"
1919
android:hint="이메일을 입력하세요"
@@ -27,10 +27,10 @@
2727
android:id="@+id/et_pwd"
2828
android:layout_width="270dp"
2929
android:layout_height="60dp"
30-
android:fontFamily="@font/cafe24oneprettynight"
30+
3131
android:ems="10"
3232
android:textColor="@color/black"
33-
33+
app:passwordToggleTint="@color/black"
3434
android:inputType="textPassword"
3535
android:hint="비밀번호를 입력하세요"
3636

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

+20
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
android:elevation="12dp"
8989
android:layout_width="match_parent"
9090
android:layout_height="match_parent"
91+
9192
tools:layout_editor_absoluteX="0dp"
9293
tools:layout_editor_absoluteY="0dp">
9394

@@ -348,6 +349,25 @@
348349

349350
</androidx.cardview.widget.CardView>
350351

352+
<Button
353+
android:id="@+id/logout"
354+
android:layout_width="match_parent"
355+
android:layout_height="wrap_content"
356+
android:layout_marginLeft="10dp"
357+
android:layout_marginTop="20dp"
358+
android:layout_marginRight="10dp"
359+
android:layout_marginBottom="20dp"
360+
android:background="@drawable/button_design_2"
361+
android:text="로그아웃"
362+
android:textColor="#AD8EDB"
363+
app:layout_constraintBottom_toBottomOf="parent"
364+
365+
app:layout_constraintEnd_toEndOf="parent"
366+
app:layout_constraintStart_toStartOf="parent"
367+
app:layout_constraintTop_toBottomOf="@+id/cardView11" />
368+
369+
370+
351371
</androidx.constraintlayout.widget.ConstraintLayout>
352372

353373

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
android:id="@+id/et_name"
2626
android:layout_width="wrap_content"
2727
android:layout_height="wrap_content"
28-
android:fontFamily="@font/cafe24oneprettynight"
28+
2929
android:ems="10"
3030
android:hint="이름을 입력하세요"
3131
android:textColor="@color/black"
@@ -55,7 +55,7 @@
5555
android:ems="10"
5656
android:hint="이메일을 입력하세요"
5757
android:inputType="textEmailAddress"
58-
android:fontFamily="@font/cafe24oneprettynight"
58+
5959
app:layout_constraintEnd_toEndOf="parent"
6060
app:layout_constraintStart_toStartOf="parent"
6161
app:layout_constraintTop_toBottomOf="@+id/email"/>
@@ -79,10 +79,14 @@
7979
android:layout_width="wrap_content"
8080
android:layout_height="wrap_content"
8181
android:ems="10"
82-
android:textColor="@color/black"
82+
83+
84+
8385
android:inputType="textPassword"
86+
app:passwordToggleTint="@color/black"
8487
android:hint="비밀번호를 입력하세요"
85-
android:fontFamily="@font/cafe24oneprettynight"
88+
89+
android:fontFamily="sans-serif"
8690
app:layout_constraintEnd_toEndOf="parent"
8791
app:layout_constraintHorizontal_bias="0.497"
8892
app:layout_constraintStart_toStartOf="parent"

images/cardnews.png

2.29 MB
Loading

images/cse.png

1020 KB
Loading

images/diary.png

107 KB
Loading

images/diary2.png

379 KB
Loading

images/kupperman.png

955 KB
Loading

images/login.jpg

193 KB
Loading

images/login.png

77.4 KB
Loading

images/main.png

2.23 MB
Loading

images/register.jpg

202 KB
Loading

0 commit comments

Comments
 (0)