facebook button substituted with operators in the widget

This commit is contained in:
Solovyev_S 2013-07-02 16:29:49 +04:00
parent c55001ffa2
commit 16385653d9
14 changed files with 56 additions and 19 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

View File

@ -24,6 +24,6 @@
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@id/cpp_button_like"
a:src="@drawable/kb_facebook"
a:src="@drawable/kb_share"
style="@style/cpp_simple_metro_control_image_button_style"
a:contentDescription="Like"/>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013 serso aka se.solovyev
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Contact details
~
~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org
-->
<Button xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@id/cpp_button_operators"
a:text="∂,…"
a:textStyle="italic"
style="@style/cpp_simple_metro_control_button_style"/>

View File

@ -78,7 +78,7 @@
<include layout="@layout/cpp_simple_button_plus"/>
<include layout="@layout/cpp_simple_button_like"/>
<include layout="@layout/cpp_simple_button_operators"/>
<include layout="@layout/cpp_simple_button_copy"/>

View File

@ -24,8 +24,8 @@
<string name="c_about">О программе</string>
<string name="c_about_content">Copyright (c) 2009-2011\n\n<b>Программа создана\nserso aka se.solovyev</b>\n\n
Сайт приложения:<a href="http://facebook.com/calculatorpp">http://facebook.com/calculatorpp</a>\n\n
<string name="c_about_content">Copyright (c) 2009-2013\n\n<b>Программа создана\nserso aka se.solovyev</b>\n\n
Сайт приложения: <a href="https://vk.com/calculatorpp">https://vk.com/calculatorpp</a>\n\n
Эта программа с открытыми исходным кодом:\nон может быть найден на \n
<a href="https://github.com/serso/android-calculatorpp">http://github.com</a>\n\n
За подробной информацией, пожалуйста,\nобращайтесь на почту\n<a href="mailto:se.solovyev@gmail.com">
@ -34,13 +34,10 @@
Если вы хотите поддержать проект материально\nвы можете купить специальную опцию из настроек приложения\n\n
Если вам понравилось приложение -\nпоставьте 5 звёздочек в\n
<a href="https://market.android.com/details?id=org.solovyev.android.calculator">Google Play</a>\n\n
Спасибо тем, кто переводил Калькулятор++:\n
на итальянский - Gabriele Ravanetti\n
на испанский - Jordi Luna\n
на украинский - Андрій Бандура\n\n
Это приложение использует следующие открытые библиотеки:\n
<a href="http://simple.sourceforge.net">Simple (XML serialization)</a>\n
<a href="http://meditorworld.appspot.com/meditor.txt">JSCL</a>
</string>
<string name="cpp_share_link">https://vk.com/calculatorpp</string>
</resources>

View File

@ -41,5 +41,6 @@
<string name="c_release_notes">Release notes</string>
<string name="c_release_notes_for_title">"Release notes for version "</string>
<string name="cpp_share_link">http://www.facebook.com/calculatorpp</string>
</resources>

View File

@ -32,6 +32,16 @@ import org.solovyev.android.calculator.core.R;
import java.util.HashMap;
import java.util.Map;
import static org.solovyev.android.calculator.CalculatorSpecialButton.cursor_left;
import static org.solovyev.android.calculator.CalculatorSpecialButton.cursor_right;
import static org.solovyev.android.calculator.CalculatorSpecialButton.functions_detached;
import static org.solovyev.android.calculator.CalculatorSpecialButton.history_detached;
import static org.solovyev.android.calculator.CalculatorSpecialButton.like;
import static org.solovyev.android.calculator.CalculatorSpecialButton.open_app;
import static org.solovyev.android.calculator.CalculatorSpecialButton.operators_detached;
import static org.solovyev.android.calculator.CalculatorSpecialButton.settings_detached;
import static org.solovyev.android.calculator.CalculatorSpecialButton.vars_detached;
/**
* User: serso
* Date: 10/20/12
@ -54,16 +64,17 @@ public enum CalculatorButton {
period(R.id.cpp_button_period, "."),
brackets(R.id.cpp_button_round_brackets, "()"),
settings(R.id.cpp_button_settings, CalculatorSpecialButton.settings_detached),
settings(R.id.cpp_button_settings, settings_detached),
like(R.id.cpp_button_like, CalculatorSpecialButton.like),
/*last row*/
left(R.id.cpp_button_left, CalculatorSpecialButton.cursor_left),
right(R.id.cpp_button_right, CalculatorSpecialButton.cursor_right),
vars(R.id.cpp_button_vars, CalculatorSpecialButton.vars_detached),
functions(R.id.cpp_button_functions, CalculatorSpecialButton.functions_detached),
app(R.id.cpp_button_app, CalculatorSpecialButton.open_app),
history(R.id.cpp_button_history, CalculatorSpecialButton.history_detached),
left(R.id.cpp_button_left, cursor_left),
right(R.id.cpp_button_right, cursor_right),
vars(R.id.cpp_button_vars, vars_detached),
functions(R.id.cpp_button_functions, functions_detached),
operators(R.id.cpp_button_operators, operators_detached),
app(R.id.cpp_button_app, open_app),
history(R.id.cpp_button_history, history_detached),
/*operations*/
multiplication(R.id.cpp_button_multiplication, "*"),

View File

@ -24,6 +24,6 @@
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@id/cpp_button_like"
a:src="@drawable/kb_facebook"
a:src="@drawable/kb_share"
style="?cpp_control_image_button_style"
a:onClick="likeButtonClickHandler"/>

View File

@ -205,7 +205,7 @@ public final class CalculatorActivityLauncher implements CalculatorEventListener
}
public static void likeButtonPressed(@Nonnull final Context context) {
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(CalculatorApplication.FACEBOOK_APP_URL));
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(context.getString(R.string.cpp_share_link)));
Android.addIntentFlags(intent, false, context);
context.startActivity(intent);
}

View File

@ -72,7 +72,6 @@ public class CalculatorApplication extends android.app.Application implements Sh
*/
private static final String TAG = "Calculator++ Application";
public static final String FACEBOOK_APP_URL = "http://www.facebook.com/calculatorpp";
public static final String AD_FREE_PRODUCT_ID = "ad_free";
public static final String AD_FREE_P_KEY = "org.solovyev.android.calculator_ad_free";