-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from ttoklip/feat/#4_honey_tips_fragment
Feat/#2 스크랩 화면 수정
- Loading branch information
Showing
8 changed files
with
156 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.umc.ttoklip.data.api | ||
|
||
import com.umc.ttoklip.data.model.ResponseBody | ||
import com.umc.ttoklip.data.model.mypage.MyPageInfo | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
|
||
interface MyPage2Api { | ||
@GET("/api/v1/my-page") | ||
suspend fun getMyPageInfo(): Response<ResponseBody<MyPageInfo>> | ||
} |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/umc/ttoklip/data/model/mypage/MyPageInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.umc.ttoklip.data.model.mypage | ||
|
||
data class MyPageInfo( | ||
var street: String | ||
|
||
) | ||
/* | ||
street": null, | ||
"nickname": "플램", | ||
"profileImage": "https://ddoklipbk.s3.ap-northeast-2.amazonaws.com/photo/1000000033.jpg.jpg", | ||
"independentYear": 0, | ||
"independentMonth": 9*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 35 additions & 34 deletions
69
app/src/main/java/com/umc/ttoklip/presentation/intro/SplashActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
package com.umc.ttoklip.presentation.intro | ||
|
||
import android.content.Intent | ||
import android.os.Handler | ||
import android.os.Looper | ||
import com.umc.ttoklip.R | ||
import com.umc.ttoklip.TtoklipApplication | ||
import com.umc.ttoklip.databinding.ActivitySplashBinding | ||
import com.umc.ttoklip.presentation.MainActivity | ||
import com.umc.ttoklip.presentation.base.BaseActivity | ||
import com.umc.ttoklip.presentation.login.LoginActivity | ||
|
||
class SplashActivity:BaseActivity<ActivitySplashBinding>(R.layout.activity_splash) { | ||
override fun initView() { | ||
val handler= Handler(Looper.getMainLooper()) | ||
handler.postDelayed({ | ||
val spf=getSharedPreferences("first", MODE_PRIVATE) | ||
val firstRun=spf.getBoolean("firstRun",true) | ||
val jwt=TtoklipApplication.prefs.getString("jwt","") | ||
val isFirstLogin=TtoklipApplication.prefs.getBoolean("isFirstLogin",true) | ||
if(firstRun){ | ||
startActivity(Intent(this, IntroActivity::class.java)) | ||
finish() | ||
}else if(jwt.isNotEmpty()&&!isFirstLogin){ | ||
startActivity(Intent(this,MainActivity::class.java)) | ||
finish() | ||
} else{ | ||
startActivity(Intent(this, LoginActivity::class.java)) | ||
finish() | ||
} | ||
},2000) | ||
} | ||
override fun initObserver() { | ||
} | ||
package com.umc.ttoklip.presentation.intro | ||
|
||
import android.content.Intent | ||
import android.os.Handler | ||
import android.os.Looper | ||
import com.umc.ttoklip.R | ||
import com.umc.ttoklip.TtoklipApplication | ||
import com.umc.ttoklip.databinding.ActivitySplashBinding | ||
import com.umc.ttoklip.presentation.MainActivity | ||
import com.umc.ttoklip.presentation.base.BaseActivity | ||
import com.umc.ttoklip.presentation.login.LoginActivity | ||
|
||
class SplashActivity:BaseActivity<ActivitySplashBinding>(R.layout.activity_splash) { | ||
override fun initView() { | ||
val handler= Handler(Looper.getMainLooper()) | ||
handler.postDelayed({ | ||
val spf=getSharedPreferences("first", MODE_PRIVATE) | ||
val firstRun=spf.getBoolean("firstRun",true) | ||
//TtoklipApplication.prefs.setBoolean("isFirstLogin", true) | ||
val jwt=TtoklipApplication.prefs.getString("jwt","") | ||
val isFirstLogin=TtoklipApplication.prefs.getBoolean("isFirstLogin",true) | ||
if(firstRun){ | ||
startActivity(Intent(this, IntroActivity::class.java)) | ||
finish() | ||
}else if(jwt.isNotEmpty()&&!isFirstLogin){ | ||
startActivity(Intent(this,MainActivity::class.java)) | ||
finish() | ||
} else{ | ||
startActivity(Intent(this, LoginActivity::class.java)) | ||
finish() | ||
} | ||
},2000) | ||
} | ||
override fun initObserver() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/white"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="24dp" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/saved_honey_tip_title" | ||
android:textAppearance="@style/TextAppearance.App.16sp_600" | ||
android:textColor="@color/black" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<androidx.appcompat.widget.AppCompatImageButton | ||
android:id="@+id/saved_honey_tip_back_btn" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:background="@android:color/transparent" | ||
android:src="@drawable/ic_arrow_back_24" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<Spinner | ||
android:id="@+id/honey_tip_filter_spinner" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="68dp" | ||
android:layout_marginEnd="24dp" | ||
android:paddingStart="10dp" | ||
android:paddingEnd="6dp" | ||
android:paddingVertical="7dp" | ||
android:background="@drawable/rectangle_corner_10_strok_1" | ||
android:spinnerMode="dropdown" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
android:popupBackground="@drawable/sort_spinner_dropdown" | ||
android:dropDownWidth="wrap_content" | ||
android:dropDownVerticalOffset="32dp" /> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/saved_honey_tip_rv" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="124dp" | ||
android:layout_marginBottom="16dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:listitem="@layout/item_saved_honey_tip" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/white"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="24dp" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="내가 스크랩한 글" | ||
android:textAppearance="@style/TextAppearance.App.16sp_600" | ||
android:textColor="@color/black" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<androidx.appcompat.widget.AppCompatImageButton | ||
android:id="@+id/saved_honey_tip_back_btn" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:background="@android:color/transparent" | ||
android:src="@drawable/ic_arrow_back_24" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
<Spinner | ||
android:id="@+id/board_filter_spinner" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="68dp" | ||
android:layout_marginEnd="24dp" | ||
android:paddingStart="10dp" | ||
android:paddingEnd="6dp" | ||
android:paddingVertical="7dp" | ||
android:background="@drawable/rectangle_corner_10_strok_1" | ||
android:spinnerMode="dropdown" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
android:popupBackground="@drawable/sort_spinner_dropdown" | ||
android:dropDownWidth="wrap_content" | ||
android:dropDownVerticalOffset="32dp" /> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/saved_honey_tip_rv" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginHorizontal="24dp" | ||
android:layout_marginTop="124dp" | ||
android:layout_marginBottom="16dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:listitem="@layout/item_saved_honey_tip" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |