Showing
18 changed files
with
444 additions
and
41 deletions
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project version="4"> | 2 | <project version="4"> |
| 3 | <component name="VcsDirectoryMappings"> | 3 | <component name="VcsDirectoryMappings"> |
| 4 | + <mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> | ||
| 4 | <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> | 5 | <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> |
| 5 | </component> | 6 | </component> |
| 6 | </project> | 7 | </project> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -9,7 +9,11 @@ | ... | @@ -9,7 +9,11 @@ |
| 9 | android:roundIcon="@mipmap/ic_launcher_round" | 9 | android:roundIcon="@mipmap/ic_launcher_round" |
| 10 | android:supportsRtl="true" | 10 | android:supportsRtl="true" |
| 11 | android:theme="@style/NoActionBar"> | 11 | android:theme="@style/NoActionBar"> |
| 12 | - <activity android:name=".TestingActivity"></activity> | 12 | + <activity android:name=".DetailActivity"></activity> |
| 13 | + <activity android:name=".InfoActivity" /> | ||
| 14 | + <activity android:name=".FavoritesActivity" /> | ||
| 15 | + <activity android:name=".RecommendActivity" /> | ||
| 16 | + <activity android:name=".TestingActivity" /> | ||
| 13 | <activity android:name=".SignInActivity" /> | 17 | <activity android:name=".SignInActivity" /> |
| 14 | <activity android:name=".SignUpActivity" /> | 18 | <activity android:name=".SignUpActivity" /> |
| 15 | <activity android:name=".MainActivity" /> | 19 | <activity android:name=".MainActivity" /> | ... | ... |
| 1 | +package com.example.vip | ||
| 2 | + | ||
| 3 | +import androidx.appcompat.app.AppCompatActivity | ||
| 4 | +import android.os.Bundle | ||
| 5 | + | ||
| 6 | +class DetailActivity : AppCompatActivity() { | ||
| 7 | + | ||
| 8 | + override fun onCreate(savedInstanceState: Bundle?) { | ||
| 9 | + super.onCreate(savedInstanceState) | ||
| 10 | + setContentView(R.layout.activity_detail) | ||
| 11 | + } | ||
| 12 | +} |
| 1 | +package com.example.vip | ||
| 2 | + | ||
| 3 | +import androidx.appcompat.app.AppCompatActivity | ||
| 4 | +import android.os.Bundle | ||
| 5 | + | ||
| 6 | +class FavoritesActivity : AppCompatActivity() { | ||
| 7 | + | ||
| 8 | + override fun onCreate(savedInstanceState: Bundle?) { | ||
| 9 | + super.onCreate(savedInstanceState) | ||
| 10 | + setContentView(R.layout.activity_favorites) | ||
| 11 | + } | ||
| 12 | +} |
| 1 | +package com.example.vip | ||
| 2 | + | ||
| 3 | +import androidx.appcompat.app.AppCompatActivity | ||
| 4 | +import android.os.Bundle | ||
| 5 | + | ||
| 6 | +class InfoActivity : AppCompatActivity() { | ||
| 7 | + | ||
| 8 | + override fun onCreate(savedInstanceState: Bundle?) { | ||
| 9 | + super.onCreate(savedInstanceState) | ||
| 10 | + setContentView(R.layout.activity_info) | ||
| 11 | + } | ||
| 12 | +} |
| 1 | +package com.example.vip | ||
| 2 | + | ||
| 3 | +import android.content.Intent | ||
| 4 | +import android.view.LayoutInflater | ||
| 5 | +import android.view.View | ||
| 6 | +import android.view.ViewGroup | ||
| 7 | +import android.widget.Toast | ||
| 8 | +import androidx.recyclerview.widget.RecyclerView | ||
| 9 | +import kotlinx.android.synthetic.main.item_policy.view.* | ||
| 10 | +import kotlinx.android.synthetic.main.item_policyfield.view.* | ||
| 11 | + | ||
| 12 | +class PolicyAdapter(private val items: ArrayList<PolicyItem>) : | ||
| 13 | + RecyclerView.Adapter<PolicyAdapter.ViewHolder>() { | ||
| 14 | + | ||
| 15 | + override fun getItemCount() = items.size | ||
| 16 | + | ||
| 17 | + override fun onBindViewHolder(holder: PolicyAdapter.ViewHolder, position: Int) { | ||
| 18 | + val item = items[position] | ||
| 19 | + | ||
| 20 | + holder.apply { | ||
| 21 | + bind(item) | ||
| 22 | + itemView.tag = item | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): | ||
| 27 | + PolicyAdapter.ViewHolder { | ||
| 28 | + val inflatedView = LayoutInflater.from(parent.context) | ||
| 29 | + .inflate(R.layout.item_policy, parent, false) | ||
| 30 | + return PolicyAdapter.ViewHolder(inflatedView) | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + class ViewHolder(v: View) : RecyclerView.ViewHolder(v) { | ||
| 34 | + | ||
| 35 | + private var view: View = v | ||
| 36 | + | ||
| 37 | + fun bind(item: PolicyItem) { | ||
| 38 | + view.policyImage.setImageDrawable(item.policyItemImage) | ||
| 39 | + view.policyDday.text = item.policyItemDday | ||
| 40 | + view.policyHost.text = item.policyItemHost | ||
| 41 | + view.policyTitle.text = item.policyItemTitle | ||
| 42 | + view.policyScore.rating= item.policyItemScore | ||
| 43 | + view.policyFavor.text=item.policyItemFavor | ||
| 44 | + | ||
| 45 | + view.setOnClickListener{ | ||
| 46 | + | ||
| 47 | + val intent=Intent(view.context, DetailActivity::class.java) | ||
| 48 | + //putExtraStart | ||
| 49 | + intent.putExtra("key",item.policyItemTitle) | ||
| 50 | + //putExtraEnd | ||
| 51 | + view.context.startActivity(intent) | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | package com.example.vip | 1 | package com.example.vip |
| 2 | 2 | ||
| 3 | +import android.content.Intent | ||
| 3 | import android.view.LayoutInflater | 4 | import android.view.LayoutInflater |
| 4 | import android.view.View | 5 | import android.view.View |
| 5 | import android.view.ViewGroup | 6 | import android.view.ViewGroup |
| ... | @@ -14,11 +15,9 @@ class PolicyFieldAdapter(private val items: ArrayList<PolicyFieldItem>) : | ... | @@ -14,11 +15,9 @@ class PolicyFieldAdapter(private val items: ArrayList<PolicyFieldItem>) : |
| 14 | 15 | ||
| 15 | override fun onBindViewHolder(holder: PolicyFieldAdapter.ViewHolder, position: Int) { | 16 | override fun onBindViewHolder(holder: PolicyFieldAdapter.ViewHolder, position: Int) { |
| 16 | val item = items[position] | 17 | val item = items[position] |
| 17 | - val listener = View.OnClickListener {it -> | 18 | + |
| 18 | - Toast.makeText(it.context, "Clicked: ${item.policyFieldItemText}", Toast.LENGTH_SHORT).show() | ||
| 19 | - } | ||
| 20 | holder.apply { | 19 | holder.apply { |
| 21 | - bind(listener, item) | 20 | + bind(item) |
| 22 | itemView.tag = item | 21 | itemView.tag = item |
| 23 | } | 22 | } |
| 24 | } | 23 | } |
| ... | @@ -34,10 +33,17 @@ class PolicyFieldAdapter(private val items: ArrayList<PolicyFieldItem>) : | ... | @@ -34,10 +33,17 @@ class PolicyFieldAdapter(private val items: ArrayList<PolicyFieldItem>) : |
| 34 | 33 | ||
| 35 | private var view: View = v | 34 | private var view: View = v |
| 36 | 35 | ||
| 37 | - fun bind(listener: View.OnClickListener, item: PolicyFieldItem) { | 36 | + fun bind(item: PolicyFieldItem) { |
| 38 | view.fieldIcon.setImageDrawable(item.policyFieldItemImage) | 37 | view.fieldIcon.setImageDrawable(item.policyFieldItemImage) |
| 39 | view.fieldIconText.text = item.policyFieldItemText | 38 | view.fieldIconText.text = item.policyFieldItemText |
| 40 | - view.setOnClickListener(listener) | 39 | + view.setOnClickListener{ |
| 40 | + | ||
| 41 | + val intent=Intent(view.context, RecommendActivity::class.java) | ||
| 42 | + //putExtraStart | ||
| 43 | + intent.putExtra("key",item.policyFieldItemText) | ||
| 44 | + //putExtraEnd | ||
| 45 | + view.context.startActivity(intent) | ||
| 46 | + } | ||
| 41 | } | 47 | } |
| 42 | } | 48 | } |
| 43 | } | 49 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | +package com.example.vip | ||
| 2 | + | ||
| 3 | +import android.graphics.drawable.Drawable | ||
| 4 | + | ||
| 5 | +class PolicyItem(val policyItemImage: Drawable, | ||
| 6 | + val policyItemDday: String, | ||
| 7 | + val policyItemHost: String, | ||
| 8 | + val policyItemTitle: String, | ||
| 9 | + val policyItemScore: Float, | ||
| 10 | + val policyItemFavor: String) { | ||
| 11 | + | ||
| 12 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +package com.example.vip | ||
| 2 | + | ||
| 3 | +import android.app.Activity | ||
| 4 | +import android.content.Intent | ||
| 5 | +import android.os.Bundle | ||
| 6 | +import android.util.Half.toFloat | ||
| 7 | +import android.view.Menu | ||
| 8 | +import android.view.MenuItem | ||
| 9 | +import androidx.appcompat.app.ActionBar | ||
| 10 | +import androidx.appcompat.app.AppCompatActivity | ||
| 11 | +import androidx.core.content.ContextCompat | ||
| 12 | +import androidx.viewpager.widget.ViewPager | ||
| 13 | +import com.google.android.material.bottomnavigation.BottomNavigationView | ||
| 14 | +import com.google.android.material.snackbar.Snackbar | ||
| 15 | +import kotlinx.android.synthetic.main.activity_recommend.* | ||
| 16 | +import kotlinx.android.synthetic.main.activity_signin.* | ||
| 17 | +import kotlinx.android.synthetic.main.activity_signin.toolbar | ||
| 18 | + | ||
| 19 | +class RecommendActivity : AppCompatActivity() { | ||
| 20 | + | ||
| 21 | + ////bottom navigation view operation start 1 | ||
| 22 | + lateinit var bottomBar: ActionBar | ||
| 23 | + ////bottom navigation view operation end 1 | ||
| 24 | + override fun onCreate(savedInstanceState: Bundle?) { | ||
| 25 | + super.onCreate(savedInstanceState) | ||
| 26 | + setContentView(R.layout.activity_recommend) | ||
| 27 | + | ||
| 28 | + val policyList = ArrayList<PolicyItem>() | ||
| 29 | + | ||
| 30 | + policyList.add( | ||
| 31 | + PolicyItem( | ||
| 32 | + ContextCompat.getDrawable(this, R.drawable.image01)!!, | ||
| 33 | + getString(R.string.title01), | ||
| 34 | + getString(R.string.title01), | ||
| 35 | + getString(R.string.title01), | ||
| 36 | + 4.toFloat(), | ||
| 37 | + "0" | ||
| 38 | + | ||
| 39 | + ) | ||
| 40 | + ) | ||
| 41 | + | ||
| 42 | + val adapter = PolicyAdapter(policyList) | ||
| 43 | + policyRecyclerView.adapter = adapter | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + // 1. 툴바 사용 설정 | ||
| 47 | + setSupportActionBar(toolbar) | ||
| 48 | + | ||
| 49 | + // 2. 툴바 왼쪽 버튼 설정 | ||
| 50 | + supportActionBar!!.setDisplayHomeAsUpEnabled(true) // 왼쪽 버튼 사용 여부 true | ||
| 51 | + supportActionBar!!.setHomeAsUpIndicator(R.drawable.return_page) // 왼쪽 버튼 아이콘 설정 | ||
| 52 | + supportActionBar!!.setDisplayShowTitleEnabled(false) // 타이틀 안보이게 하기 | ||
| 53 | + | ||
| 54 | + ////bottom navigation view operation start 2 | ||
| 55 | + bottomBar=supportActionBar!! | ||
| 56 | + val bottomNavigation: BottomNavigationView =findViewById(R.id.bottomNavigation) | ||
| 57 | + bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | ||
| 58 | + ////bottom navigation view operation end 2 | ||
| 59 | + | ||
| 60 | + } | ||
| 61 | + // 3.툴바 메뉴 버튼을 설정 | ||
| 62 | + override fun onCreateOptionsMenu(menu: Menu?): Boolean { | ||
| 63 | + menuInflater.inflate(R.menu.main_menu, menu) // main_menu 메뉴를 toolbar 메뉴 버튼으로 설정 | ||
| 64 | + return true | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + // 4.툴바 메뉴 버튼이 클릭 됐을 때 콜백 | ||
| 68 | + override fun onOptionsItemSelected(item: MenuItem?): Boolean { | ||
| 69 | + // 클릭된 메뉴 아이템의 아이디 마다 when 구절로 클릭시 동작을 설정한다. | ||
| 70 | + when(item!!.itemId){ | ||
| 71 | + android.R.id.home->{ // 메뉴 버튼 | ||
| 72 | + Snackbar.make(toolbar,"Menu pressed",Snackbar.LENGTH_SHORT).show() | ||
| 73 | + } | ||
| 74 | + R.id.menu_search->{ // 검색 버튼 | ||
| 75 | + val search_Intent = Intent(this, SearchActivity::class.java) | ||
| 76 | + startActivity(search_Intent) | ||
| 77 | + //Snackbar.make(toolbar,"Search menu pressed",Snackbar.LENGTH_SHORT).show() | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + return super.onOptionsItemSelected(item) | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + //bottom navigation view operation start 3 | ||
| 84 | + private val mOnNavigationItemSelectedListener=BottomNavigationView.OnNavigationItemSelectedListener{item-> | ||
| 85 | + when (item.itemId){ | ||
| 86 | + | ||
| 87 | + R.id.bottomHome ->{ | ||
| 88 | + val intent = Intent(this, SignInActivity::class.java) | ||
| 89 | + startActivity(intent) | ||
| 90 | + return@OnNavigationItemSelectedListener true | ||
| 91 | + } | ||
| 92 | + R.id.bottomRecommend ->{ | ||
| 93 | + val intent = Intent(this, RecommendActivity::class.java) | ||
| 94 | + startActivity(intent) | ||
| 95 | + return@OnNavigationItemSelectedListener true | ||
| 96 | + } | ||
| 97 | + R.id.bottomFavorites ->{ | ||
| 98 | + val intent = Intent(this, FavoritesActivity::class.java) | ||
| 99 | + startActivity(intent) | ||
| 100 | + return@OnNavigationItemSelectedListener true | ||
| 101 | + } | ||
| 102 | + R.id.bottomInfo ->{ | ||
| 103 | + val intent = Intent(this, InfoActivity::class.java) | ||
| 104 | + startActivity(intent) | ||
| 105 | + return@OnNavigationItemSelectedListener true | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + | ||
| 109 | + } | ||
| 110 | + false | ||
| 111 | + } | ||
| 112 | +//bottom navigation view operation end 3 | ||
| 113 | + | ||
| 114 | +} |
| 1 | package com.example.vip | 1 | package com.example.vip |
| 2 | 2 | ||
| 3 | +import android.app.Activity | ||
| 3 | import android.content.Intent | 4 | import android.content.Intent |
| 4 | import android.os.Bundle | 5 | import android.os.Bundle |
| 5 | import android.view.Menu | 6 | import android.view.Menu |
| 6 | import android.view.MenuItem | 7 | import android.view.MenuItem |
| 8 | +import androidx.appcompat.app.ActionBar | ||
| 7 | import androidx.appcompat.app.AppCompatActivity | 9 | import androidx.appcompat.app.AppCompatActivity |
| 8 | import androidx.core.content.ContextCompat | 10 | import androidx.core.content.ContextCompat |
| 9 | import androidx.viewpager.widget.ViewPager | 11 | import androidx.viewpager.widget.ViewPager |
| 12 | +import com.google.android.material.bottomnavigation.BottomNavigationView | ||
| 10 | import com.google.android.material.snackbar.Snackbar | 13 | import com.google.android.material.snackbar.Snackbar |
| 11 | import kotlinx.android.synthetic.main.activity_signin.* | 14 | import kotlinx.android.synthetic.main.activity_signin.* |
| 12 | 15 | ||
| 13 | class SignInActivity : AppCompatActivity() { | 16 | class SignInActivity : AppCompatActivity() { |
| 14 | 17 | ||
| 15 | internal lateinit var viewpager : ViewPager | 18 | internal lateinit var viewpager : ViewPager |
| 19 | + ////bottom navigation view operation start 1 | ||
| 20 | + lateinit var bottomBar: ActionBar | ||
| 21 | + ////bottom navigation view operation end 1 | ||
| 16 | override fun onCreate(savedInstanceState: Bundle?) { | 22 | override fun onCreate(savedInstanceState: Bundle?) { |
| 17 | super.onCreate(savedInstanceState) | 23 | super.onCreate(savedInstanceState) |
| 18 | setContentView(R.layout.activity_signin) | 24 | setContentView(R.layout.activity_signin) |
| ... | @@ -55,30 +61,7 @@ class SignInActivity : AppCompatActivity() { | ... | @@ -55,30 +61,7 @@ class SignInActivity : AppCompatActivity() { |
| 55 | getString(R.string.title06) | 61 | getString(R.string.title06) |
| 56 | ) | 62 | ) |
| 57 | ) | 63 | ) |
| 58 | - policyFieldList.add( | 64 | + |
| 59 | - PolicyFieldItem( | ||
| 60 | - ContextCompat.getDrawable(this, R.drawable.image07)!!, | ||
| 61 | - getString(R.string.title07) | ||
| 62 | - ) | ||
| 63 | - ) | ||
| 64 | - policyFieldList.add( | ||
| 65 | - PolicyFieldItem( | ||
| 66 | - ContextCompat.getDrawable(this, R.drawable.image08)!!, | ||
| 67 | - getString(R.string.title08) | ||
| 68 | - ) | ||
| 69 | - ) | ||
| 70 | - policyFieldList.add( | ||
| 71 | - PolicyFieldItem( | ||
| 72 | - ContextCompat.getDrawable(this, R.drawable.image09)!!, | ||
| 73 | - getString(R.string.title09) | ||
| 74 | - ) | ||
| 75 | - ) | ||
| 76 | - policyFieldList.add( | ||
| 77 | - PolicyFieldItem( | ||
| 78 | - ContextCompat.getDrawable(this, R.drawable.image10)!!, | ||
| 79 | - getString(R.string.title10) | ||
| 80 | - ) | ||
| 81 | - ) | ||
| 82 | 65 | ||
| 83 | val adapter = PolicyFieldAdapter(policyFieldList) | 66 | val adapter = PolicyFieldAdapter(policyFieldList) |
| 84 | policyFieldRecyclerView.adapter = adapter | 67 | policyFieldRecyclerView.adapter = adapter |
| ... | @@ -94,6 +77,13 @@ class SignInActivity : AppCompatActivity() { | ... | @@ -94,6 +77,13 @@ class SignInActivity : AppCompatActivity() { |
| 94 | supportActionBar!!.setDisplayHomeAsUpEnabled(true) // 왼쪽 버튼 사용 여부 true | 77 | supportActionBar!!.setDisplayHomeAsUpEnabled(true) // 왼쪽 버튼 사용 여부 true |
| 95 | supportActionBar!!.setHomeAsUpIndicator(R.drawable.return_page) // 왼쪽 버튼 아이콘 설정 | 78 | supportActionBar!!.setHomeAsUpIndicator(R.drawable.return_page) // 왼쪽 버튼 아이콘 설정 |
| 96 | supportActionBar!!.setDisplayShowTitleEnabled(false) // 타이틀 안보이게 하기 | 79 | supportActionBar!!.setDisplayShowTitleEnabled(false) // 타이틀 안보이게 하기 |
| 80 | + | ||
| 81 | + ////bottom navigation view operation start 2 | ||
| 82 | + bottomBar=supportActionBar!! | ||
| 83 | + val bottomNavigation: BottomNavigationView =findViewById(R.id.bottomNavigation) | ||
| 84 | + bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | ||
| 85 | + ////bottom navigation view operation end 2 | ||
| 86 | + | ||
| 97 | } | 87 | } |
| 98 | // 3.툴바 메뉴 버튼을 설정 | 88 | // 3.툴바 메뉴 버튼을 설정 |
| 99 | override fun onCreateOptionsMenu(menu: Menu?): Boolean { | 89 | override fun onCreateOptionsMenu(menu: Menu?): Boolean { |
| ... | @@ -117,4 +107,35 @@ class SignInActivity : AppCompatActivity() { | ... | @@ -117,4 +107,35 @@ class SignInActivity : AppCompatActivity() { |
| 117 | return super.onOptionsItemSelected(item) | 107 | return super.onOptionsItemSelected(item) |
| 118 | } | 108 | } |
| 119 | 109 | ||
| 110 | + //bottom navigation view operation start 3 | ||
| 111 | + private val mOnNavigationItemSelectedListener=BottomNavigationView.OnNavigationItemSelectedListener{item-> | ||
| 112 | + when (item.itemId){ | ||
| 113 | + | ||
| 114 | + R.id.bottomHome ->{ | ||
| 115 | + val intent = Intent(this, SignInActivity::class.java) | ||
| 116 | + startActivity(intent) | ||
| 117 | + return@OnNavigationItemSelectedListener true | ||
| 118 | + } | ||
| 119 | + R.id.bottomRecommend ->{ | ||
| 120 | + val intent = Intent(this, RecommendActivity::class.java) | ||
| 121 | + startActivity(intent) | ||
| 122 | + return@OnNavigationItemSelectedListener true | ||
| 123 | + } | ||
| 124 | + R.id.bottomFavorites ->{ | ||
| 125 | + val intent = Intent(this, FavoritesActivity::class.java) | ||
| 126 | + startActivity(intent) | ||
| 127 | + return@OnNavigationItemSelectedListener true | ||
| 128 | + } | ||
| 129 | + R.id.bottomInfo ->{ | ||
| 130 | + val intent = Intent(this, InfoActivity::class.java) | ||
| 131 | + startActivity(intent) | ||
| 132 | + return@OnNavigationItemSelectedListener true | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + | ||
| 136 | + } | ||
| 137 | + false | ||
| 138 | + } | ||
| 139 | +//bottom navigation view operation end 3 | ||
| 140 | + | ||
| 120 | } | 141 | } | ... | ... |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<androidx.constraintlayout.widget.ConstraintLayout 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 | + tools:context=".DetailActivity"> | ||
| 8 | + | ||
| 9 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<androidx.constraintlayout.widget.ConstraintLayout 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 | + tools:context=".FavoritesActivity"> | ||
| 8 | + | ||
| 9 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<androidx.constraintlayout.widget.ConstraintLayout 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 | + tools:context=".InfoActivity"> | ||
| 8 | + | ||
| 9 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<androidx.constraintlayout.widget.ConstraintLayout 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 | + tools:context=".RecommendActivity"> | ||
| 8 | + | ||
| 9 | + | ||
| 10 | + <LinearLayout | ||
| 11 | + android:id="@+id/linearLayout" | ||
| 12 | + android:layout_width="match_parent" | ||
| 13 | + android:layout_height="match_parent" | ||
| 14 | + android:orientation="vertical" | ||
| 15 | + app:layout_constraintBottom_toBottomOf="parent" | ||
| 16 | + app:layout_constraintEnd_toEndOf="parent" | ||
| 17 | + app:layout_constraintStart_toStartOf="parent" | ||
| 18 | + app:layout_constraintTop_toTopOf="parent"> | ||
| 19 | + | ||
| 20 | + <androidx.appcompat.widget.Toolbar | ||
| 21 | + android:id="@+id/toolbar" | ||
| 22 | + android:layout_width="fill_parent" | ||
| 23 | + android:layout_height="wrap_content" | ||
| 24 | + android:layout_marginBottom="11dp" | ||
| 25 | + android:background="#FFF" | ||
| 26 | + android:elevation="5dp" | ||
| 27 | + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | ||
| 28 | + app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | ||
| 29 | + | ||
| 30 | + <ImageView | ||
| 31 | + android:layout_width="77dp" | ||
| 32 | + android:layout_height="44dp" | ||
| 33 | + android:layout_gravity="center" | ||
| 34 | + android:src="@drawable/toolbar_logo" /> | ||
| 35 | + </androidx.appcompat.widget.Toolbar> | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + <androidx.recyclerview.widget.RecyclerView | ||
| 39 | + android:id="@+id/policyRecyclerView" | ||
| 40 | + android:layout_width="match_parent" | ||
| 41 | + android:layout_height="100dp" | ||
| 42 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||
| 43 | + app:layout_constraintBottom_toBottomOf="@id/bottomNavigation" | ||
| 44 | + tools:listitem="@layout/item_policy" /> | ||
| 45 | + | ||
| 46 | + <FrameLayout | ||
| 47 | + android:layout_width="match_parent" | ||
| 48 | + android:layout_height="wrap_content" | ||
| 49 | + android:layout_weight="1" | ||
| 50 | + android:id="@+id/fragmentContainer" | ||
| 51 | + /> | ||
| 52 | + | ||
| 53 | + <com.google.android.material.bottomnavigation.BottomNavigationView | ||
| 54 | + android:id="@+id/bottomNavigation" | ||
| 55 | + android:layout_width="match_parent" | ||
| 56 | + android:layout_height="wrap_content" | ||
| 57 | + android:layout_gravity="bottom" | ||
| 58 | + android:background="#FFF" | ||
| 59 | + app:itemIconTint="#29ABE2" | ||
| 60 | + app:itemTextColor="#29ABE2" | ||
| 61 | + app:labelVisibilityMode="labeled" | ||
| 62 | + app:menu="@menu/bottom_nav_menu" /> | ||
| 63 | + | ||
| 64 | + </LinearLayout> | ||
| 65 | + | ||
| 66 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
| 67 | + |
| ... | @@ -46,10 +46,10 @@ | ... | @@ -46,10 +46,10 @@ |
| 46 | <androidx.recyclerview.widget.RecyclerView | 46 | <androidx.recyclerview.widget.RecyclerView |
| 47 | android:id="@+id/policyFieldRecyclerView" | 47 | android:id="@+id/policyFieldRecyclerView" |
| 48 | android:layout_width="match_parent" | 48 | android:layout_width="match_parent" |
| 49 | - android:layout_height="340dp" | 49 | + android:layout_height="wrap_content" |
| 50 | app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | 50 | app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" |
| 51 | app:spanCount="3" | 51 | app:spanCount="3" |
| 52 | - app:layout_constraintBottom_toBottomOf="@id/bottom_navigation" | 52 | + app:layout_constraintBottom_toBottomOf="@id/bottomNavigation" |
| 53 | tools:listitem="@layout/item_policyfield" /> | 53 | tools:listitem="@layout/item_policyfield" /> |
| 54 | 54 | ||
| 55 | <FrameLayout | 55 | <FrameLayout |
| ... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ |
| 60 | /> | 60 | /> |
| 61 | 61 | ||
| 62 | <com.google.android.material.bottomnavigation.BottomNavigationView | 62 | <com.google.android.material.bottomnavigation.BottomNavigationView |
| 63 | - android:id="@+id/bottom_navigation" | 63 | + android:id="@+id/bottomNavigation" |
| 64 | android:layout_width="match_parent" | 64 | android:layout_width="match_parent" |
| 65 | android:layout_height="wrap_content" | 65 | android:layout_height="wrap_content" |
| 66 | android:layout_gravity="bottom" | 66 | android:layout_gravity="bottom" | ... | ... |
vip/app/src/main/res/layout/item_policy.xml
0 → 100644
| 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="horizontal"> | ||
| 8 | + | ||
| 9 | + | ||
| 10 | + <ImageView | ||
| 11 | + android:id="@+id/policyImage" | ||
| 12 | + android:layout_width="wrap_content" | ||
| 13 | + android:layout_height="wrap_content" | ||
| 14 | + android:layout_weight="1" | ||
| 15 | + tools:srcCompat="@tools:sample/avatars" /> | ||
| 16 | + | ||
| 17 | + <LinearLayout | ||
| 18 | + android:layout_width="match_parent" | ||
| 19 | + android:layout_height="match_parent" | ||
| 20 | + android:layout_weight="1" | ||
| 21 | + android:orientation="horizontal"> | ||
| 22 | + | ||
| 23 | + <LinearLayout | ||
| 24 | + android:layout_width="match_parent" | ||
| 25 | + android:layout_height="match_parent" | ||
| 26 | + android:orientation="vertical"> | ||
| 27 | + | ||
| 28 | + <TextView | ||
| 29 | + android:id="@+id/policyDday" | ||
| 30 | + android:layout_width="match_parent" | ||
| 31 | + android:layout_height="wrap_content" | ||
| 32 | + android:text="TextView" /> | ||
| 33 | + | ||
| 34 | + <TextView | ||
| 35 | + android:id="@+id/policyHost" | ||
| 36 | + android:layout_width="match_parent" | ||
| 37 | + android:layout_height="wrap_content" | ||
| 38 | + android:text="TextView" /> | ||
| 39 | + | ||
| 40 | + <TextView | ||
| 41 | + android:id="@+id/policyTitle" | ||
| 42 | + android:layout_width="match_parent" | ||
| 43 | + android:layout_height="wrap_content" | ||
| 44 | + android:text="TextView" /> | ||
| 45 | + | ||
| 46 | + <RatingBar | ||
| 47 | + android:id="@+id/policyScore" | ||
| 48 | + android:layout_width="match_parent" | ||
| 49 | + android:layout_height="wrap_content" /> | ||
| 50 | + </LinearLayout> | ||
| 51 | + | ||
| 52 | + <TextView | ||
| 53 | + android:id="@+id/policyFavor" | ||
| 54 | + android:layout_width="wrap_content" | ||
| 55 | + android:layout_height="wrap_content" | ||
| 56 | + android:layout_weight="1" | ||
| 57 | + android:text="TextView" /> | ||
| 58 | + | ||
| 59 | + </LinearLayout> | ||
| 60 | +</LinearLayout> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -21,6 +21,6 @@ | ... | @@ -21,6 +21,6 @@ |
| 21 | android:layout_height="340dp" | 21 | android:layout_height="340dp" |
| 22 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 22 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
| 23 | app:spanCount="3" | 23 | app:spanCount="3" |
| 24 | - app:layout_constraintBottom_toBottomOf="@id/bottom_navigation" | 24 | + app:layout_constraintBottom_toBottomOf="@id/bottomNavigation" |
| 25 | tools:listitem="@layout/item_search" /> | 25 | tools:listitem="@layout/item_search" /> |
| 26 | </LinearLayout> | 26 | </LinearLayout> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -2,25 +2,25 @@ | ... | @@ -2,25 +2,25 @@ |
| 2 | <menu xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <menu xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:app="http://schemas.android.com/apk/res-auto"> | 3 | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| 4 | <item | 4 | <item |
| 5 | - android:id="@+id/action_recents" | 5 | + android:id="@+id/bottomHome" |
| 6 | android:enabled="true" | 6 | android:enabled="true" |
| 7 | android:icon="@drawable/home" | 7 | android:icon="@drawable/home" |
| 8 | android:title="WELLO" | 8 | android:title="WELLO" |
| 9 | app:showAsAction="ifRoom" /> | 9 | app:showAsAction="ifRoom" /> |
| 10 | <item | 10 | <item |
| 11 | - android:id="@+id/action_favorites" | 11 | + android:id="@+id/bottomRecommend" |
| 12 | android:enabled="true" | 12 | android:enabled="true" |
| 13 | - android:icon="@drawable/instagram" | 13 | + android:icon="@drawable/wish" |
| 14 | android:title="추천정책" | 14 | android:title="추천정책" |
| 15 | app:showAsAction="ifRoom" /> | 15 | app:showAsAction="ifRoom" /> |
| 16 | <item | 16 | <item |
| 17 | - android:id="@+id/action_nearby" | 17 | + android:id="@+id/bottomFavorites" |
| 18 | android:enabled="true" | 18 | android:enabled="true" |
| 19 | - android:icon="@drawable/wish" | 19 | + android:icon="@drawable/instagram" |
| 20 | android:title="찜 목록" | 20 | android:title="찜 목록" |
| 21 | app:showAsAction="ifRoom" /> | 21 | app:showAsAction="ifRoom" /> |
| 22 | <item | 22 | <item |
| 23 | - android:id="@+id/action_info" | 23 | + android:id="@+id/bottomInfo" |
| 24 | android:enabled="true" | 24 | android:enabled="true" |
| 25 | android:icon="@drawable/info" | 25 | android:icon="@drawable/info" |
| 26 | android:title="내 정보" | 26 | android:title="내 정보" | ... | ... |
-
Please register or login to post a comment