Make title, album, and artist multi-line when extra info is visible
Closes #64
This commit is contained in:
parent
be9e298a72
commit
09825c0d71
@ -40,12 +40,10 @@ THE SOFTWARE.
|
||||
<TextView
|
||||
android:text="@string/_title"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true" />
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/queue_pos"
|
||||
android:singleLine="true"
|
||||
@ -55,71 +53,50 @@ THE SOFTWARE.
|
||||
<TextView
|
||||
android:text="@string/_artist"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/artist"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/artist" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_album"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/album"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/album" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_genre"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/genre"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/genre" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_track"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/track"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/track" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_year"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/year"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/year" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_composer"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/composer"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/composer" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_format"
|
||||
android:paddingRight="5dip"
|
||||
android:singleLine="true"
|
||||
android:gravity="right" />
|
||||
<TextView
|
||||
android:id="@+id/format"
|
||||
android:singleLine="true" />
|
||||
<TextView android:id="@+id/format" />
|
||||
</TableRow>
|
||||
<LinearLayout android:id="@+id/controls_top">
|
||||
<TextView
|
||||
|
@ -41,6 +41,7 @@ import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
@ -483,9 +484,15 @@ public class FullPlaybackActivity extends PlaybackActivity
|
||||
visible = false;
|
||||
|
||||
table.setColumnCollapsed(0, !visible);
|
||||
int visibility = visible ? View.VISIBLE : View.GONE;
|
||||
// Make title, album, and artist multi-line when extra info is visible
|
||||
boolean singleLine = !visible;
|
||||
for (int i = 0; i != 3; ++i) {
|
||||
TableRow row = (TableRow)table.getChildAt(i);
|
||||
((TextView)row.getChildAt(1)).setSingleLine(singleLine);
|
||||
}
|
||||
// toggle visibility of all but the first three rows (the title/artist/
|
||||
// album rows) and the last row (the seek bar)
|
||||
int visibility = visible ? View.VISIBLE : View.GONE;
|
||||
for (int i = table.getChildCount() - 1; --i != 2; ) {
|
||||
table.getChildAt(i).setVisibility(visibility);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user