Final wizard step

This commit is contained in:
serso 2015-01-30 23:02:44 +01:00
parent 5a758e7acd
commit 20b408dc5c
8 changed files with 14 additions and 76 deletions

View File

@ -1,59 +1,11 @@
package org.solovyev.android.calculator.wizard;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.preferences.PurchaseDialogActivity;
import static android.content.Intent.ACTION_VIEW;
public class FinalWizardStep extends WizardFragment {
private static final String GITHUB_URL = "https://github.com/serso/android-calculatorpp";
private static final String CROWDIN_URL = "http://crowdin.net/project/calculatorpp";
private Button donateButton;
private Button translateButton;
private Button contributeButton;
@Override
protected int getViewResId() {
return R.layout.cpp_wizard_step_final;
}
@Override
public void onViewCreated(View root, Bundle savedInstanceState) {
super.onViewCreated(root, savedInstanceState);
donateButton = (Button) root.findViewById(R.id.cpp_wizard_final_donate_button);
donateButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getActivity(), PurchaseDialogActivity.class));
}
});
translateButton = (Button) root.findViewById(R.id.cpp_wizard_final_translate_button);
translateButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showUrl(CROWDIN_URL);
}
});
contributeButton = (Button) root.findViewById(R.id.cpp_wizard_final_contribute_button);
contributeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showUrl(GITHUB_URL);
}
});
}
private void showUrl(String url) {
startActivity(new Intent(ACTION_VIEW, Uri.parse(url)));
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -22,34 +22,18 @@
~ Site: http://se.solovyev.org
-->
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:orientation="vertical"
a:gravity="center">
<TextView
style="@style/WizardLabel.Last"
a:drawableTop="@drawable/ic_action_done"
a:layout_height="wrap_content"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:orientation="vertical">
<TextView a:layout_height="wrap_content"
a:layout_width="match_parent"
a:text="@string/cpp_wizard_final_free_and_opensource"/>
<TextView a:layout_height="wrap_content"
a:layout_width="match_parent"
a:layout_marginTop="10dp"
a:text="@string/cpp_wizard_final_ways_to_help"/>
<Button a:id="@+id/cpp_wizard_final_donate_button"
a:layout_height="wrap_content"
a:layout_width="match_parent"
a:text="@string/cpp_wizard_final_donate"/>
<Button a:id="@+id/cpp_wizard_final_translate_button"
a:layout_height="wrap_content"
a:layout_width="match_parent"
a:text="@string/cpp_wizard_final_translate"/>
<Button a:id="@+id/cpp_wizard_final_contribute_button"
a:layout_height="wrap_content"
a:layout_width="match_parent"
a:text="@string/cpp_wizard_final_contribute"/>
a:textAppearance="@android:style/TextAppearance.Large"
a:text="@string/cpp_wizard_final_done" />
</LinearLayout>

View File

@ -23,6 +23,7 @@
<string name="cpp_wizard_mode_title">Выберите режим</string>
<string name="cpp_wizard_onscreen_calculator_title">Калькулятор в отдельном окне</string>
<string name="cpp_wizard_dragbutton_title">Основы использования кнопок</string>
<string name="cpp_wizard_final_done">Приложение настроено и готово к использованию.</string>
<string name="cpp_wizard_final_title">Ещё чуть-чуть!</string>
<string name="cpp_wizard_final_free_and_opensource">Калькулятор++ - это бесплатное приложение с открытым исходным кодом: все функции являются бесплатными, исходный код можно найти на github.</string>
<string name="cpp_wizard_final_ways_to_help">Есть несколько способов сделать приложение лучше:</string>

View File

@ -29,6 +29,7 @@
<string name="cpp_wizard_mode_title">Choose mode</string>
<string name="cpp_wizard_onscreen_calculator_title">Calculator in a separate window</string>
<string name="cpp_wizard_dragbutton_title">Drag button basics</string>
<string name="cpp_wizard_final_done">The app is set up and ready to use.</string>
<string name="cpp_wizard_final_title">Almost done!</string>
<string name="cpp_wizard_final_free_and_opensource">Calculator++ is free and open-source: all the features are free
of charge and source code can be found on github.