Skip to content

Commit

Permalink
다이얼로그 위치 수정 및 코스 리사이클러뷰 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
suzzang committed Sep 30, 2019
1 parent 6703585 commit 321b7ad
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ package com.yamgang.seoulsantaandroid.ui.map

import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.yamgang.seoulsantaandroid.R
import com.yamgang.seoulsantaandroid.ui.map.detail.CourseMapActivity
import kotlinx.android.synthetic.main.dialog_safety_tips.*

class SafetyTipsDialog(context: Context) : Dialog(context) {
class SafetyTipsDialog(context: Context,course_idx: Int,name : String, badge:Int) : Dialog(context) {

var isChecked: Boolean = false
var course_idx = course_idx
var name = name
var badge = badge

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -32,6 +37,11 @@ class SafetyTipsDialog(context: Context) : Dialog(context) {
}

btn_dialog_safety_selected.setOnClickListener {
val intent = Intent(context, CourseMapActivity::class.java)
intent.putExtra("course_idx",course_idx)
intent.putExtra("name",name)
intent.putExtra("badge",0)
context.startActivity(intent)
dismiss()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ class CourseDetailActivity : AppCompatActivity() {
getKeyhash()

btn_start_course.setOnClickListener {
var safetyTipsDialog = SafetyTipsDialog(this)
var safetyTipsDialog = SafetyTipsDialog(this,course_idx,name,0)
safetyTipsDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
safetyTipsDialog.setCanceledOnTouchOutside(false)
safetyTipsDialog.show()

val intent = Intent(applicationContext,CourseMapActivity::class.java)
intent.putExtra("course_idx",course_idx)
intent.putExtra("name",name)
intent.putExtra("badge",0)
startActivity(intent)
// val intent = Intent(applicationContext,CourseMapActivity::class.java)
// intent.putExtra("course_idx",course_idx)
// intent.putExtra("name",name)
// intent.putExtra("badge",0)
// startActivity(intent)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
android:layout_alignParentTop="true"
android:id="@+id/img_mt_present"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/mountain_img"/>
android:layout_height="341dp"
android:background="#ffffff"/>

<LinearLayout
android:id="@+id/text_layout"
Expand Down Expand Up @@ -84,7 +84,7 @@
android:fontFamily="@font/kopubworlddotumbold"
android:text="2코스"/>
<RelativeLayout
android:layout_width="100dp"
android:layout_width="185dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
Expand All @@ -107,7 +107,7 @@

<RelativeLayout

android:layout_width="100dp"
android:layout_width="185dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
Expand Down Expand Up @@ -146,7 +146,7 @@
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textSize="18sp"
android:textColor="#ffffff"
android:fontFamily="@font/kopubworlddotummedium"
android:text="코스 시작하기"/>
Expand Down
9 changes: 5 additions & 4 deletions SeoulSantaAndroid/app/src/main/res/layout/item_rcv_map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="90dp"
android:background="#ffffff">
<RelativeLayout
android:layout_marginTop="21dp"
android:layout_marginTop="8dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:layout_width="match_parent"

android:layout_height="70dp">
<ImageView
android:layout_centerVertical="true"
Expand Down Expand Up @@ -43,7 +44,7 @@
android:fontFamily="@font/kopubworlddotumbold"
android:text="2코스"/>
<RelativeLayout
android:layout_width="100dp"
android:layout_width="185dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
Expand All @@ -65,7 +66,7 @@
</RelativeLayout>

<RelativeLayout
android:layout_width="100dp"
android:layout_width="185dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
Expand Down

0 comments on commit 321b7ad

Please sign in to comment.