Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion BCSD_Assignment_2/.idea/.name

This file was deleted.

7 changes: 0 additions & 7 deletions BCSD_Assignment_2/app/src/main/res/values-night/themes.xml

This file was deleted.

5 changes: 0 additions & 5 deletions BCSD_Assignment_2/app/src/main/res/values/colors.xml

This file was deleted.

3 changes: 0 additions & 3 deletions BCSD_Assignment_2/app/src/main/res/values/strings.xml

This file was deleted.

9 changes: 0 additions & 9 deletions BCSD_Assignment_2/app/src/main/res/values/themes.xml

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions assignment_week_4/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions assignment_week_4/.idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions assignment_week_4/.idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

android {
namespace = "com.example.test"
compileSdk = 34
namespace = "com.example.assignment_week_02"
compileSdk = 35

defaultConfig {
applicationId = "com.example.test"
applicationId = "com.example.assignment_week_02"
minSdk = 24
targetSdk = 34
versionCode = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.test
package com.example.assignment_week_02

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.test", appContext.packageName)
assertEquals("com.example.assignment_week_02", appContext.packageName)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Test"
android:theme="@style/Theme.Assignment_week_02"
tools:targetApi="31">
<activity
android:name=".MainActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.test
package com.example.assignment_week_02

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
Expand All @@ -10,7 +10,7 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_main)
setContentView(R.layout.constraint)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
Expand Down
65 changes: 65 additions & 0 deletions assignment_week_4/app/src/main/res/layout-land/constraint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="32dp"
android:background="?android:attr/windowBackground">


<TextView
android:id="@+id/login_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_title"
style="@style/TEXT"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="24dp"/>


<EditText
style="@style/EditTextStyle"
android:id="@+id/user_id"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/hint_user_id"
android:inputType="text"
android:importantForAutofill="no"
app:layout_constraintTop_toBottomOf="@id/login_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="24dp"/>


<EditText
style="@style/EditTextStyle"
android:id="@+id/user_password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/hint_user_password"
android:inputType="textPassword"
android:importantForAutofill="no"
app:layout_constraintTop_toBottomOf="@id/user_id"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp"/>


<Button
style="@style/loginButton"
android:id="@+id/btn_login"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/btn_login"
app:layout_constraintTop_toBottomOf="@id/user_password"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="24dp"/>


</androidx.constraintlayout.widget.ConstraintLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">


<TextView
android:id="@+id/login_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="로그인"
android:textSize="24sp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="24dp"/>


<EditText
android:id="@+id/user_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="아이디"
android:inputType="text"
android:layout_marginBottom="16dp"/>


<EditText
android:id="@+id/user_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="비밀번호"
android:inputType="textPassword"
android:layout_marginBottom="24dp"/>


<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="로그인"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string resource 활용해주세요!



</LinearLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">


<TextView
android:id="@+id/login_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="24dp"
android:text="로그인"
android:textSize="24sp" />


<EditText
android:id="@+id/user_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login_title"
android:layout_marginTop="24dp"
android:hint="아이디"
android:inputType="text"
android:importantForAutofill="no" />


<EditText
android:id="@+id/user_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/user_id"
android:layout_marginTop="16dp"
android:hint="비밀번호"
android:inputType="textPassword"
android:importantForAutofill="no" />


<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/user_password"
android:layout_marginTop="24dp"
android:text="로그인" />


</RelativeLayout>
65 changes: 65 additions & 0 deletions assignment_week_4/app/src/main/res/layout/constraint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:background="?android:attr/windowBackground">


<TextView
android:id="@+id/login_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_title"
style="@style/TEXT"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="24dp"/>


<EditText
style="@style/EditTextStyle"
android:id="@+id/user_id"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/hint_user_id"
android:inputType="text"
android:importantForAutofill="no"
app:layout_constraintTop_toBottomOf="@id/login_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="24dp"/>


<EditText
style="@style/EditTextStyle"
android:id="@+id/user_password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/hint_user_password"
android:inputType="textPassword"
android:importantForAutofill="no"
app:layout_constraintTop_toBottomOf="@id/user_id"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp"/>


<Button
style="@style/loginButton"
android:id="@+id/btn_login"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/btn_login"
app:layout_constraintTop_toBottomOf="@id/user_password"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="24dp"/>


</androidx.constraintlayout.widget.ConstraintLayout>
7 changes: 7 additions & 0 deletions assignment_week_4/app/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<resources>
<string name="app_name">assignment_week_02</string>
<string name="login_title">Login</string>
<string name="hint_user_id">Please enter your ID</string>
<string name="hint_user_password">Please enter your password</string>
<string name="btn_login">Login</string>
</resources>
25 changes: 25 additions & 0 deletions assignment_week_4/app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<resources>
<style name="Base.Theme.Assignment_week_02" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:windowBackground">@color/dark_background</item>
<item name="android:textColor">@color/dark_text_color</item>
</style>

<style name="Theme.Assignment_week_02" parent="Base.Theme.Assignment_week_02" />

<!-- TextView 색상 -->
<style name="TEXT">
<item name="android:textColor">@color/dark_text_color</item>
</style>

<!-- EditText 색상 -->
<style name="EditTextStyle">
<item name="android:backgroundTint">@color/dark_edit_text_background</item>
<item name="android:textColorHint">@color/dark_hint_text_color</item>
</style>

<!-- Button 색상 -->
<style name="loginButton">
<item name="android:backgroundTint">@color/dark_button_background</item>
<item name="android:textColor">@color/dark_button_text_color</item>
</style>
</resources>
Loading