Reverted hack of including our own design for selectors
Switched to the standard abc_list_selector_holo_dark, that has no problems in the current appcompat library. Using it from XML file instead of source. This reverts changes from 03ede77bd1543333fc5778f310dafe7a28908f05
Before Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 273 B |
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_activated="true" android:drawable="@drawable/kitkatcompatselector_list_activated_holo" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
</selector>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
|
||||
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/kitkatcompatselector_list_selector_disabled_holo_dark" />
|
||||
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/kitkatcompatselector_list_selector_disabled_holo_dark" />
|
||||
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/kitkatcompatselector_list_selector_background_transition_holo_dark" />
|
||||
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/kitkatcompatselector_list_selector_background_transition_holo_dark" />
|
||||
<item android:state_focused="true" android:drawable="@drawable/kitkatcompatselector_list_focused_holo" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
</selector>
|
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<transition xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/kitkatcompatselector_list_pressed_holo_dark" />
|
||||
<item android:drawable="@drawable/kitkatcompatselector_list_longpressed_holo" />
|
||||
</transition>
|
@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_window_focused="false" android:drawable="@android:color/transparent" />
|
||||
|
||||
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
|
||||
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/kitkatcompatselector_list_selector_disabled_holo_dark" />
|
||||
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/kitkatcompatselector_list_selector_disabled_holo_dark" />
|
||||
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/kitkatcompatselector_list_selector_background_transition_holo_dark" />
|
||||
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/kitkatcompatselector_list_selector_background_transition_holo_dark" />
|
||||
<item android:state_focused="true" android:drawable="@drawable/kitkatcompatselector_list_focused_holo" />
|
||||
</selector>
|
@ -8,8 +8,10 @@
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?android:attr/scrollbarSize"
|
||||
android:background="@drawable/abc_list_selector_holo_dark"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- We should use android:background="@android:/listChoiceBackgroundIndicator"
|
||||
instead of abc_list_selector_holo_dark but that's only supported from API11 -->
|
||||
|
||||
<TextView android:id="@+id/list_item_entry_title"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Generated with http://android-holo-colors.com -->
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="KitKatCompatSelector" parent="Theme.AppCompat">
|
||||
|
||||
<item name="android:listChoiceBackgroundIndicator">@drawable/kitkatcompatselector_list_selector_holo_dark</item>
|
||||
|
||||
<item name="android:activatedBackgroundIndicator">@drawable/kitkatcompatselector_activated_background_holo_dark</item>
|
||||
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="kitkatcompatselector_color">#33b5e5</color>
|
||||
</resources>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Generated with http://android-holo-colors.com -->
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="ListViewKitKatCompatSelector" parent="android:Widget.ListView">
|
||||
<item name="android:listSelector">@drawable/kitkatcompatselector_list_selector_holo_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="ListViewKitKatCompatSelector.White" parent="android:Widget.ListView.White">
|
||||
<item name="android:listSelector">@drawable/kitkatcompatselector_list_selector_holo_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="SpinnerItemKitKatCompatSelector" parent="android:TextAppearance.Widget.TextView.SpinnerItem">
|
||||
<item name="android:textColor">#ffffff</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Generated with http://android-holo-colors.com -->
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="KitKatCompatSelector" parent="Theme.AppCompat">
|
||||
|
||||
<item name="android:listViewStyle">@style/ListViewKitKatCompatSelector</item>
|
||||
|
||||
<item name="android:listViewWhiteStyle">@style/ListViewKitKatCompatSelector.White</item>
|
||||
|
||||
<item name="android:spinnerItemStyle">@style/SpinnerItemKitKatCompatSelector</item>
|
||||
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -24,7 +24,6 @@ package org.kde.kdeconnect.UserInterface.List;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -47,9 +46,6 @@ public class DeviceItem implements ListAdapter.Item {
|
||||
public View inflateView(LayoutInflater layoutInflater) {
|
||||
final View v = layoutInflater.inflate(R.layout.list_item_entry, null);
|
||||
|
||||
//Highlight when selected effect
|
||||
v.setBackgroundDrawable(layoutInflater.getContext().getResources().getDrawable(R.drawable.kitkatcompatselector_list_selector_holo_dark));
|
||||
|
||||
TextView titleView = (TextView)v.findViewById(R.id.list_item_entry_title);
|
||||
if (titleView != null) titleView.setText(device.getName());
|
||||
if (device.compareProtocolVersion() != 0) {
|
||||
|
@ -50,8 +50,7 @@ public class SmallEntryItem implements ListAdapter.Item {
|
||||
if (titleView != null) titleView.setText(title);
|
||||
if (clickListener != null) {
|
||||
titleView.setOnClickListener(clickListener);
|
||||
v.setBackgroundDrawable(layoutInflater.getContext().getResources().getDrawable(R.drawable.kitkatcompatselector_list_selector_holo_dark));
|
||||
|
||||
v.setBackgroundDrawable(layoutInflater.getContext().getResources().getDrawable(R.drawable.abc_list_selector_holo_dark));
|
||||
}
|
||||
|
||||
return v;
|
||||
|