-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
15 changes: 11 additions & 4 deletions
15
app/src/main/java/com/android/mediproject/DevDialogFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
package com.android.mediproject | ||
|
||
import android.os.Bundle | ||
import android.text.Html | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import com.android.mediproject.databinding.ViewNetworkStateBinding | ||
import androidx.core.text.toSpannable | ||
import com.android.mediproject.databinding.ViewDevStateBinding | ||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class DevDialogFragment : BottomSheetDialogFragment() { | ||
|
||
private var _binding: ViewNetworkStateBinding? = null | ||
private var _binding: ViewDevStateBinding? = null | ||
|
||
private val binding get() = _binding!! | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? | ||
): View = ViewNetworkStateBinding.inflate(layoutInflater, container, false).also { | ||
): View = ViewDevStateBinding.inflate(layoutInflater, container, false).also { | ||
_binding = it | ||
}.root | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
binding.apply { | ||
val text = Html.fromHtml(getString(R.string.messageDevelopment), Html.FROM_HTML_MODE_COMPACT).toSpannable() | ||
messageTextView.text = text | ||
} | ||
|
||
binding.okButton.setOnClickListener { | ||
dismiss() | ||
requireActivity().finish() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
style="@style/ModalBottomSheetDialog" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:backgroundTint="@color/white" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
android:paddingHorizontal="24dp" | ||
android:paddingVertical="24dp" | ||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> | ||
|
||
<TextView | ||
android:id="@+id/messageTextView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="16dp" | ||
android:lineSpacingMultiplier="1.2" | ||
android:bufferType="spannable" | ||
android:textSize="20sp" /> | ||
|
||
<Button | ||
android:id="@+id/okButton" | ||
style="@style/Widget.Material3.Button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:backgroundTint="@color/main" | ||
android:text="@string/confirm" /> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<resources> | ||
<string name="app_name">MediLenz</string> | ||
<string name="messageDevelopment">현재 버전은 <strong>초기 개발 버전</strong>으로 예상치 못한 오류 및 강제 종료가 발생할 수 있습니다</string> | ||
<!-- Strings used for fragments for navigation --> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters