android: Status tab slideshow optimization

This commit is contained in:
Joachim Fritzsch 2013-05-18 20:53:37 +02:00
parent a55f3c7eec
commit ac4ee5767b
2 changed files with 15 additions and 11 deletions

View File

@ -59,17 +59,13 @@
</LinearLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/slideshow_wrapper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone"
android:padding="10dp"
android:orientation="vertical">
<Gallery
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/image_view"
@ -77,18 +73,26 @@
android:layout_height="fill_parent"
android:contentDescription="@string/status_image_description"
android:scaleType="fitCenter"
android:padding="20dp"
android:layout_marginTop="10dp"
android:layout_alignParentTop="true"
android:paddingBottom="135dp"
android:adjustViewBounds="true"/>
<TextView
android:id="@+id/image_description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/gallery"
android:gravity="center_horizontal"
android:layout_marginTop="10dp"/>
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<Gallery
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</LinearLayout>
</RelativeLayout>

View File

@ -66,7 +66,7 @@ public class StatusActivity extends Activity implements OnClickListener{
private Integer suspendReason = -1;
//slide show
private LinearLayout slideshowWrapper;
private RelativeLayout slideshowWrapper;
private BroadcastReceiver mClientStatusChangeRec = new BroadcastReceiver() {
@Override
@ -156,7 +156,7 @@ public class StatusActivity extends Activity implements OnClickListener{
TextView statusHeader = (TextView) findViewById(R.id.status_header);
ImageView statusImage = (ImageView) findViewById(R.id.status_image);
TextView statusDescriptor = (TextView) findViewById(R.id.status_long);
slideshowWrapper = (LinearLayout) findViewById(R.id.slideshow_wrapper);
slideshowWrapper = (RelativeLayout) findViewById(R.id.slideshow_wrapper);
// adapt to specific computing status
switch(status.computingStatus) {