Skip to content

Commit

Permalink
๐ŸŽจ Campus Filter Dropdown Item Size ์ˆ˜์ • (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
moondev03 authored Sep 25, 2024
1 parent b4ae534 commit dd5ebd3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.widget.ArrayAdapter
import android.widget.TextView
import androidx.annotation.LayoutRes
import com.neverland.thinkerbell.databinding.ItemSpinnerCampusBinding
import com.neverland.thinkerbell.databinding.ItemSpinnerCampusDropdownBinding

class CampusSpinnerAdapter(
context: Context,
Expand All @@ -35,10 +36,12 @@ class CampusSpinnerAdapter(
return emptyView
}

val binding = ItemSpinnerCampusBinding.inflate(LayoutInflater.from(parent.context), parent, false)
val binding = ItemSpinnerCampusDropdownBinding.inflate(LayoutInflater.from(parent.context), parent, false)
binding.tvSpinnerItem.text = spinnerList[position]
binding.tvSpinnerItem.textAlignment = TextView.TEXT_ALIGNMENT_CENTER

binding.divider.visibility = if(position == count-1) View.GONE else View.VISIBLE

return binding.root
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class CommonNoticeFragment(
override fun onNothingSelected(parent: AdapterView<*>?) {}
}

binding.spinnerCampus.dropDownHorizontalOffset = -24
binding.spinnerCampus.dropDownHorizontalOffset = -36
binding.spinnerCampus.dropDownVerticalOffset = 10
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
android:paddingStart="10dp"
android:paddingEnd="30dp"

android:theme="@style/SpinnerDivideStyle"
app:layout_constraintBottom_toTopOf="@id/rv_notice"

app:layout_constraintEnd_toEndOf="parent"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary2"
android:orientation="vertical">

<TextView
android:id="@+id/tv_spinner_item"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
tools:text="์ „์ฒด"
style="@style/Label_Medium"
android:textColor="@color/red_gray_800" />

<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="0.7dp"
android:background="@color/red_gray_400"/>

</LinearLayout>
10 changes: 0 additions & 10 deletions ThinkerBell/presentation/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
<item name="android:textColor">#BABABA</item>
</style>

<!-- Spinner -->
<style name="SpinnerDivideStyle" parent="android:style/Widget.ListView.DropDown">
<item name="android:divider">@color/primary1</item> <!-- divider ์ƒ‰ -->
<item name="android:dividerHeight">0.5dp</item> <!-- divider ๋†’์ด -->
</style>

<style name="SpinnerTheme">
<item name="android:dropDownListViewStyle">@style/SpinnerDivideStyle</item>
</style>

<style name="alarm_toggle">
<item name="thumbTint">@color/primary2</item>
<item name="track">@drawable/toggle_track</item>
Expand Down

0 comments on commit dd5ebd3

Please sign in to comment.