diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2012-08-15 19:36:31 +0200 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2012-08-15 19:37:10 +0200 |
commit | 105cd5ea833d2d6dc23d2df3f303073ec6bd9929 (patch) | |
tree | 3a6a801fb9b137760e895a0cc0f58de34fd2eaf8 | |
parent | 5308c3d6a6df36d27969e9a9b66e40bd9d2ecc5a (diff) |
Added rotated blankscreen + fixed return button.
Change-Id: I770ff1d77102cfbe63849babed6bd9406d958b09
3 files changed, 70 insertions, 1 deletions
diff --git a/android/sdremote/res/layout-land/fragment_blankscreen.xml b/android/sdremote/res/layout-land/fragment_blankscreen.xml new file mode 100644 index 000000000000..3117d307b289 --- /dev/null +++ b/android/sdremote/res/layout-land/fragment_blankscreen.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:layout_margin="10dip" + android:gravity="center_horizontal" + android:orientation="vertical" > + + <ImageView + android:id="@+id/blankscreen_blankimage" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:scaleType="fitXY" + android:src="@drawable/rectangle_black" /> + + <ImageView + android:id="@+id/blankscreen_divider" + android:layout_width="1dip" + android:layout_height="fill_parent" + android:layout_centerHorizontal="true" + android:layout_marginLeft="10dip" + android:layout_marginRight="5dip" + android:layout_toRightOf="@+id/blankscreen_blankimage" + android:src="@color/medium_grey" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentRight="true" + android:layout_gravity="center_vertical" + android:layout_toRightOf="@id/blankscreen_divider" + android:gravity="center" + android:orientation="vertical" > + + <ImageView + android:id="@+id/blankscreen_slidepreview" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="5dip" + android:adjustViewBounds="true" + android:scaleType="centerInside" + android:src="@drawable/rectangle_black" /> + + <TextView + android:id="@+id/blankscreen_return" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_margin="5dip" + android:gravity="center" + android:text="@string/blankscreen_return" /> + </LinearLayout> + +</RelativeLayout>
\ No newline at end of file diff --git a/android/sdremote/res/layout/fragment_blankscreen.xml b/android/sdremote/res/layout/fragment_blankscreen.xml index f717f247e502..cf287ba1220a 100644 --- a/android/sdremote/res/layout/fragment_blankscreen.xml +++ b/android/sdremote/res/layout/fragment_blankscreen.xml @@ -39,6 +39,7 @@ android:layout_alignParentRight="true" android:gravity="center" android:layout_below="@id/blankscreen_divider" - android:text="@string/blankscreen_return" /> + android:text="@string/blankscreen_return" + android:layout_margin="5dip" /> </RelativeLayout>
\ No newline at end of file diff --git a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java index 2f0c8d1cd7d0..e8491251af75 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java @@ -11,6 +11,7 @@ import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; +import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; @@ -52,6 +53,18 @@ public class BlankScreenFragment extends Fragment { .findViewById(R.id.blankscreen_slidepreview); aImage.setImageBitmap(aOut); + OnClickListener aListener = new OnClickListener() { + + @Override + public void onClick(View v) { + getFragmentManager().popBackStackImmediate(); + } + + }; + + v.findViewById(R.id.blankscreen_slidepreview).setOnClickListener( + aListener); + v.findViewById(R.id.blankscreen_return).setOnClickListener(aListener); mCommunicationService.getTransmitter().blankScreen(); // TODO Auto-generated method stub return v; |