Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into AN/feature/242-stu…
Browse files Browse the repository at this point in the history
…dydetail-inflate
  • Loading branch information
no1msh committed Aug 9, 2023
2 parents c1fa511 + c62b486 commit 8383a0f
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 0 deletions.
4 changes: 4 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
android:theme="@style/Theme.Team201"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".presentation.report.ReportActivity"
android:exported="false" />

<activity
android:name=".presentation.accountSetting.AccountSettingActivity"
android:exported="false" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.created.team201.presentation.report

import android.os.Bundle
import android.view.MenuItem
import com.created.team201.R
import com.created.team201.databinding.ActivityReportBinding
import com.created.team201.presentation.common.BindingActivity

class ReportActivity : BindingActivity<ActivityReportBinding>(R.layout.activity_report) {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

initToolBar()
}

private fun initToolBar() {
setSupportActionBar(binding.tbReport)
supportActionBar?.apply {
setDisplayHomeAsUpEnabled(true)
setHomeAsUpIndicator(R.drawable.ic_back)
setHomeActionContentDescription(R.string.toolbar_back_text)
}
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
android.R.id.home -> {
finish()
true
}

else -> {
false
}
}
}
}
130 changes: 130 additions & 0 deletions android/app/src/main/res/layout/activity_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?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"
tools:context=".presentation.report.ReportActivity">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/tb_report"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:elevation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title="@string/report_toolbar_title"
app:titleCentered="true"
app:titleTextAppearance="@style/header_sb15"
app:titleTextColor="@color/white" />

<View
android:id="@+id/view_report_border_line"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="@color/black02_181B21"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tb_report" />

<EditText
android:id="@+id/et_report_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:background="@drawable/bg_rectangle_radius_5dp"
android:hint="@string/report_title_hint"
android:maxLength="20"
android:padding="16dp"
android:singleLine="true"
android:textAppearance="@style/text_r14"
android:textColor="@color/white"
android:textColorHint="@color/grey04_989DA5"
app:layout_constraintBottom_toTopOf="@id/cl_report_date"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_report_border_line" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_report_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:background="@drawable/bg_rectangle_radius_5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_report_title">

<TextView
android:id="@+id/tv_report_date_string"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:textAppearance="@style/text_r14"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@id/iv_report_calender_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_report_calender_button"
tools:text="2022.03.04" />

<ImageView
android:id="@+id/iv_report_calender_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/report_calender_image_description"
android:padding="14dp"
android:src="@drawable/ic_period"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

<EditText
android:id="@+id/et_report_content"
android:layout_width="0dp"
android:layout_height="200dp"
android:layout_margin="20dp"
android:background="@drawable/bg_rectangle_radius_5dp"
android:gravity="top"
android:hint="@string/report_content_hint"
android:importantForAutofill="no"
android:inputType="textMultiLine|textNoSuggestions"
android:maxLength="200"
android:maxLines="10"
android:padding="16dp"
android:singleLine="true"
android:textAppearance="@style/text_r14"
android:textColor="@color/white"
android:textColorHint="@color/grey04_989DA5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_report_date" />


<TextView
android:id="@+id/tv_report_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:layout_marginBottom="32dp"
android:background="@drawable/bg_btn_color_and_radius_10dp_disabled"
android:enabled="false"
android:paddingVertical="14dp"
android:text="@string/report_button_description"
android:textAlignment="center"
android:textAppearance="@style/button_sb16"
android:textColor="@color/tv_color_disabled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
8 changes: 8 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,12 @@
<string name="accountSetting_toolbar_title">계정 관리</string>
<string name="accountSetting_withdraw_account_title_text">서비스 탈퇴하기</string>

<!-- 신고하기 뷰 -->
<string name="report_toolbar_title">신고하기</string>
<string name="report_title_hint">제목을 입력해 주세요</string>
<string name="report_button_description">제출하기</string>
<string name="report_content_hint">신고 내용을 입력해 주세요</string>
<string name="report_calender_image_description">달력 날짜 선택</string>


</resources>

0 comments on commit 8383a0f

Please sign in to comment.