Final wizard step
This commit is contained in:
parent
5a758e7acd
commit
20b408dc5c
@ -1,59 +1,11 @@
|
|||||||
package org.solovyev.android.calculator.wizard;
|
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.R;
|
||||||
import org.solovyev.android.calculator.preferences.PurchaseDialogActivity;
|
|
||||||
|
|
||||||
import static android.content.Intent.ACTION_VIEW;
|
|
||||||
|
|
||||||
public class FinalWizardStep extends WizardFragment {
|
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
|
@Override
|
||||||
protected int getViewResId() {
|
protected int getViewResId() {
|
||||||
return R.layout.cpp_wizard_step_final;
|
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)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
BIN
android-app/src/main/res/drawable-hdpi/ic_action_done.png
Normal file
BIN
android-app/src/main/res/drawable-hdpi/ic_action_done.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
android-app/src/main/res/drawable-mdpi/ic_action_done.png
Normal file
BIN
android-app/src/main/res/drawable-mdpi/ic_action_done.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
BIN
android-app/src/main/res/drawable-xhdpi/ic_action_done.png
Normal file
BIN
android-app/src/main/res/drawable-xhdpi/ic_action_done.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
android-app/src/main/res/drawable-xxhdpi/ic_action_done.png
Normal file
BIN
android-app/src/main/res/drawable-xxhdpi/ic_action_done.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -22,34 +22,18 @@
|
|||||||
~ Site: http://se.solovyev.org
|
~ Site: http://se.solovyev.org
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
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_width="match_parent"
|
||||||
a:layout_height="match_parent"
|
a:textAppearance="@android:style/TextAppearance.Large"
|
||||||
a:orientation="vertical">
|
a:text="@string/cpp_wizard_final_done" />
|
||||||
|
|
||||||
<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"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<string name="cpp_wizard_mode_title">Выберите режим</string>
|
<string name="cpp_wizard_mode_title">Выберите режим</string>
|
||||||
<string name="cpp_wizard_onscreen_calculator_title">Калькулятор в отдельном окне</string>
|
<string name="cpp_wizard_onscreen_calculator_title">Калькулятор в отдельном окне</string>
|
||||||
<string name="cpp_wizard_dragbutton_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_title">Ещё чуть-чуть!</string>
|
||||||
<string name="cpp_wizard_final_free_and_opensource">Калькулятор++ - это бесплатное приложение с открытым исходным кодом: все функции являются бесплатными, исходный код можно найти на github.</string>
|
<string name="cpp_wizard_final_free_and_opensource">Калькулятор++ - это бесплатное приложение с открытым исходным кодом: все функции являются бесплатными, исходный код можно найти на github.</string>
|
||||||
<string name="cpp_wizard_final_ways_to_help">Есть несколько способов сделать приложение лучше:</string>
|
<string name="cpp_wizard_final_ways_to_help">Есть несколько способов сделать приложение лучше:</string>
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<string name="cpp_wizard_mode_title">Choose mode</string>
|
<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_onscreen_calculator_title">Calculator in a separate window</string>
|
||||||
<string name="cpp_wizard_dragbutton_title">Drag button basics</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_title">Almost done!</string>
|
||||||
<string name="cpp_wizard_final_free_and_opensource">Calculator++ is free and open-source: all the features are free
|
<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.
|
of charge and source code can be found on github.
|
||||||
|
Loading…
Reference in New Issue
Block a user