Skip to content

Commit e25728e

Browse files
committed
fix dropdown color for light mode
1 parent d9cc866 commit e25728e

2 files changed

Lines changed: 27 additions & 5 deletions

File tree

app/src/main/kotlin/org/fossify/calendar/activities/EventActivity.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,7 @@ class EventActivity : SimpleActivity() {
270270
}
271271

272272
runOnUiThread {
273-
val adapter = ArrayAdapter(
274-
this,
275-
android.R.layout.simple_dropdown_item_1line,
276-
eventTitleMap.keys.toList()
277-
)
273+
val adapter = ArrayAdapter(this, R.layout.item_dropdown, eventTitleMap.keys.toList())
278274
binding.eventTitle.setAdapter(adapter)
279275
}
280276

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2006 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<!-- Copied from simple_list_item_1.xml, textColor is needed in light mode-->
17+
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:id="@android:id/text1"
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content"
21+
android:textAppearance="?android:attr/textAppearanceListItemSmall"
22+
android:gravity="center_vertical"
23+
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
24+
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
25+
android:minHeight="?android:attr/listPreferredItemHeightSmall"
26+
android:textColor="?android:attr/textColorAlertDialogListItem" />

0 commit comments

Comments
 (0)