mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
current book is highlighted in the library view
This commit is contained in:
parent
f21995251c
commit
1cbc8765b7
2 changed files with 11 additions and 2 deletions
|
@ -164,6 +164,14 @@ abstract class LibraryBaseActivity extends ListActivity {
|
|||
final View view = (convertView != null) ? convertView :
|
||||
LayoutInflater.from(parent.getContext()).inflate(R.layout.library_tree_item, parent, false);
|
||||
|
||||
if (tree instanceof BookTree &&
|
||||
mySelectedBookPath != null &&
|
||||
mySelectedBookPath.equals(((BookTree)tree).Book.File.getPath())) {
|
||||
view.setBackgroundColor(0xff808080);
|
||||
} else {
|
||||
view.setBackgroundColor(0);
|
||||
}
|
||||
|
||||
((TextView)view.findViewById(R.id.library_tree_item_name)).setText(tree.getName());
|
||||
((TextView)view.findViewById(R.id.library_tree_item_childrenlist)).setText(tree.getSecondString());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue