Skip to content

Commit

Permalink
#27 navbar 수정: 아이콘 수정 및 액티비티 연결: 업적 화면 (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
otcroz authored Aug 7, 2022
1 parent a7c8a10 commit 4759e85
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 104 deletions.
3 changes: 3 additions & 0 deletions SHAPEUP2022/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.example.shape_up_2022

import android.content.Intent
import com.example.progressbar.ViewPagerAdapter
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
Expand Down Expand Up @@ -53,5 +54,37 @@ class AchieveActivity : AppCompatActivity() {
3->tab.text = R.string.achieve_tab4.toString()
}
}.attach()

// 탭바 연결
binding.navHome.setOnClickListener {
val intent_home = Intent(this, MainActivity::class.java)
startActivity(intent_home)
overridePendingTransition(0, 0)
finish()
}
binding.navTodo.setOnClickListener {
val intent_todo = Intent(this, ToDoActivity::class.java)
startActivity(intent_todo)
overridePendingTransition(0, 0)
finish()
}
binding.navSimulation.setOnClickListener {
val intent_simul = Intent(this, SimulationActivity::class.java)
startActivity(intent_simul)
overridePendingTransition(0, 0)
finish()
}
binding.navAchievement.setOnClickListener {
val intent_achieve = Intent(this, AchieveActivity::class.java)
startActivity(intent_achieve)
overridePendingTransition(0, 0)
finish()
}
binding.navMypage.setOnClickListener {
val intent_mypage = Intent(this, MyPageActivity::class.java)
startActivity(intent_mypage)
overridePendingTransition(0, 0)
finish()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ class MainActivity : AppCompatActivity() {
overridePendingTransition(0, 0)
finish()
}
binding.navMap.setOnClickListener {

binding.navAchievement.setOnClickListener {
val intent_achieve = Intent(this, AchieveActivity::class.java)
startActivity(intent_achieve)
overridePendingTransition(0, 0)
finish()
}
binding.navMypage.setOnClickListener {
val intent_mypage = Intent(this, MyPageActivity::class.java)
Expand Down Expand Up @@ -76,8 +79,4 @@ class MainActivity : AppCompatActivity() {
transaction.add(location, fragment)
transaction.commit()
}

fun happtyuf(){

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ class MyPageActivity : AppCompatActivity() {
finish()
}

binding.navMap.setOnClickListener { // 지도

binding.navAchievement.setOnClickListener {
val intent_achieve = Intent(this, AchieveActivity::class.java)
startActivity(intent_achieve)
overridePendingTransition(0, 0)
finish()
}

binding.navMypage.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ class SimulationActivity : AppCompatActivity() {
finish()
}

binding.navMap.setOnClickListener {

binding.navAchievement.setOnClickListener {
val intent_achieve = Intent(this, AchieveActivity::class.java)
startActivity(intent_achieve)
overridePendingTransition(0, 0)
finish()
}

binding.navMypage.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ class ToDoActivity : AppCompatActivity() {
finish()
}

binding.navMap.setOnClickListener {

binding.navAchievement.setOnClickListener {
val intent_achieve = Intent(this, AchieveActivity::class.java)
startActivity(intent_achieve)
overridePendingTransition(0, 0)
finish()
}

binding.navMypage.setOnClickListener {
Expand Down
5 changes: 5 additions & 0 deletions SHAPEUP2022/app/src/main/res/drawable/ic_icon_flags.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="32dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/base_color2" android:pathData="M14,9l-1,-2H7V5.72C7.6,5.38 8,4.74 8,4c0,-1.1 -0.9,-2 -2,-2S4,2.9 4,4c0,0.74 0.4,1.38 1,1.72V21h2v-4h5l1,2h7V9H14zM18,17h-4l-1,-2H7V9h5l1,2h5V17z"/>
</vector>
5 changes: 5 additions & 0 deletions SHAPEUP2022/app/src/main/res/drawable/ic_icon_flags_sel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="32dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/main_color" android:pathData="M14,9l-1,-2H7V5.72C7.6,5.38 8,4.74 8,4c0,-1.1 -0.9,-2 -2,-2S4,2.9 4,4c0,0.74 0.4,1.38 1,1.72V21h2v-4h5l1,2h7V9H14zM18,17h-4l-1,-2H7V9h5l1,2h5V17z"/>
</vector>
Loading

0 comments on commit 4759e85

Please sign in to comment.