-
Notifications
You must be signed in to change notification settings - Fork 1
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
39 changed files
with
680 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
app/src/main/java/com/notation/campusnote/semester/SemesterActivity.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.notation.campusnote.semester | ||
|
||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import androidx.recyclerview.widget.LinearLayoutManager | ||
import com.notation.campusnote.R | ||
import com.notation.campusnote.databinding.ActivitySemesterBinding | ||
|
||
class SemesterActivity : AppCompatActivity() { | ||
private lateinit var binding: ActivitySemesterBinding | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = ActivitySemesterBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
|
||
val semesterList: ArrayList<SemesterList> = arrayListOf() | ||
binding.rvSemester.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false) | ||
binding.rvSemester.adapter = SemesterRVAdapter(semesterList) | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/notation/campusnote/semester/SemesterList.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.notation.campusnote.semester | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class SemesterList( | ||
@SerializedName("semester") val semester: String, | ||
@SerializedName("noteNum") val noteNum: Int | ||
) |
25 changes: 25 additions & 0 deletions
25
app/src/main/java/com/notation/campusnote/semester/SemesterRVAdapter.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.notation.campusnote.semester | ||
|
||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.notation.campusnote.databinding.ItemSemesterListBinding | ||
|
||
class SemesterRVAdapter(private val semesterList: List<SemesterList>): | ||
RecyclerView.Adapter<SemesterRVAdapter.ViewHolder>() { | ||
class ViewHolder(private var binding: ItemSemesterListBinding): RecyclerView.ViewHolder(binding.root) { | ||
val semester = binding.semester | ||
val noteNum = binding.noteNum | ||
} | ||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | ||
val binding = ItemSemesterListBinding.inflate(LayoutInflater.from(parent.context), parent, false) | ||
return ViewHolder(binding) | ||
} | ||
|
||
override fun getItemCount(): Int = semesterList.size | ||
|
||
override fun onBindViewHolder(holder: ViewHolder, position: Int) { | ||
holder.semester.text = semesterList[position].semester | ||
holder.noteNum.text = semesterList[position].noteNum.toString() | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
<path | ||
android:pathData="M18.4,26.069H26.4M5.6,26.069L11.421,24.896C11.73,24.834 12.014,24.681 12.237,24.458L25.269,11.42C25.893,10.795 25.893,9.781 25.268,9.157L22.507,6.399C21.882,5.775 20.869,5.775 20.245,6.4L7.212,19.44C6.989,19.663 6.837,19.946 6.775,20.254L5.6,26.069Z" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#FCFCFC" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="28dp" | ||
android:height="28dp" | ||
android:viewportWidth="28" | ||
android:viewportHeight="28"> | ||
<path | ||
android:pathData="M16.333,11.667V19.833M11.667,11.667V19.833M7,7V20.767C7,22.073 7,22.726 7.254,23.226C7.478,23.665 7.835,24.022 8.274,24.246C8.772,24.5 9.426,24.5 10.73,24.5H17.27C18.575,24.5 19.227,24.5 19.725,24.246C20.164,24.022 20.522,23.665 20.746,23.226C21,22.727 21,22.074 21,20.77V7M7,7H9.333M7,7H4.667M9.333,7H18.667M9.333,7C9.333,5.913 9.333,5.369 9.511,4.941C9.748,4.369 10.202,3.914 10.774,3.678C11.202,3.5 11.746,3.5 12.833,3.5H15.167C16.254,3.5 16.798,3.5 17.226,3.678C17.798,3.914 18.252,4.369 18.489,4.941C18.667,5.369 18.667,5.913 18.667,7M18.667,7H21M21,7H23.333" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#B1B1B1" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,16 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="22dp" | ||
android:height="22dp" | ||
android:viewportWidth="22" | ||
android:viewportHeight="22"> | ||
<path | ||
android:pathData="M1,11C1,16.523 5.477,21 11,21C16.523,21 21,16.523 21,11C21,5.477 16.523,1 11,1C5.477,1 1,5.477 1,11Z" | ||
android:fillColor="#FCFCFC"/> | ||
<path | ||
android:strokeWidth="1" | ||
android:pathData="M6.556,11H11M11,11H15.444M11,11V15.444M11,11V6.556M11,21C5.477,21 1,16.523 1,11C1,5.477 5.477,1 11,1C16.523,1 21,5.477 21,11C21,16.523 16.523,21 11,21Z" | ||
android:strokeLineJoin="round" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#4076FF" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
<path | ||
android:pathData="M13.333,24H29M13.333,24C13.333,22.159 11.841,20.667 10,20.667C8.159,20.667 6.667,22.159 6.667,24M13.333,24C13.333,25.841 11.841,27.333 10,27.333C8.159,27.333 6.667,25.841 6.667,24M3,24H6.667M25.333,16H29M25.333,16C25.333,14.159 23.841,12.667 22,12.667C20.159,12.667 18.667,14.159 18.667,16M25.333,16C25.333,17.841 23.841,19.333 22,19.333C20.159,19.333 18.667,17.841 18.667,16M3,16H18.667M17.333,8H29M17.333,8C17.333,6.159 15.841,4.667 14,4.667C12.159,4.667 10.667,6.159 10.667,8M17.333,8C17.333,9.841 15.841,11.333 14,11.333C12.159,11.333 10.667,9.841 10.667,8M3,8H10.667" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M6.5,5.25H6C5.3,5.25 4.95,5.25 4.682,5.386C4.447,5.506 4.256,5.697 4.136,5.932C4,6.2 4,6.55 4,7.25V7.75M6.5,5.25H11.5M6.5,5.25V4M11.5,5.25H12C12.7,5.25 13.05,5.25 13.317,5.386C13.552,5.506 13.744,5.697 13.864,5.932C14,6.2 14,6.549 14,7.248V7.75M11.5,5.25V4M4,7.75V13.25C4,13.95 4,14.3 4.136,14.567C4.256,14.803 4.447,14.994 4.682,15.114C4.95,15.25 5.299,15.25 5.998,15.25H12.002C12.701,15.25 13.05,15.25 13.317,15.114C13.552,14.994 13.744,14.803 13.864,14.567C14,14.3 14,13.951 14,13.252V7.75M4,7.75H14M11.5,12.75H11.501L11.501,12.751L11.5,12.751V12.75ZM9,12.75H9.001L9.001,12.751L9,12.751V12.75ZM6.5,12.75H6.501L6.501,12.751L6.5,12.751V12.75ZM11.501,10.25V10.251L11.5,10.251V10.25H11.501ZM9,10.25H9.001L9.001,10.251L9,10.251V10.25ZM6.5,10.25H6.501L6.501,10.251L6.5,10.251V10.25Z" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#B1B1B1" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M9.5,7.444V10.5H12.556M9.5,16C6.462,16 4,13.538 4,10.5C4,7.462 6.462,5 9.5,5C12.538,5 15,7.462 15,10.5C15,13.538 12.538,16 9.5,16Z" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#B1B1B1" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M5,15.125V12.137M5,12.137C8.273,9.577 10.727,14.695 14,12.136V5.739C10.727,8.298 8.273,3.18 5,5.739V12.137Z" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#B1B1B1" | ||
android:strokeLineCap="round"/> | ||
</vector> |
File renamed without changes.
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="16dp" | ||
android:height="16dp" | ||
android:viewportWidth="16" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M5.25,3H4.8C4.17,3 3.855,3 3.614,3.136C3.402,3.256 3.23,3.447 3.123,3.682C3,3.95 3,4.3 3,5V11C3,11.7 3,12.05 3.123,12.317C3.23,12.553 3.402,12.744 3.614,12.864C3.855,13 4.169,13 4.798,13H5.25M5.25,3H10.2C10.83,3 11.145,3 11.385,3.136C11.597,3.256 11.77,3.447 11.877,3.682C12,3.95 12,4.299 12,4.998V11.002C12,11.701 12,12.05 11.877,12.317C11.77,12.553 11.597,12.744 11.385,12.864C11.145,13 10.831,13 10.202,13H5.25M5.25,3V13M7.5,7.375H9.75M7.5,5.5H9.75" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="0.8" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#FCFCFC" | ||
android:strokeLineCap="round"/> | ||
</vector> |
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,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="16dp" | ||
android:height="16dp" | ||
android:viewportWidth="16" | ||
android:viewportHeight="16"> | ||
<path | ||
android:strokeWidth="1" | ||
android:pathData="M8,6.388V13M8,6.388C8,5.202 8,4.609 8.182,4.156C8.341,3.758 8.596,3.434 8.91,3.231C9.266,3 9.733,3 10.667,3H12.111C12.422,3 12.578,3 12.697,3.077C12.801,3.145 12.886,3.253 12.939,3.385C13,3.536 13,3.734 13,4.129V10.341C13,10.737 13,10.934 12.939,11.085C12.886,11.218 12.801,11.326 12.697,11.394C12.578,11.471 12.423,11.471 12.112,11.471H10.538C10.017,11.471 9.755,11.471 9.519,11.562C9.309,11.643 9.114,11.775 8.945,11.952C8.536,12.379 8.5,12.412 8,13M8,6.388C8,5.202 8,4.609 7.818,4.156C7.658,3.758 7.403,3.434 7.09,3.231C6.733,3 6.267,3 5.333,3H3.889C3.578,3 3.422,3 3.303,3.077C3.199,3.145 3.114,3.253 3.061,3.385C3,3.536 3,3.734 3,4.129V10.341C3,10.737 3,10.934 3.061,11.085C3.114,11.218 3.199,11.326 3.303,11.394C3.422,11.471 3.577,11.471 3.888,11.471H5.462C5.983,11.471 6.244,11.471 6.481,11.562C6.691,11.643 6.886,11.775 7.055,11.952C7.464,12.379 7.5,12.412 8,13" | ||
android:strokeLineJoin="round" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#FCFCFC" | ||
android:strokeLineCap="round"/> | ||
</vector> |
Oops, something went wrong.