diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/MainActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/MainActivity.kt index ee45db23..55991e0c 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/MainActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/MainActivity.kt @@ -3,13 +3,15 @@ package com.sopt.umbba_android.presentation import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import androidx.fragment.app.Fragment import com.sopt.umbba_android.R +import com.sopt.umbba_android.databinding.ActivityMainBinding +import com.sopt.umbba_android.presentation.home.HomeFragment import com.sopt.umbba_android.presentation.qna.QuestionAnswerActivity +import com.sopt.umbba_android.util.binding.BindingActivity -class MainActivity : AppCompatActivity() { +class MainActivity :BindingActivity(R.layout.activity_main){ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - startActivity(Intent(this, QuestionAnswerActivity::class.java)) } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt new file mode 100644 index 00000000..a5954d02 --- /dev/null +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt @@ -0,0 +1,22 @@ +package com.sopt.umbba_android.presentation.home + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import coil.load +import com.sopt.umbba_android.R +import com.sopt.umbba_android.databinding.FragmentHomeBinding +import com.sopt.umbba_android.util.binding.BindingFragment + +class HomeFragment : BindingFragment(R.layout.fragment_home) { + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + setBackground() + } + private fun setBackground(){ + with(binding){ + ivBackground.load("https://i.ibb.co/sRV9Vr4/iv-maru.jpg") + } + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/iv_maru.jpg b/app/src/main/res/drawable/iv_maru.jpg new file mode 100644 index 00000000..86c5a14c Binary files /dev/null and b/app/src/main/res/drawable/iv_maru.jpg differ diff --git a/app/src/main/res/drawable/shape_grey_fill_r84_rect.xml b/app/src/main/res/drawable/shape_grey_fill_r84_rect.xml new file mode 100644 index 00000000..dd094136 --- /dev/null +++ b/app/src/main/res/drawable/shape_grey_fill_r84_rect.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 9b96c312..0185a2a2 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,4 +1,5 @@ + - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_question_answer.xml b/app/src/main/res/layout/activity_question_answer.xml index 336a8581..d54c5ec9 100644 --- a/app/src/main/res/layout/activity_question_answer.xml +++ b/app/src/main/res/layout/activity_question_answer.xml @@ -45,16 +45,17 @@ android:textAppearance="@style/AndroidSubHead1SemiBold20" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_title" /> - - + + - - + + + diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 77d9ef65..5bc2d20a 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -1,6 +1,44 @@ + + - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 67a0363f..3df4e492 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -70,4 +70,5 @@ 할머니와 엄마의 꿈은 달랐어? 당신과 어머니의 꿈은 달라? sdlkfjslkdjfklsdjfksdf\nsldkfjsldkjflksdjf + 질문 답변하기 \ No newline at end of file