diff options
author | lado <herrlado@gmail.com> | 2011-10-08 00:12:26 +0200 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-10-08 00:12:26 +0200 |
commit | f3deabce766d858c284a8e4597fd1686989e44db (patch) | |
tree | 9d116142f7da0e344a3ff31dce6827ddd728a878 /vdrmanager | |
parent | 7ab4737ee456bcb37627ed4ef6dd32135c82fbf8 (diff) | |
download | vdr-manager-f3deabce766d858c284a8e4597fd1686989e44db.tar.gz vdr-manager-f3deabce766d858c284a8e4597fd1686989e44db.tar.bz2 |
provider name along channel name
Diffstat (limited to 'vdrmanager')
5 files changed, 34 insertions, 24 deletions
diff --git a/vdrmanager/res/layout/child_layout.xml b/vdrmanager/res/layout/child_layout.xml index 8ea125a..1ad4d80 100644 --- a/vdrmanager/res/layout/child_layout.xml +++ b/vdrmanager/res/layout/child_layout.xml @@ -1,12 +1,24 @@ <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="40dip" - xmlns:android="http://schemas.android.com/apk/res/android"> - - <TextView android:id="@+id/channel_name" android:layout_width="fill_parent" - android:layout_height="40dip" android:text="Channel" android:gravity="center_vertical|left" - android:paddingLeft="15dip" android:paddingRight="5dip" - android:textColor="#ffffffff" android:background="@android:drawable/list_selector_background" - android:textStyle="bold" - android:textAppearance="?android:textAppearanceMedium"/> + xmlns:android="http://schemas.android.com/apk/res/android" + > + <LinearLayout android:layout_width="fill_parent" + android:background="@android:drawable/list_selector_background" + android:layout_height="wrap_content"> + <TextView android:id="@+id/channel_name" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="Channel" android:gravity="center_vertical|left" + android:paddingLeft="15dip" android:paddingRight="5dip" + android:textColor="#ffffffff" + android:textStyle="bold" android:maxLines="2" + android:textAppearance="?android:textAppearanceMedium" + android:layout_weight="2" /> + + <TextView android:id="@+id/channel_aux" android:layout_width="40dip" + android:layout_height="40dip" android:layout_weight="1" android:text="23" + android:gravity="center_vertical|right" android:ellipsize="end" + android:layout_marginRight="5dip" android:textColor="#BDBDBD" + android:textAppearance="?android:textAppearanceSmall" /> + </LinearLayout> </LinearLayout> diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java index e413b31..c712cdd 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java @@ -84,6 +84,7 @@ class ChannelAdapter extends BaseExpandableListAdapter implements Filterable// , itemHolder.name = (TextView) view.findViewById(R.id.channel_name); itemHolder.type = (ImageView) view.findViewById(R.id.channel_type); + itemHolder.aux = (TextView) view.findViewById(R.id.channel_aux); view.setTag(itemHolder); } else { @@ -97,7 +98,13 @@ class ChannelAdapter extends BaseExpandableListAdapter implements Filterable// , name = item.getNumber() + " - " + name; } itemHolder.name.setText(name); - + + if(groupBy != ChannelListActivity.MENU_PROVIDER){ + itemHolder.aux.setText(item.getProvider()); + } else { + itemHolder.aux.setText(""); + } + return view; } @@ -125,25 +132,25 @@ class ChannelAdapter extends BaseExpandableListAdapter implements Filterable// , View convertView, ViewGroup parent) { String group = (String) getGroup(groupPosition); - GroupHolder itemHolder = new GroupHolder(); + ChannelHolder itemHolder = new ChannelHolder(); // recycle view? View view = convertView; if (view == null) { view = inflater.inflate(R.layout.group_layout, null); - itemHolder = new GroupHolder(); + itemHolder = new ChannelHolder(); itemHolder.name = (TextView) view.findViewById(R.id.group_name); - itemHolder.count = (TextView) view.findViewById(R.id.channel_count); + itemHolder.aux = (TextView) view.findViewById(R.id.channel_count); // itemHolder.type = (ImageView) // view.findViewById(R.id.channel_type); view.setTag(itemHolder); } else { - itemHolder = (GroupHolder) view.getTag(); + itemHolder = (ChannelHolder) view.getTag(); } itemHolder.name.setText(group); - itemHolder.count.setText(String.valueOf(this.channels.get(group).size())); + itemHolder.aux.setText(String.valueOf(this.channels.get(group).size())); return view; } diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelHolder.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelHolder.java index ef09410..e103449 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelHolder.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelHolder.java @@ -6,4 +6,5 @@ import android.widget.TextView; class ChannelHolder { public ImageView type; public TextView name; + public TextView aux; }
\ No newline at end of file diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventAdapter.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventAdapter.java index f4cb3f8..181195a 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventAdapter.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventAdapter.java @@ -1,8 +1,5 @@ package de.bjusystems.vdrmanager.gui; -import java.util.ArrayList; -import java.util.List; - import android.content.Context; import android.graphics.Color; import android.text.TextUtils; diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/GroupHolder.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/GroupHolder.java deleted file mode 100644 index 6647a3c..0000000 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/GroupHolder.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.bjusystems.vdrmanager.gui; - -import android.widget.TextView; - -class GroupHolder extends ChannelHolder { - public TextView count; -}
\ No newline at end of file |