diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2012-07-25 18:30:43 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-08-06 10:23:02 +0100 |
commit | 2e999e96042a8c09e472b59a133b8d84adf777bc (patch) | |
tree | 31775ef92616086411470702cfeb2aea20beb9c4 /android/sdremote | |
parent | 499f5897115f1f3b4795dceae275b3f43fe1582e (diff) |
Basic clock control bar done.
Change-Id: I Ifd2e56b97f5b53ce29101d9eee7953b7700fb749
Diffstat (limited to 'android/sdremote')
-rw-r--r-- | android/sdremote/res/layout/presentation_clockbar.xml | 30 | ||||
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java | 9 |
2 files changed, 37 insertions, 2 deletions
diff --git a/android/sdremote/res/layout/presentation_clockbar.xml b/android/sdremote/res/layout/presentation_clockbar.xml new file mode 100644 index 000000000000..5ab708125cd9 --- /dev/null +++ b/android/sdremote/res/layout/presentation_clockbar.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="#BB000000"> + + <ToggleButton + android:id="@+id/clockbar_toggle_clockmode" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + + android:text="ToggleButton" /> + + <ToggleButton + android:id="@+id/clockbar_toggle_stopwatchmode" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@drawable/actionbar_toggle" /> + + <ToggleButton + android:id="@+id/clockbar_toggle_countdownmode" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@drawable/actionbar_toggle" /> + +</LinearLayout>
\ No newline at end of file diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java index 234042dba459..48e667897109 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java @@ -16,6 +16,7 @@ import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.text.format.DateFormat; +import android.view.LayoutInflater; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; @@ -135,7 +136,7 @@ public class PresentationActivity extends Activity { mTimeLabel = (ToggleButton) aBar.getCustomView().findViewById( R.id.actionbar_time); - mThumbnailButton.setOnClickListener(this); + mTimeLabel.setOnClickListener(this); // Listen for fragment changes getFragmentManager().addOnBackStackChangedListener(this); @@ -184,7 +185,11 @@ public class PresentationActivity extends Activity { getFragmentManager().popBackStack(); } } else if (aSource == mTimeLabel) { - + System.out.println("added"); + LayoutInflater aInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View v = aInflater.inflate(R.layout.presentation_clockbar, + mLayout); + // mLayout.addView(v); } } |