1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-08-13 16:53:50 -04:00

calculate channel preview size on base of parent's size

This commit is contained in:
Sebastian Kaspari 2010-03-08 23:56:14 +01:00
parent d740fb6365
commit e2848d505a

View File

@ -197,17 +197,22 @@ public class DeckAdapter extends BaseAdapter
// XXX: In addition to that we need to resize the lists if the
// screen is resized or rotated
float fw = (float) width;
float fh = (float) height;
/*
float fw = (float) ;
float fh = (float) parent.getHeight();
float vwf = fw / 100 * 80;
float vhf = fh / 100 * 80;
float vhf = fh / 100 * 90;
int w = (int) vwf;
int h = (int) vhf;
*/
list.setDivider(null);
list.setLayoutParams(new Gallery.LayoutParams(w, h));
list.setLayoutParams(new Gallery.LayoutParams(
parent.getWidth() / 100 * 85,
parent.getHeight() / 100 * 95
));
list.setBackgroundColor(0xff222222);
list.setPadding(5, 5, 5, 5);
list.setTranscriptMode(ListView.TRANSCRIPT_MODE_NORMAL);