1
0
Fork 0
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:
Nikolay Pultsin 2010-12-15 20:05:11 +03:00
parent f21995251c
commit 1cbc8765b7
2 changed files with 11 additions and 2 deletions

View file

@ -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());