Basic clock control bar done.
Change-Id: I Ifd2e56b97f5b53ce29101d9eee7953b7700fb749
This commit is contained in:
committed by
Michael Meeks
parent
499f589711
commit
2e999e9604
30
android/sdremote/res/layout/presentation_clockbar.xml
Normal file
30
android/sdremote/res/layout/presentation_clockbar.xml
Normal file
@@ -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>
|
@@ -16,6 +16,7 @@ import android.os.IBinder;
|
|||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.Messenger;
|
import android.os.Messenger;
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
@@ -135,7 +136,7 @@ public class PresentationActivity extends Activity {
|
|||||||
|
|
||||||
mTimeLabel = (ToggleButton) aBar.getCustomView().findViewById(
|
mTimeLabel = (ToggleButton) aBar.getCustomView().findViewById(
|
||||||
R.id.actionbar_time);
|
R.id.actionbar_time);
|
||||||
mThumbnailButton.setOnClickListener(this);
|
mTimeLabel.setOnClickListener(this);
|
||||||
|
|
||||||
// Listen for fragment changes
|
// Listen for fragment changes
|
||||||
getFragmentManager().addOnBackStackChangedListener(this);
|
getFragmentManager().addOnBackStackChangedListener(this);
|
||||||
@@ -184,7 +185,11 @@ public class PresentationActivity extends Activity {
|
|||||||
getFragmentManager().popBackStack();
|
getFragmentManager().popBackStack();
|
||||||
}
|
}
|
||||||
} else if (aSource == mTimeLabel) {
|
} 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user