Kaydet (Commit) 76c5f6fd authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

More 2.3 styling + fix for flickering bug on multi-slide change.

Change-Id: Iae19e9d44f1a437737c943c06356a99957c6991e
üst 61c94cbe
......@@ -51,4 +51,22 @@
android:text="www.libreoffice.org"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/about_licence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dip"
android:gravity="center_horizontal"
android:text="@string/about_licence" />
<TextView
android:id="@+id/about_libraries"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dip"
android:text="@string/about_libraries" />
</LinearLayout>
\ No newline at end of file
......@@ -33,6 +33,8 @@
<string name="about_close">Close</string>
<string name="about_versionstring">Version: {0} (Build ID: {1})</string>
<string name="about_copyright">Copyright \u00A9 2012 LibreOffice Contributors and/or their affiliates.</string>
<string name="about_licence">This app is release under the Mozilla Public License, v. 2.0.</string>
<string name="about_libraries">This app uses android-coverflow\n\tCopyright © 2011, Polidea\n\tAll rights reserved.\n\nThis app uses ActionBarSherlock:\n\tCopyright 2012 Jake Wharton\n\tLicensed under the Apache License, Version 2.0 (the "License")</string>
<string name="addserver">Add Server</string>
<string name="addserver_entername">Server name:</string>
<string name="addserver_enteraddress">Server address as IP or hostname:</string>
......@@ -40,5 +42,6 @@
<string name="addserver_add">Add</string>
<string name="addserver_cancel">Cancel</string>
<string name="reconnect_description1">Your connection has been dropped.</string>
<string name="reconnect_description2">Attempting to reconnect…</string>
<string name="reconnect_description2">Attempting to reconnect…</string>
</resources>
\ No newline at end of file
......@@ -41,11 +41,24 @@
<style name="Theme.ImpressRemote.ActionBarMenuItem" parent="Widget.Sherlock.Light.Spinner.DropDown.ActionBar">
<item name="android:background">@color/grey</item>
<item name="android:textColor">@color/white</item>
<item name="android:textSize">16dp</item>
</style>
<style name="Theme.ImpressRemote.Dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/light_grey</item>
<item name="android:fullDark">@color/light_grey</item>
<item name="android:topDark">@color/light_grey</item>
<item name="android:centerDark">@color/light_grey</item>
<item name="android:bottomDark">@color/light_grey</item>
<item name="android:fullBright">@color/light_grey</item>
<item name="android:centerBright">@color/light_grey</item>
<item name="android:bottomBright">@color/light_grey</item>
<item name="android:bottomMedium">@color/light_grey</item>
<item name="android:centerMedium">@color/light_grey</item>
<item name="android:textColor">@color/grey</item>
</style>
<style name="Theme.ImpressRemote" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item>
<item name="actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item>
......@@ -56,7 +69,7 @@
<item name="android:windowBackground">@color/light_grey</item>
<item name="android:homeAsUpIndicator">@drawable/up_indicator_white</item>
<item name="android:textColor">@color/text_grey</item>
<item name="android:alertDialogStyle">@style/Theme.ImpressRemote.Dialog</item>
</style>
</resources>
\ No newline at end of file
......@@ -39,7 +39,7 @@ public class AboutDialogBuilder extends AlertDialog.Builder {
PackageInfo aInfo = aContext.getPackageManager().getPackageInfo(
aContext.getPackageName(), 0);
String aVersionString = MessageFormat.format(
getContext().getResources().getString(
aContext.getResources().getString(
R.string.about_versionstring),
aInfo.versionName, aInfo.versionCode);
mVersionLabel.setText(aVersionString);
......
......@@ -49,6 +49,8 @@ public class PresentationFragment extends SherlockFragment {
private float mNewCoverflowWidth = 0;
private float mNewCoverflowHeight = 0;
private long lastUpdateTime = 0;
private ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName aClassName,
......@@ -64,7 +66,8 @@ public class PresentationFragment extends SherlockFragment {
mTopView.setOnItemSelectedListener(new ClickListener());
}
updateSlideNumberDisplay();
updateSlideNumberDisplay(mCommunicationService.getSlideShow()
.getCurrentSlide());
}
......@@ -138,12 +141,12 @@ public class PresentationFragment extends SherlockFragment {
}
private void updateSlideNumberDisplay() {
int aSlide = mCommunicationService.getSlideShow().getCurrentSlide();
mNumberText.setText((aSlide + 1) + "/"
private void updateSlideNumberDisplay(int aPosition) {
// int aSlide = mCommunicationService.getSlideShow().getCurrentSlide();
mNumberText.setText((aPosition + 1) + "/"
+ mCommunicationService.getSlideShow().getSize());
mNotes.loadData(mCommunicationService.getSlideShow().getNotes(aSlide),
"text/html", null);
mNotes.loadData(mCommunicationService.getSlideShow()
.getNotes(aPosition), "text/html", null);
}
// -------------------------------------------------- RESIZING LISTENER ----
......@@ -232,6 +235,8 @@ public class PresentationFragment extends SherlockFragment {
int aPosition, long arg3) {
if (mCommunicationService != null)
mCommunicationService.getTransmitter().gotoSlide(aPosition);
lastUpdateTime = System.currentTimeMillis();
updateSlideNumberDisplay(aPosition);
}
@Override
......@@ -247,8 +252,13 @@ public class PresentationFragment extends SherlockFragment {
if (aIntent.getAction().equals(
CommunicationService.MSG_SLIDE_CHANGED)) {
int aSlide = aIntent.getExtras().getInt("slide_number");
if (aSlide == mTopView.getSelectedItemPosition())
return;
if ((System.currentTimeMillis() - lastUpdateTime) < 5000) {
return;
}
mTopView.setSelection(aSlide, true);
updateSlideNumberDisplay();
} else if (aIntent.getAction().equals(
CommunicationService.MSG_SLIDE_PREVIEW)) {
// int aNSlide = aIntent.getExtras().getInt("slide_number");
......
/*
* Copyright (c) 2011, Polidea
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the distribution.
* Neither the name of the Polidea nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package pl.polidea.coverflow;
import android.content.Context;
......
/*
* Copyright (c) 2011, Polidea
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the distribution.
* Neither the name of the Polidea nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package pl.polidea.coverflow;
import android.R.color;
......
/*
* Copyright (c) 2011, Polidea
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the distribution.
* Neither the name of the Polidea nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package pl.polidea.coverflow;
import java.lang.ref.WeakReference;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment