Commit 0540df96 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix ListVews style

- Fixes keyboard navigation
- Brings ripple effect on menu list items
parent 211d56dc
......@@ -18,7 +18,8 @@
android:fastScrollEnabled="true"
android:paddingBottom="@dimen/listview_bottom_padding"
android:paddingLeft="10dp"
android:paddingRight="10dp"/>
android:paddingRight="10dp"
style="@style/Theme.VLC.List"/>
<ImageView
android:id="@+id/album_play"
android:layout_width="wrap_content"
......
......@@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
<ListView
android:id="@+id/albums"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -32,7 +32,8 @@
android:nextFocusUp="@+id/ml_menu_search"
android:nextFocusDown="@id/albums"
android:nextFocusLeft="@id/albums"
android:nextFocusRight="@id/albums" />
android:nextFocusRight="@id/albums"
style="@style/Theme.VLC.List" />
<ListView
android:id="@+id/songs"
......@@ -46,7 +47,8 @@
android:nextFocusUp="@+id/ml_menu_search"
android:nextFocusDown="@id/songs"
android:nextFocusLeft="@id/songs"
android:nextFocusRight="@id/songs" />
android:nextFocusRight="@id/songs"
style="@style/Theme.VLC.List" />
</android.support.v4.view.ViewPager>
</org.videolan.vlc.widget.SwipeRefreshLayout>
......
......@@ -43,7 +43,8 @@
android:nextFocusUp="@id/header"
android:nextFocusDown="@id/header"
android:nextFocusLeft="@id/artists_list"
android:nextFocusRight="@+id/albums_list" />
android:nextFocusRight="@+id/albums_list"
style="@style/Theme.VLC.List" />
<ListView
android:id="@+id/albums_list"
android:layout_width="fill_parent"
......@@ -57,7 +58,8 @@
android:nextFocusUp="@id/header"
android:nextFocusDown="@id/header"
android:nextFocusLeft="@id/artists_list"
android:nextFocusRight="@+id/songs_list" />
android:nextFocusRight="@+id/songs_list"
style="@style/Theme.VLC.List" />
<ListView
android:id="@+id/songs_list"
android:layout_width="fill_parent"
......@@ -71,7 +73,8 @@
android:nextFocusUp="@id/header"
android:nextFocusDown="@id/header"
android:nextFocusLeft="@id/albums_list"
android:nextFocusRight="@+id/genres_list" />
android:nextFocusRight="@+id/genres_list"
style="@style/Theme.VLC.List" />
<ListView
android:id="@+id/genres_list"
android:layout_width="fill_parent"
......@@ -85,7 +88,8 @@
android:nextFocusUp="@id/header"
android:nextFocusDown="@id/header"
android:nextFocusLeft="@id/songs_list"
android:nextFocusRight="@+id/playlists_list" />
android:nextFocusRight="@+id/playlists_list"
style="@style/Theme.VLC.List" />
<ListView
android:id="@+id/playlists_list"
android:layout_width="fill_parent"
......
......@@ -86,6 +86,8 @@
android:layout_height="match_parent"
android:layout_gravity="start"
android:focusable="true"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:paddingTop="?attr/actionBarSize"
android:nextFocusForward="@id/sidelist"
android:nextFocusUp="@id/sidelist"
......
......@@ -12,7 +12,6 @@
<item name="marginTopContent">50dp</item>
<item name="toolbar_popup_style">@style/ThemeOverlay.AppCompat.Light</item>
<item name="android:listViewStyle">@style/Theme.VLC.List</item>
<item name="android:gridViewStyle">@style/Theme.VLC.List</item>
<item name="android:expandableListViewStyle">@style/Theme.VLC.List</item>
<item name="android:dropDownListViewStyle">@style/Theme.VLC.List</item>
......@@ -89,7 +88,6 @@
<item name="marginTopContent">50dp</item>
<item name="toolbar_popup_style">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="android:listViewStyle">@style/Theme.VLC.List</item>
<item name="android:gridViewStyle">@style/Theme.VLC.List</item>
<item name="android:expandableListViewStyle">@style/Theme.VLC.List</item>
<item name="android:dropDownListViewStyle">@style/Theme.VLC.List</item>
......@@ -155,8 +153,10 @@
<item name="ic_equalizer_normal_style">@drawable/ic_equalizer_normal_w</item>
</style>
<style name="Theme.VLC.List">
<style name="Theme.VLC.List" parent="android:style/Widget.AbsListView">
<item name="android:listSelector">@drawable/background_item</item>
<item name="android:divider">@android:color/transparent</item>
<item name="android:dividerHeight">0dp</item>
</style>
<style name="Theme.VLC.NoTitleBar" parent="Theme.AppCompat.Light">
......
......@@ -142,10 +142,8 @@ public class SidebarAdapter extends BaseAdapter {
// Set in selected the current item.
if (TextUtils.equals(mCurrentFragmentId,sidebarEntry.id)) {
textView.setTypeface(null, Typeface.BOLD);
v.setBackgroundColor(Util.getColorFromAttribute(mContext, R.attr.background_menu_selected));
} else {
textView.setTypeface(null, Typeface.NORMAL);
v.setBackgroundColor(Util.getColorFromAttribute(mContext, R.attr.background_menu));
}
return v;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment