Show sequence numbers in the background as images load in list

Idea from ragesoss
This commit is contained in:
YuviPanda 2013-02-23 02:24:22 +05:30
parent 6e3ee460a6
commit 48b292ed25
2 changed files with 10 additions and 0 deletions

View file

@ -9,6 +9,14 @@
android:background="#000000"
>
<TextView android:id="@+id/contributionSequenceNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="98sp"
android:textColor="#33FFFFFF"
android:typeface="serif"
android:layout_gravity="end|bottom"
/>
<ImageView android:id="@+id/contributionImage"
android:layout_width="fill_parent"
android:layout_height="240dp"

View file

@ -50,6 +50,7 @@ public class ContributionsListFragment extends SherlockFragment {
ImageView imageView = (ImageView)view.findViewById(R.id.contributionImage);
TextView titleView = (TextView)view.findViewById(R.id.contributionTitle);
TextView stateView = (TextView)view.findViewById(R.id.contributionState);
TextView seqNumView = (TextView)view.findViewById(R.id.contributionSequenceNumber);
Contribution contribution = Contribution.fromCursor(cursor);
@ -66,6 +67,7 @@ public class ContributionsListFragment extends SherlockFragment {
}
titleView.setText(Utils.displayTitleFromTitle(contribution.getFilename()));
seqNumView.setText(String.valueOf(cursor.getPosition() + 1));
switch(contribution.getState()) {
case Contribution.STATE_COMPLETED:
stateView.setText("");