From 7da69a20838710da065f9d28b2131e608bcbb9db Mon Sep 17 00:00:00 2001 From: serso Date: Tue, 5 Jan 2016 09:46:56 +0100 Subject: [PATCH] android-app -> app android-app-tests -> app-tests --- {android-app-tests => app-tests}/build.gradle | 2 +- .../android/AndroidNumeralBaseTest.java | 0 .../android/CalculatorTestRunner.java | 0 .../AndroidCalculatorEditorViewTest.java | 0 .../calculator/CalculatorBroadcasterTest.java | 0 .../calculator/CalculatorReceiverTest.java | 0 .../calculator/CalculatorTestUtils.java | 0 .../calculator/TextHighlighterTest.java | 0 .../calculator/history/HistoryUtilsTest.java | 0 .../android/calculator/model/VarTest.java | 0 .../plot/CalculatorGraph2dViewTest.java | 0 .../calculator/view/AngleUnitsButtonTest.java | 0 .../view/NumeralBasesButtonTest.java | 0 .../wizard/CalculatorWizardActivityTest.java | 0 .../wizard/CalculatorWizardTest.java | 0 .../OnScreenCalculatorWizardStepTest.java | 0 {android-app => app}/build.gradle | 0 .../doc/GoogleAdMobAdsSdk-4.3.1-javadocs.zip | Bin .../misc/doc/achartengine-0.7.0-javadocs.zip | Bin .../misc/libs/drag-button-1.0.aar | Bin {android-app => app}/misc/libs/plotter.aar | Bin .../misc/other/prepare_avds.sh | 0 .../misc/other/remove_avds.sh | 0 .../misc/other/take_screenshots.py | 0 .../misc/other/take_screenshots.sh | 0 .../misc/other/take_screenshots2.sh | 0 .../misc/other/wait_device.py | 0 .../res/calculatorpp/01_main_screen_port.png | Bin .../calculatorpp/01_main_screen_port_sm.png | Bin .../res/calculatorpp/02_main_screen_land.png | Bin .../03_main_screen_port_with_expression.png | Bin .../res/calculatorpp/04_plot_graph_menu.png | Bin .../calculatorpp/04_plot_graph_menu_sm.png | Bin .../misc/res/calculatorpp/05_graph_screen.png | Bin .../res/calculatorpp/05_graph_screen_sm.png | Bin .../res/calculatorpp/06_constants_screen.png | Bin .../calculatorpp/06_constants_screen_sm.png | Bin .../07_constant_create_dialog.png | Bin .../08_constants_context_menu.png | Bin .../res/calculatorpp/09_functions_screen.png | Bin .../calculatorpp/09_functions_screen_sm.png | Bin .../res/calculatorpp/10_history_screen.png | Bin .../res/calculatorpp/10_history_screen_sm.png | Bin .../11_history_item_context_menu.png | Bin .../res/calculatorpp/12_saved_history_tab.png | Bin .../13_saved_history_item_context_menu.png | Bin .../misc/res/calculatorpp/14_about_screen.png | Bin .../res/calculatorpp/14_about_screen_sm.png | Bin .../res/calculatorpp/15_release_notes_tab.png | Bin .../misc/res/calculatorpp/16_help_screen.png | Bin .../res/calculatorpp/16_help_screen_sm.png | Bin .../misc/res/calculatorpp/17_hints_tab.png | Bin .../misc/res/calculatorpp/18_preferences.png | Bin .../res/calculatorpp/18_preferences_02.png | Bin .../res/calculatorpp/18_preferences_03.png | Bin .../res/calculatorpp/18_preferences_sm.png | Bin .../misc/res/calculatorpp/plan.png | Bin .../misc/res/calculatorpp/plan.xcf | Bin .../misc/res/description/description-de.txt | 0 .../res/description/description-es-ES.txt | 0 .../misc/res/description/description-fr.txt | 0 .../misc/res/description/description-it.txt | 0 .../misc/res/description/description-pl.txt | 0 .../res/description/description-pt-BR.txt | 0 .../misc/res/description/description-ru.txt | 0 .../res/description/description-short-ru.txt | 0 .../res/description/description-short.txt | 0 .../misc/res/description/description-tr.txt | 0 .../misc/res/description/description-vi.txt | 0 .../res/description/description-zh-CN.txt | 0 .../res/description/description-zh-TW.txt | 0 .../misc/res/description/description.txt | 0 {android-app => app}/misc/res/icon-green.png | Bin {android-app => app}/misc/res/icon-hi-res.png | Bin {android-app => app}/misc/res/icon-promo.png | Bin {android-app => app}/misc/res/icon.png | Bin {android-app => app}/misc/res/icon144.png | Bin {android-app => app}/misc/res/icon48.png | Bin {android-app => app}/misc/res/icon512.png | Bin {android-app => app}/misc/res/icon72.png | Bin {android-app => app}/misc/res/icon96.png | Bin .../misc/res/icon_onscreen144.png | Bin .../misc/res/icon_onscreen48.png | Bin .../misc/res/icon_onscreen512.png | Bin .../misc/res/icon_onscreen72.png | Bin .../misc/res/icon_onscreen96.png | Bin {android-app => app}/misc/res/kb_facebook.png | Bin .../misc/res/kb_facebook_icon.png | Bin {android-app => app}/misc/res/logo-admob.png | Bin {android-app => app}/misc/res/logo-scaled.png | Bin {android-app => app}/misc/res/logo-small.png | Bin {android-app => app}/misc/res/logo.cdr | Bin {android-app => app}/misc/res/logo.png | Bin {android-app => app}/misc/res/widget.png | Bin .../misc/res/work/Backup_of_logo.cdr | Bin {android-app => app}/misc/res/work/header.png | Bin .../misc/res/work/header_bg.png | Bin .../misc/res/work/header_sm.png | Bin .../misc/res/work/heart_original.png | Bin {android-app => app}/misc/res/work/icon.png | Bin .../misc/res/work/icon_favicon_light_blue.ico | Bin .../misc/res/work/icon_favicon_light_blue.png | Bin .../misc/res/work/icon_favicon_purple.ico | Bin .../misc/res/work/icon_small.png | Bin {android-app => app}/misc/res/work/log11o.psd | Bin {android-app => app}/misc/res/work/logo.cdr | Bin {android-app => app}/misc/res/work/logo.png | Bin .../misc/res/work/logoFULL copy.png | Bin .../misc/res/work/logoFULL.pdf | Bin .../misc/res/work/logoFULL.png | Bin .../misc/res/work/logoFULL_banner.png | Bin .../misc/res/work/logoFULL_small.png | Bin .../misc/res/work/logo_black.png | Bin .../misc/res/work/logo_blue.png | Bin .../misc/res/work/logo_light_blue.png | Bin .../misc/res/work/logo_purple.png | Bin .../misc/res/work/promo_logo.png | Bin .../misc/res/work/text_logo.png | Bin .../misc/res/work/text_logo_blue.png | Bin .../misc/res/work/text_logo_light_blue.png | Bin .../work/text_logo_light_blue_cpp_forum.png | Bin .../misc/res/work/text_logo_purple.png | Bin .../misc/src/achartengine-0.7.0.jar | Bin {android-app => app}/misc/src/bsh.jar | Bin {android-app => app}/proguard-debug.cfg | 0 {android-app => app}/proguard.cfg | 0 {android-app => app}/project.properties | 0 .../src/main/AndroidManifest.xml | 0 .../src/main/assets/fonts/Roboto-Regular.ttf | Bin .../CirclePageIndicator.java | 0 .../com/viewpagerindicator/PageIndicator.java | 0 .../main/java/org/solovyev/android/Check.java | 0 .../AbstractCalculatorMathRegistry.java | 0 .../calculator/AbstractFixableError.java | 0 .../calculator/AbstractNumberBuilder.java | 0 .../android/calculator/ActivityUi.java | 0 .../solovyev/android/calculator/AdView.java | 0 .../android/calculator/AndroidCalculator.java | 0 .../AndroidCalculatorClipboard.java | 0 .../AndroidCalculatorDisplayView.java | 0 .../AndroidCalculatorEditorView.java | 0 .../calculator/AndroidCalculatorKeyboard.java | 0 .../calculator/AndroidCalculatorLogger.java | 0 .../calculator/AndroidCalculatorNotifier.java | 0 .../AndroidCalculatorPreferenceService.java | 0 .../calculator/AndroidFunctionCategory.java | 0 .../calculator/AndroidNumeralBase.java | 0 .../calculator/AndroidOperatorCategory.java | 0 .../calculator/AndroidVarCategory.java | 0 .../org/solovyev/android/calculator/App.java | 0 .../android/calculator/BaseActivity.java | 0 .../solovyev/android/calculator/BaseUi.java | 0 .../calculator/ButtonOnClickListener.java | 0 .../android/calculator/Calculator.java | 0 .../calculator/CalculatorActivity.java | 0 .../CalculatorActivityLauncher.java | 0 .../calculator/CalculatorActivityMobile.java | 0 .../calculator/CalculatorApplication.java | 0 .../calculator/CalculatorBroadcaster.java | 0 .../android/calculator/CalculatorButton.java | 0 .../android/calculator/CalculatorButtons.java | 0 .../calculator/CalculatorClipboard.java | 0 .../CalculatorConversionEventData.java | 0 .../CalculatorConversionEventDataImpl.java | 0 .../calculator/CalculatorDialogActivity.java | 0 .../android/calculator/CalculatorDisplay.java | 0 .../CalculatorDisplayChangeEventData.java | 0 .../CalculatorDisplayChangeEventDataImpl.java | 0 .../calculator/CalculatorDisplayFragment.java | 0 .../calculator/CalculatorDisplayImpl.java | 0 .../calculator/CalculatorDisplayMenuItem.java | 0 .../CalculatorDisplayOnClickListener.java | 0 .../calculator/CalculatorDisplayView.java | 0 .../CalculatorDisplayViewState.java | 0 .../CalculatorDisplayViewStateImpl.java | 0 .../android/calculator/CalculatorEditor.java | 0 .../CalculatorEditorChangeEventData.java | 0 .../calculator/CalculatorEditorFragment.java | 0 .../calculator/CalculatorEditorImpl.java | 0 .../calculator/CalculatorEditorView.java | 0 .../calculator/CalculatorEditorViewState.java | 0 .../CalculatorEditorViewStateImpl.java | 0 .../android/calculator/CalculatorEngine.java | 0 .../calculator/CalculatorEngineControl.java | 0 .../calculator/CalculatorEngineImpl.java | 0 .../calculator/CalculatorEvalException.java | 0 .../CalculatorEvaluationEventData.java | 0 .../CalculatorEvaluationEventDataImpl.java | 0 .../calculator/CalculatorEventContainer.java | 0 .../calculator/CalculatorEventData.java | 0 .../calculator/CalculatorEventDataImpl.java | 0 .../calculator/CalculatorEventHolder.java | 0 .../calculator/CalculatorEventListener.java | 0 .../calculator/CalculatorEventType.java | 0 .../android/calculator/CalculatorFailure.java | 0 .../calculator/CalculatorFailureImpl.java | 0 .../calculator/CalculatorFixableError.java | 0 .../calculator/CalculatorFragment.java | 0 .../calculator/CalculatorFragmentType.java | 216 ++--- .../CalculatorFunctionsMathRegistry.java | 0 .../android/calculator/CalculatorImpl.java | 0 .../android/calculator/CalculatorInput.java | 0 .../calculator/CalculatorInputImpl.java | 0 .../calculator/CalculatorKeyboard.java | 0 .../CalculatorKeyboardFragment.java | 0 .../calculator/CalculatorKeyboardImpl.java | 0 .../calculator/CalculatorListFragment.java | 218 ++--- .../android/calculator/CalculatorLocator.java | 0 .../android/calculator/CalculatorLogger.java | 0 .../calculator/CalculatorMathEngine.java | 0 .../calculator/CalculatorMathRegistry.java | 0 .../android/calculator/CalculatorMenu.java | 198 ++--- .../android/calculator/CalculatorMessage.java | 0 .../calculator/CalculatorMessages.java | 0 .../calculator/CalculatorNotifier.java | 0 .../CalculatorOperatorsMathRegistry.java | 0 .../android/calculator/CalculatorOutput.java | 0 .../calculator/CalculatorOutputImpl.java | 0 .../calculator/CalculatorParseException.java | 0 .../CalculatorPostfixFunctionsRegistry.java | 0 .../CalculatorPreferenceService.java | 0 .../calculator/CalculatorReceiver.java | 0 .../calculator/CalculatorSecurity.java | 0 .../calculator/CalculatorSpecialButton.java | 0 .../android/calculator/CalculatorUtils.java | 0 .../calculator/CalculatorVarsRegistry.java | 0 .../solovyev/android/calculator/Change.java | 0 .../android/calculator/ChangeImpl.java | 0 .../calculator/CharacterAtPositionFinder.java | 0 .../android/calculator/ConversionFailure.java | 0 .../calculator/ConversionFailureImpl.java | 0 .../calculator/ConversionMenuItem.java | 0 .../calculator/CursorDragProcessor.java | 0 .../android/calculator/DialogData.java | 0 .../calculator/DigitButtonDragProcessor.java | 0 .../calculator/DummyCalculatorClipboard.java | 0 .../calculator/DummyCalculatorNotifier.java | 0 .../solovyev/android/calculator/Editor.java | 0 .../android/calculator/EmptyActivity.java | 0 .../calculator/EqualsDragProcessor.java | 0 .../android/calculator/FixableError.java | 0 .../android/calculator/FixableMessage.java | 0 .../calculator/FixableMessagesDialog.java | 0 .../android/calculator/FragmentUi.java | 0 .../android/calculator/FunctionCategory.java | 0 .../ListCalculatorEventContainer.java | 0 .../android/calculator/LiteNumberBuilder.java | 0 .../solovyev/android/calculator/Locator.java | 0 .../android/calculator/MathEntityDao.java | 0 .../MathEntityPersistenceContainer.java | 0 .../calculator/MathPersistenceEntity.java | 0 .../android/calculator/MessageDialogData.java | 0 .../android/calculator/NumberBuilder.java | 0 .../calculator/NumeralBaseButtons.java | 0 .../android/calculator/OperatorCategory.java | 0 .../calculator/ParcelableDialogData.java | 0 .../android/calculator/Preferences.java | 0 .../calculator/PreparedExpression.java | 0 .../android/calculator/StringDialogData.java | 0 .../calculator/SystemOutCalculatorLogger.java | 0 .../calculator/ToJsclTextProcessor.java | 0 .../android/calculator/VarCategory.java | 0 .../solovyev/android/calculator/Vibrator.java | 0 .../about/CalculatorAboutActivity.java | 94 +- .../about/CalculatorAboutFragment.java | 138 +-- .../about/CalculatorReleaseNotesFragment.java | 112 +-- .../android/calculator/about/TextHelper.java | 0 .../function/FunctionBuilderAdapter.java | 0 .../function/FunctionEditDialogFragment.java | 0 .../function/FunctionEditorSaver.java | 332 +++---- .../function/FunctionParamEditText.java | 112 +-- .../function/FunctionParamsView.java | 430 ++++----- .../solovyev/android/calculator/ga/Ga.java | 0 .../history/AbstractHistoryState.java | 0 .../history/AndroidCalculatorHistory.java | 350 ++++---- .../history/BaseHistoryFragment.java | 0 .../CalculatorDisplayHistoryState.java | 0 .../calculator/history/CalculatorHistory.java | 0 .../history/CalculatorHistoryActivity.java | 118 +-- .../history/CalculatorHistoryImpl.java | 0 .../history/CalculatorHistoryState.java | 0 .../history/EditorHistoryState.java | 0 .../android/calculator/history/History.java | 0 .../history/HistoryArrayAdapter.java | 0 .../history/HistoryDragProcessor.java | 0 .../calculator/history/HistoryFragment.java | 0 .../history/HistoryItemMenuData.java | 0 .../history/HistoryItemMenuItem.java | 336 +++---- .../calculator/history/HistoryUtils.java | 0 .../history/SavedHistoryFragment.java | 0 .../history/TextViewEditorAdapter.java | 136 +-- .../jscl/FromJsclNumericTextProcessor.java | 0 .../calculator/jscl/JsclOperation.java | 0 .../android/calculator/language/Language.java | 0 .../calculator/language/Languages.java | 0 .../android/calculator/math/MathType.java | 0 .../edit/AbstractMathEntityListFragment.java | 702 +++++++-------- .../edit/CalculatorFunctionsActivity.java | 0 .../edit/CalculatorFunctionsFragment.java | 560 ++++++------ .../edit/CalculatorOperatorsActivity.java | 0 .../edit/CalculatorOperatorsFragment.java | 316 +++---- .../math/edit/CalculatorVarsActivity.java | 0 .../math/edit/CalculatorVarsFragment.java | 588 ++++++------ .../math/edit/MathEntityRemover.java | 0 .../math/edit/VarEditDialogFragment.java | 680 +++++++------- .../calculator/math/edit/VarEditorSaver.java | 320 +++---- .../matrix/CalculatorMatrixActivity.java | 94 +- .../matrix/CalculatorMatrixEditFragment.java | 294 +++--- .../android/calculator/matrix/MatrixUi.java | 0 .../android/calculator/matrix/MatrixView.java | 624 ++++++------- .../android/calculator/model/AFunction.java | 0 .../model/AndroidCalculatorEngine.java | 0 .../model/AndroidMathEntityDao.java | 0 .../android/calculator/model/Functions.java | 0 .../calculator/model/MathEntityBuilder.java | 0 .../android/calculator/model/Var.java | 0 .../android/calculator/model/Vars.java | 0 .../CalculatorOnscreenBroadcastReceiver.java | 0 .../onscreen/CalculatorOnscreenService.java | 0 .../CalculatorOnscreenStartActivity.java | 0 .../onscreen/CalculatorOnscreenView.java | 0 .../onscreen/CalculatorOnscreenViewState.java | 0 .../onscreen/OnscreenViewListener.java | 0 .../plot/AbstractCalculatorPlotFragment.java | 0 .../plot/AbstractGraphCalculator.java | 0 .../plot/AndroidCalculatorPlotter.java | 0 .../calculator/plot/AndroidPlotLineStyle.java | 0 .../plot/CalculatorGraph2dView.java | 0 .../plot/CalculatorGraph3dView.java | 0 .../plot/CalculatorPlotActivity.java | 0 .../plot/CalculatorPlotFragment.java | 0 ...alculatorPlotFunctionSettingsActivity.java | 390 ++++---- .../plot/CalculatorPlotFunctionsActivity.java | 0 .../plot/CalculatorPlotRangeActivity.java | 0 .../calculator/plot/CalculatorPlotter.java | 0 .../plot/CalculatorPlotterImpl.java | 0 .../calculator/plot/FunctionEvaluator.java | 0 .../android/calculator/plot/GLText.java | 836 +++++++++--------- .../android/calculator/plot/GLView.java | 0 .../calculator/plot/Graph2dDimensions.java | 0 .../android/calculator/plot/Graph3d.java | 0 .../calculator/plot/GraphCalculator.java | 0 .../calculator/plot/GraphCalculatorImpl.java | 0 .../android/calculator/plot/GraphData.java | 0 .../android/calculator/plot/GraphView.java | 0 .../calculator/plot/GraphViewHelper.java | 0 .../android/calculator/plot/GraphsData.java | 0 .../plot/MapPlotResourceManager.java | 0 .../calculator/plot/PlotBoundaries.java | 0 .../android/calculator/plot/PlotData.java | 0 .../android/calculator/plot/PlotFunction.java | 0 .../calculator/plot/PlotFunctionListItem.java | 304 +++---- .../calculator/plot/PlotLineColor.java | 0 .../calculator/plot/PlotLineColorType.java | 0 .../android/calculator/plot/PlotLineDef.java | 0 .../calculator/plot/PlotLineStyle.java | 0 .../calculator/plot/PlotResourceManager.java | 0 .../android/calculator/plot/PlotUtils.java | 0 .../android/calculator/plot/PlotViewDef.java | 0 .../calculator/plot/PlotterFragment.java | 0 .../android/calculator/plot/SpriteBatch.java | 286 +++--- .../calculator/plot/TexampleRenderer.java | 222 ++--- .../calculator/plot/TextureRegion.java | 84 +- .../android/calculator/plot/TouchHandler.java | 0 .../android/calculator/plot/Vertices.java | 564 ++++++------ .../android/calculator/plot/XyFunction.java | 0 .../android/calculator/plot/ZoomTracker.java | 0 .../preferences/PreferencesActivity.java | 0 .../preferences/PreferencesFragment.java | 0 .../preferences/PurchaseDialogActivity.java | 0 .../ChooseThemeReleaseNoteFragment.java | 0 .../release/ChooseThemeReleaseNoteStep.java | 0 .../release/ReleaseNoteFragment.java | 0 .../calculator/release/ReleaseNoteStep.java | 0 .../calculator/release/ReleaseNotes.java | 0 .../calculator/text/DummyTextProcessor.java | 0 .../text/FromJsclSimplifyTextProcessor.java | 0 .../calculator/text/TextProcessor.java | 0 .../text/TextProcessorEditorResult.java | 0 .../units/CalculatorNumeralBase.java | 0 .../calculator/view/AngleUnitsButton.java | 0 .../view/CalculatorAdditionalTitle.java | 0 .../calculator/view/DragListenerVibrator.java | 0 .../calculator/view/EditorTextProcessor.java | 0 .../calculator/view/LongClickEraser.java | 0 .../view/NumeralBaseConverterDialog.java | 0 .../calculator/view/NumeralBasesButton.java | 0 .../calculator/view/ScreenMetrics.java | 0 .../calculator/view/TextHighlighter.java | 0 .../view/UnitConverterViewBuilder.java | 0 .../android/calculator/view/ViewsCache.java | 0 .../widget/BaseCalculatorWidgetProvider.java | 0 .../calculator/widget/CalculatorWidget.java | 0 ...CalculatorWidgetConfigurationActivity.java | 0 .../widget/CalculatorWidgetProvider.java | 0 .../widget/CalculatorWidgetProvider3x4.java | 0 .../widget/CalculatorWidgetProvider4x4.java | 0 .../widget/CalculatorWidgetProvider4x5.java | 0 .../calculator/wizard/CalculatorLayout.java | 0 .../calculator/wizard/CalculatorMode.java | 0 .../wizard/CalculatorWizardStep.java | 0 .../calculator/wizard/CalculatorWizards.java | 0 .../wizard/ChooseLayoutWizardStep.java | 0 .../wizard/ChooseModeWizardStep.java | 0 .../wizard/ChooseThemeWizardStep.java | 0 .../wizard/DragButtonWizardStep.java | 0 .../calculator/wizard/FinalWizardStep.java | 0 .../wizard/OnScreenCalculatorWizardStep.java | 0 .../calculator/wizard/WelcomeWizardStep.java | 0 .../calculator/wizard/WizardActivity.java | 0 .../calculator/wizard/WizardArrayAdapter.java | 0 .../calculator/wizard/WizardFragment.java | 0 .../android/fragments/FragmentUtils.java | 236 ++--- .../android/sherlock/FragmentItem.java | 0 .../android/sherlock/FragmentItemImpl.java | 0 .../tabs/ActionBarFragmentTabListener.java | 0 .../solovyev/android/wizard/BaseWizard.java | 0 .../android/wizard/ListWizardFlow.java | 0 .../org/solovyev/android/wizard/Wizard.java | 0 .../solovyev/android/wizard/WizardFlow.java | 0 .../solovyev/android/wizard/WizardStep.java | 0 .../org/solovyev/android/wizard/WizardUi.java | 0 .../org/solovyev/android/wizard/Wizards.java | 0 .../solovyev/android/wizard/WizardsAware.java | 0 .../res/color/cpp_wizard_button_selector.xml | 0 .../cpp_wizard_button_selector_light.xml | 0 .../res/color/primary_button_selector.xml | 0 .../src/main/res/drawable-hdpi/ab_clock.png | Bin .../src/main/res/drawable-hdpi/ab_disk.png | Bin .../src/main/res/drawable-hdpi/ab_expand.png | Bin .../main/res/drawable-hdpi/ab_functions.png | Bin .../src/main/res/drawable-hdpi/ab_logo.png | Bin .../src/main/res/drawable-hdpi/ab_range.png | Bin .../main/res/drawable-hdpi/ab_settings.png | Bin .../src/main/res/drawable-hdpi/ab_stats.png | Bin .../main/res/drawable-hdpi/ab_stats_3d.png | Bin .../main/res/drawable-hdpi/ic_action_done.png | Bin .../drawable-hdpi/ic_action_done_light.png | Bin .../res/drawable-hdpi/ic_add_white_36dp.png | Bin .../drawable-hdpi/ic_delete_white_36dp.png | Bin .../main/res/drawable-hdpi/ic_launcher.png | Bin .../res/drawable-hdpi/ic_launcher_window.png | Bin .../drawable-hdpi/ic_save_grey600_48dp.png | Bin .../src/main/res/drawable-hdpi/kb_copy.png | Bin .../src/main/res/drawable-hdpi/kb_erase.png | Bin .../src/main/res/drawable-hdpi/kb_logo.png | Bin .../src/main/res/drawable-hdpi/kb_paste.png | Bin .../main/res/drawable-hdpi/kb_settings.png | Bin .../src/main/res/drawable-hdpi/kb_share.png | Bin .../layout_big_buttons.png | Bin .../drawable-land-xhdpi/layout_optimized.png | Bin .../src/main/res/drawable-ldpi/.emptyfolder | 0 .../src/main/res/drawable-mdpi/ab_clock.png | Bin .../src/main/res/drawable-mdpi/ab_disk.png | Bin .../src/main/res/drawable-mdpi/ab_expand.png | Bin .../main/res/drawable-mdpi/ab_functions.png | Bin .../src/main/res/drawable-mdpi/ab_logo.png | Bin .../src/main/res/drawable-mdpi/ab_range.png | Bin .../main/res/drawable-mdpi/ab_settings.png | Bin .../src/main/res/drawable-mdpi/ab_stats.png | Bin .../main/res/drawable-mdpi/ab_stats_3d.png | Bin .../main/res/drawable-mdpi/ic_action_done.png | Bin .../drawable-mdpi/ic_action_done_light.png | Bin .../res/drawable-mdpi/ic_add_white_36dp.png | Bin .../drawable-mdpi/ic_delete_white_36dp.png | Bin .../main/res/drawable-mdpi/ic_launcher.png | Bin .../res/drawable-mdpi/ic_launcher_window.png | Bin .../drawable-mdpi/ic_save_grey600_48dp.png | Bin .../src/main/res/drawable-mdpi/kb_copy.png | Bin .../src/main/res/drawable-mdpi/kb_erase.png | Bin .../src/main/res/drawable-mdpi/kb_logo.png | Bin .../src/main/res/drawable-mdpi/kb_paste.png | Bin .../main/res/drawable-mdpi/kb_settings.png | Bin .../src/main/res/drawable-mdpi/kb_share.png | Bin .../cpp_onscreen_button_close.png | Bin .../cpp_onscreen_button_fold.png | Bin .../cpp_onscreen_button_minimize.png | Bin .../cpp_onscreen_header_logo.png | Bin .../cpp_onscreen_header_logo_light.png | Bin .../res/drawable-nodpi/tablet_big_buttons.png | Bin .../res/drawable-nodpi/tablet_optimized.png | Bin .../res/drawable-nodpi/widget_preview.png | Bin .../main/res/drawable-v21/button_no_bg.xml | 0 .../cpp_wizard_button_selector.xml | 0 .../res/drawable-v21/material_blue_button.xml | 0 .../res/drawable-v21/material_button_dark.xml | 0 .../drawable-v21/material_button_light.xml | 0 .../material_button_light_primary.xml | 0 .../res/drawable-v21/metro_blue_button.xml | 0 .../res/drawable-v21/metro_button_dark.xml | 0 .../res/drawable-v21/metro_button_green.xml | 0 .../res/drawable-v21/metro_button_light.xml | 0 .../res/drawable-v21/metro_button_purple.xml | 0 .../res/drawable-v21/metro_widget_button.xml | 0 .../drawable-v21/metro_widget_button_dark.xml | 0 .../metro_widget_button_light.xml | 0 .../src/main/res/drawable-xhdpi/ab_clock.png | Bin .../src/main/res/drawable-xhdpi/ab_disk.png | Bin .../src/main/res/drawable-xhdpi/ab_expand.png | Bin .../main/res/drawable-xhdpi/ab_functions.png | Bin .../src/main/res/drawable-xhdpi/ab_logo.png | Bin .../src/main/res/drawable-xhdpi/ab_range.png | Bin .../main/res/drawable-xhdpi/ab_settings.png | Bin .../src/main/res/drawable-xhdpi/ab_stats.png | Bin .../main/res/drawable-xhdpi/ab_stats_3d.png | Bin .../res/drawable-xhdpi/ic_action_done.png | Bin .../drawable-xhdpi/ic_action_done_light.png | Bin .../res/drawable-xhdpi/ic_add_white_36dp.png | Bin .../drawable-xhdpi/ic_delete_white_36dp.png | Bin .../main/res/drawable-xhdpi/ic_launcher.png | Bin .../res/drawable-xhdpi/ic_launcher_window.png | Bin .../drawable-xhdpi/ic_save_grey600_48dp.png | Bin .../src/main/res/drawable-xhdpi/kb_copy.png | Bin .../src/main/res/drawable-xhdpi/kb_erase.png | Bin .../src/main/res/drawable-xhdpi/kb_logo.png | Bin .../src/main/res/drawable-xhdpi/kb_paste.png | Bin .../main/res/drawable-xhdpi/kb_settings.png | Bin .../src/main/res/drawable-xhdpi/kb_share.png | Bin .../res/drawable-xhdpi/layout_big_buttons.png | Bin .../res/drawable-xhdpi/layout_optimized.png | Bin .../src/main/res/drawable-xxhdpi/ab_clock.png | Bin .../src/main/res/drawable-xxhdpi/ab_disk.png | Bin .../main/res/drawable-xxhdpi/ab_expand.png | Bin .../main/res/drawable-xxhdpi/ab_functions.png | Bin .../src/main/res/drawable-xxhdpi/ab_logo.png | Bin .../src/main/res/drawable-xxhdpi/ab_range.png | Bin .../main/res/drawable-xxhdpi/ab_settings.png | Bin .../src/main/res/drawable-xxhdpi/ab_stats.png | Bin .../main/res/drawable-xxhdpi/ab_stats_3d.png | Bin .../res/drawable-xxhdpi/ic_action_done.png | Bin .../drawable-xxhdpi/ic_action_done_light.png | Bin .../res/drawable-xxhdpi/ic_add_white_36dp.png | Bin .../drawable-xxhdpi/ic_delete_white_36dp.png | Bin .../main/res/drawable-xxhdpi/ic_launcher.png | Bin .../drawable-xxhdpi/ic_launcher_window.png | Bin .../drawable-xxhdpi/ic_save_grey600_48dp.png | Bin .../main/res/drawable-xxhdpi/logo_wizard.png | Bin .../res/drawable-xxhdpi/logo_wizard_light.png | Bin .../drawable-xxhdpi/logo_wizard_window.png | Bin .../logo_wizard_window_light.png | Bin .../src/main/res/drawable-xxxhdpi/ab_logo.png | Bin .../main/res/drawable-xxxhdpi/ic_launcher.png | Bin .../drawable-xxxhdpi/ic_launcher_window.png | Bin .../src/main/res/drawable/blue_button.xml | 0 .../main/res/drawable/blue_button_dark.xml | 0 .../res/drawable/blue_button_dark_shape.xml | 0 .../main/res/drawable/blue_button_shape.xml | 0 .../src/main/res/drawable/button_no_bg.xml | 0 .../res/drawable/button_no_bg_pressed.xml | 0 .../drawable/cpp_wizard_button_selector.xml | 0 .../cpp_wizard_button_shape_normal.xml | 0 .../cpp_wizard_button_shape_pressed.xml | 0 .../src/main/res/drawable/gray_button.xml | 0 .../main/res/drawable/gray_button_dark.xml | 0 .../res/drawable/gray_button_dark_shape.xml | 0 .../main/res/drawable/gray_button_shape.xml | 0 .../res/drawable/material_blue_button.xml | 0 .../res/drawable/material_button_dark.xml | 0 .../res/drawable/material_button_light.xml | 0 .../material_button_light_primary.xml | 0 .../res/drawable/material_button_pressed.xml | 0 .../main/res/drawable/metro_blue_button.xml | 0 .../res/drawable/metro_blue_button_shape.xml | 0 .../main/res/drawable/metro_button_dark.xml | 0 .../res/drawable/metro_button_dark_shape.xml | 0 .../main/res/drawable/metro_button_green.xml | 0 .../res/drawable/metro_button_green_shape.xml | 0 .../main/res/drawable/metro_button_light.xml | 0 .../res/drawable/metro_button_light_shape.xml | 0 .../res/drawable/metro_button_pressed.xml | 0 .../main/res/drawable/metro_button_purple.xml | 0 .../drawable/metro_button_purple_shape.xml | 0 .../main/res/drawable/metro_widget_button.xml | 0 .../res/drawable/metro_widget_button_dark.xml | 0 .../drawable/metro_widget_button_light.xml | 0 .../src/main/res/drawable/pane.xml | 0 .../src/main/res/drawable/pane_light.xml | 0 .../src/main/res/drawable/violet_button.xml | 0 .../main/res/drawable/violet_button_dark.xml | 0 .../res/drawable/violet_button_dark_shape.xml | 0 .../main/res/drawable/violet_button_shape.xml | 0 .../main/res/layout-land/cpp_app_keyboard.xml | 0 .../layout-land/cpp_app_keyboard_mobile.xml | 0 .../main/res/layout-land/main_calculator.xml | 0 .../layout-land/main_calculator_mobile.xml | 0 .../main/res/layout-land/main_first_pane.xml | 0 .../layout-land/main_first_pane_mobile.xml | 0 .../layout-large-land/cpp_app_keyboard.xml | 0 .../res/layout-large-land/main_calculator.xml | 0 .../main/res/layout-large/cpp_app_display.xml | 0 .../main/res/layout-large/cpp_app_editor.xml | 0 .../res/layout-large/cpp_app_keyboard.xml | 0 .../main/res/layout-large/main_calculator.xml | 0 .../layout-xlarge-land/cpp_app_keyboard.xml | 0 .../layout-xlarge-land/main_calculator.xml | 0 .../res/layout-xlarge/cpp_app_display.xml | 0 .../main/res/layout-xlarge/cpp_app_editor.xml | 0 .../res/layout-xlarge/cpp_app_keyboard.xml | 0 .../res/layout-xlarge/main_calculator.xml | 0 .../src/main/res/layout/about_fragment.xml | 0 .../src/main/res/layout/ad.xml | 0 .../src/main/res/layout/admob.xml | 0 .../main/res/layout/cpp_activity_wizard.xml | 0 .../src/main/res/layout/cpp_app_button_0.xml | 0 .../src/main/res/layout/cpp_app_button_1.xml | 0 .../src/main/res/layout/cpp_app_button_2.xml | 0 .../src/main/res/layout/cpp_app_button_3.xml | 0 .../src/main/res/layout/cpp_app_button_4.xml | 0 .../src/main/res/layout/cpp_app_button_5.xml | 0 .../src/main/res/layout/cpp_app_button_6.xml | 0 .../src/main/res/layout/cpp_app_button_7.xml | 0 .../src/main/res/layout/cpp_app_button_8.xml | 0 .../src/main/res/layout/cpp_app_button_9.xml | 0 .../main/res/layout/cpp_app_button_clear.xml | 0 .../main/res/layout/cpp_app_button_copy.xml | 0 .../res/layout/cpp_app_button_division.xml | 0 .../main/res/layout/cpp_app_button_donate.xml | 0 .../main/res/layout/cpp_app_button_dot.xml | 0 .../main/res/layout/cpp_app_button_empty.xml | 0 .../main/res/layout/cpp_app_button_equals.xml | 0 .../layout/cpp_app_button_equals_no_bg.xml | 0 .../main/res/layout/cpp_app_button_erase.xml | 0 .../res/layout/cpp_app_button_functions.xml | 0 .../res/layout/cpp_app_button_history.xml | 0 .../main/res/layout/cpp_app_button_left.xml | 0 .../main/res/layout/cpp_app_button_minus.xml | 0 .../layout/cpp_app_button_multiplication.xml | 0 .../res/layout/cpp_app_button_operators.xml | 0 .../main/res/layout/cpp_app_button_paste.xml | 0 .../main/res/layout/cpp_app_button_plus.xml | 0 .../main/res/layout/cpp_app_button_right.xml | 0 .../layout/cpp_app_button_round_brackets.xml | 0 .../main/res/layout/cpp_app_button_vars.xml | 0 .../src/main/res/layout/cpp_app_display.xml | 0 .../res/layout/cpp_app_display_mobile.xml | 0 .../src/main/res/layout/cpp_app_editor.xml | 0 .../main/res/layout/cpp_app_editor_mobile.xml | 0 .../src/main/res/layout/cpp_app_keyboard.xml | 0 .../res/layout/cpp_app_keyboard_mobile.xml | 0 .../src/main/res/layout/cpp_dialog.xml | 0 .../main/res/layout/cpp_dialog_fragment.xml | 0 .../layout/cpp_fixable_messages_dialog.xml | 0 .../cpp_fixable_messages_dialog_message.xml | 0 .../src/main/res/layout/cpp_plot_fragment.xml | 0 .../layout/cpp_plot_function_list_item.xml | 0 .../cpp_plot_function_settings_dialog.xml | 0 .../cpp_plot_function_settings_fragment.xml | 0 .../layout/cpp_plot_functions_fragment.xml | 0 .../res/layout/cpp_plot_range_fragment.xml | 0 .../main/res/layout/cpp_plotter_fragment.xml | 0 .../layout/cpp_purchase_dialog_fragment.xml | 0 .../main/res/layout/cpp_release_note_step.xml | 0 .../main/res/layout/cpp_simple_button_0.xml | 0 .../layout/cpp_simple_button_0_material.xml | 0 .../cpp_simple_button_0_material_light.xml | 0 .../main/res/layout/cpp_simple_button_1.xml | 0 .../layout/cpp_simple_button_1_material.xml | 0 .../cpp_simple_button_1_material_light.xml | 0 .../main/res/layout/cpp_simple_button_2.xml | 0 .../layout/cpp_simple_button_2_material.xml | 0 .../cpp_simple_button_2_material_light.xml | 0 .../main/res/layout/cpp_simple_button_3.xml | 0 .../layout/cpp_simple_button_3_material.xml | 0 .../cpp_simple_button_3_material_light.xml | 0 .../main/res/layout/cpp_simple_button_4.xml | 0 .../layout/cpp_simple_button_4_material.xml | 0 .../cpp_simple_button_4_material_light.xml | 0 .../main/res/layout/cpp_simple_button_5.xml | 0 .../layout/cpp_simple_button_5_material.xml | 0 .../cpp_simple_button_5_material_light.xml | 0 .../main/res/layout/cpp_simple_button_6.xml | 0 .../layout/cpp_simple_button_6_material.xml | 0 .../cpp_simple_button_6_material_light.xml | 0 .../main/res/layout/cpp_simple_button_7.xml | 0 .../layout/cpp_simple_button_7_material.xml | 0 .../cpp_simple_button_7_material_light.xml | 0 .../main/res/layout/cpp_simple_button_8.xml | 0 .../layout/cpp_simple_button_8_material.xml | 0 .../cpp_simple_button_8_material_light.xml | 0 .../main/res/layout/cpp_simple_button_9.xml | 0 .../layout/cpp_simple_button_9_material.xml | 0 .../cpp_simple_button_9_material_light.xml | 0 .../main/res/layout/cpp_simple_button_app.xml | 0 .../layout/cpp_simple_button_app_material.xml | 0 .../cpp_simple_button_app_material_light.xml | 0 .../res/layout/cpp_simple_button_clear.xml | 0 .../cpp_simple_button_clear_material.xml | 0 ...cpp_simple_button_clear_material_light.xml | 0 .../res/layout/cpp_simple_button_copy.xml | 0 .../cpp_simple_button_copy_material.xml | 0 .../cpp_simple_button_copy_material_light.xml | 0 .../res/layout/cpp_simple_button_division.xml | 0 .../cpp_simple_button_division_material.xml | 0 ..._simple_button_division_material_light.xml | 0 .../main/res/layout/cpp_simple_button_dot.xml | 0 .../layout/cpp_simple_button_dot_material.xml | 0 .../cpp_simple_button_dot_material_light.xml | 0 .../res/layout/cpp_simple_button_equals.xml | 0 .../cpp_simple_button_equals_material.xml | 0 ...pp_simple_button_equals_material_light.xml | 0 .../res/layout/cpp_simple_button_erase.xml | 0 .../cpp_simple_button_erase_material.xml | 0 ...cpp_simple_button_erase_material_light.xml | 0 .../layout/cpp_simple_button_functions.xml | 0 .../cpp_simple_button_functions_material.xml | 0 ...simple_button_functions_material_light.xml | 0 .../res/layout/cpp_simple_button_history.xml | 0 .../cpp_simple_button_history_material.xml | 0 ...p_simple_button_history_material_light.xml | 0 .../res/layout/cpp_simple_button_left.xml | 0 .../cpp_simple_button_left_material.xml | 0 .../cpp_simple_button_left_material_light.xml | 0 .../res/layout/cpp_simple_button_minus.xml | 0 .../cpp_simple_button_minus_material.xml | 0 ...cpp_simple_button_minus_material_light.xml | 0 .../cpp_simple_button_multiplication.xml | 0 ..._simple_button_multiplication_material.xml | 0 ...e_button_multiplication_material_light.xml | 0 .../layout/cpp_simple_button_operators.xml | 0 .../cpp_simple_button_operators_material.xml | 0 ...simple_button_operators_material_light.xml | 0 .../res/layout/cpp_simple_button_paste.xml | 0 .../cpp_simple_button_paste_material.xml | 0 ...cpp_simple_button_paste_material_light.xml | 0 .../res/layout/cpp_simple_button_percent.xml | 0 .../cpp_simple_button_percent_material.xml | 0 ...p_simple_button_percent_material_light.xml | 0 .../res/layout/cpp_simple_button_plus.xml | 0 .../cpp_simple_button_plus_material.xml | 0 .../cpp_simple_button_plus_material_light.xml | 0 .../res/layout/cpp_simple_button_power.xml | 0 .../cpp_simple_button_power_material.xml | 0 ...cpp_simple_button_power_material_light.xml | 0 .../res/layout/cpp_simple_button_right.xml | 0 .../cpp_simple_button_right_material.xml | 0 ...cpp_simple_button_right_material_light.xml | 0 .../cpp_simple_button_round_brackets.xml | 0 ..._simple_button_round_brackets_material.xml | 0 ...e_button_round_brackets_material_light.xml | 0 .../res/layout/cpp_simple_button_settings.xml | 0 .../cpp_simple_button_settings_material.xml | 0 ..._simple_button_settings_material_light.xml | 0 .../res/layout/cpp_simple_button_vars.xml | 0 .../cpp_simple_button_vars_material.xml | 0 .../cpp_simple_button_vars_material_light.xml | 0 .../layout/cpp_simple_keyboard_lockscreen.xml | 0 ...p_simple_keyboard_lockscreen_collapsed.xml | 0 .../main/res/layout/cpp_unit_converter.xml | 0 .../layout/cpp_wizard_step_choose_layout.xml | 0 .../layout/cpp_wizard_step_choose_mode.xml | 0 .../layout/cpp_wizard_step_choose_theme.xml | 0 .../cpp_wizard_step_choose_theme_preview.xml | 0 .../layout/cpp_wizard_step_drag_button.xml | 0 .../main/res/layout/cpp_wizard_step_final.xml | 0 .../res/layout/cpp_wizard_step_onscreen.xml | 0 .../res/layout/cpp_wizard_step_welcome.xml | 0 .../main/res/layout/display_error_message.xml | 0 .../src/main/res/layout/feedback.xml | 0 .../main/res/layout/fragment_preferences.xml | 0 .../src/main/res/layout/fragment_wizard.xml | 0 .../res/layout/fragment_wizard_buttons.xml | 0 .../main/res/layout/function_add_param.xml | 0 .../src/main/res/layout/function_edit.xml | 0 .../main/res/layout/function_edit_param.xml | 0 .../src/main/res/layout/history_edit.xml | 0 .../src/main/res/layout/history_fragment.xml | 0 .../src/main/res/layout/history_item.xml | 0 .../src/main/res/layout/main_calculator.xml | 0 .../res/layout/main_calculator_mobile.xml | 0 .../src/main/res/layout/main_empty.xml | 0 .../res/layout/math_entities_fragment.xml | 0 .../src/main/res/layout/math_entity.xml | 0 .../main/res/layout/matrix_edit_fragment.xml | 0 .../src/main/res/layout/onscreen_display.xml | 0 .../res/layout/onscreen_display_light.xml | 0 .../src/main/res/layout/onscreen_editor.xml | 0 .../main/res/layout/onscreen_editor_light.xml | 0 .../src/main/res/layout/onscreen_header.xml | 0 .../res/layout/onscreen_header_material.xml | 0 .../layout/onscreen_header_material_light.xml | 0 .../src/main/res/layout/onscreen_keyboard.xml | 0 .../res/layout/onscreen_keyboard_material.xml | 0 .../onscreen_keyboard_material_light.xml | 0 .../src/main/res/layout/onscreen_layout.xml | 0 .../res/layout/onscreen_layout_material.xml | 0 .../layout/onscreen_layout_material_light.xml | 0 .../res/layout/release_notes_fragment.xml | 0 .../main/res/layout/saved_history_item.xml | 0 .../src/main/res/layout/tabs.xml | 0 .../src/main/res/layout/var_edit.xml | 0 .../src/main/res/layout/vars_fragment.xml | 0 .../src/main/res/layout/widget_display.xml | 0 .../main/res/layout/widget_display_light.xml | 0 .../src/main/res/layout/widget_editor.xml | 0 .../main/res/layout/widget_editor_light.xml | 0 .../src/main/res/layout/widget_keyboard.xml | 0 .../res/layout/widget_keyboard_material.xml | 0 .../layout/widget_keyboard_material_light.xml | 0 .../src/main/res/layout/widget_layout.xml | 0 .../res/layout/widget_layout_lockscreen.xml | 0 .../widget_layout_lockscreen_collapsed.xml | 0 .../res/layout/widget_layout_material.xml | 0 .../layout/widget_layout_material_light.xml | 0 .../src/main/res/menu/history_menu.xml | 0 .../src/main/res/menu/plot_menu.xml | 0 .../src/main/res/values-ar/text_about.xml | 0 .../src/main/res/values-ar/text_functions.xml | 0 .../src/main/res/values-ar/text_operators.xml | 0 .../main/res/values-ar/text_preferences.xml | 0 .../src/main/res/values-ar/text_strings.xml | 0 .../src/main/res/values-ar/text_vars.xml | 0 .../src/main/res/values-ar/text_wizard.xml | 0 .../src/main/res/values-cs/text_about.xml | 0 .../src/main/res/values-cs/text_functions.xml | 0 .../src/main/res/values-cs/text_operators.xml | 0 .../main/res/values-cs/text_preferences.xml | 0 .../src/main/res/values-cs/text_strings.xml | 0 .../src/main/res/values-cs/text_vars.xml | 0 .../src/main/res/values-cs/text_wizard.xml | 0 .../src/main/res/values-de/text_about.xml | 0 .../src/main/res/values-de/text_functions.xml | 0 .../src/main/res/values-de/text_operators.xml | 0 .../main/res/values-de/text_preferences.xml | 0 .../src/main/res/values-de/text_strings.xml | 0 .../src/main/res/values-de/text_vars.xml | 0 .../src/main/res/values-de/text_wizard.xml | 0 .../src/main/res/values-es/text_about.xml | 0 .../src/main/res/values-es/text_functions.xml | 0 .../src/main/res/values-es/text_operators.xml | 0 .../main/res/values-es/text_preferences.xml | 0 .../src/main/res/values-es/text_strings.xml | 0 .../src/main/res/values-es/text_vars.xml | 0 .../src/main/res/values-es/text_wizard.xml | 0 .../src/main/res/values-fi/text_about.xml | 0 .../src/main/res/values-fi/text_functions.xml | 0 .../src/main/res/values-fi/text_operators.xml | 0 .../main/res/values-fi/text_preferences.xml | 0 .../src/main/res/values-fi/text_strings.xml | 0 .../src/main/res/values-fi/text_vars.xml | 0 .../src/main/res/values-fi/text_wizard.xml | 0 .../src/main/res/values-fr/text_about.xml | 0 .../src/main/res/values-fr/text_functions.xml | 0 .../src/main/res/values-fr/text_operators.xml | 0 .../main/res/values-fr/text_preferences.xml | 0 .../src/main/res/values-fr/text_strings.xml | 0 .../src/main/res/values-fr/text_vars.xml | 0 .../src/main/res/values-fr/text_wizard.xml | 0 .../src/main/res/values-it/text_about.xml | 0 .../src/main/res/values-it/text_functions.xml | 0 .../src/main/res/values-it/text_operators.xml | 0 .../main/res/values-it/text_preferences.xml | 0 .../src/main/res/values-it/text_strings.xml | 0 .../src/main/res/values-it/text_vars.xml | 0 .../src/main/res/values-it/text_wizard.xml | 0 .../src/main/res/values-ja/text_about.xml | 0 .../src/main/res/values-ja/text_functions.xml | 0 .../src/main/res/values-ja/text_operators.xml | 0 .../main/res/values-ja/text_preferences.xml | 0 .../src/main/res/values-ja/text_strings.xml | 0 .../src/main/res/values-ja/text_vars.xml | 0 .../src/main/res/values-ja/text_wizard.xml | 0 .../src/main/res/values-large-hdpi/dimens.xml | 0 .../src/main/res/values-large-mdpi/dimens.xml | 0 .../main/res/values-large-tvdpi/dimens.xml | 0 .../main/res/values-large-xhdpi/dimens.xml | 0 .../src/main/res/values-large/arrays.xml | 0 .../src/main/res/values-large/dimens.xml | 0 .../src/main/res/values-nl/text_about.xml | 0 .../src/main/res/values-nl/text_functions.xml | 0 .../src/main/res/values-nl/text_operators.xml | 0 .../main/res/values-nl/text_preferences.xml | 0 .../src/main/res/values-nl/text_strings.xml | 0 .../src/main/res/values-nl/text_vars.xml | 0 .../src/main/res/values-nl/text_wizard.xml | 0 .../main/res/values-normal-hdpi/dimens.xml | 0 .../main/res/values-normal-mdpi/dimens.xml | 0 .../main/res/values-normal-tvdpi/dimens.xml | 0 .../main/res/values-normal-xhdpi/dimens.xml | 0 .../src/main/res/values-normal/dimens.xml | 0 .../src/main/res/values-pl/text_about.xml | 0 .../src/main/res/values-pl/text_functions.xml | 0 .../src/main/res/values-pl/text_operators.xml | 0 .../main/res/values-pl/text_preferences.xml | 0 .../src/main/res/values-pl/text_strings.xml | 0 .../src/main/res/values-pl/text_vars.xml | 0 .../src/main/res/values-pl/text_wizard.xml | 0 .../src/main/res/values-pt-rbr/text_about.xml | 0 .../main/res/values-pt-rbr/text_functions.xml | 0 .../main/res/values-pt-rbr/text_operators.xml | 0 .../res/values-pt-rbr/text_preferences.xml | 0 .../main/res/values-pt-rbr/text_strings.xml | 0 .../src/main/res/values-pt-rbr/text_vars.xml | 0 .../main/res/values-pt-rbr/text_wizard.xml | 0 .../src/main/res/values-pt-rpt/text_about.xml | 0 .../main/res/values-pt-rpt/text_functions.xml | 0 .../main/res/values-pt-rpt/text_operators.xml | 0 .../res/values-pt-rpt/text_preferences.xml | 0 .../main/res/values-pt-rpt/text_strings.xml | 0 .../src/main/res/values-pt-rpt/text_vars.xml | 0 .../main/res/values-pt-rpt/text_wizard.xml | 0 .../src/main/res/values-ru/text_about.xml | 0 .../src/main/res/values-ru/text_functions.xml | 0 .../src/main/res/values-ru/text_operators.xml | 0 .../main/res/values-ru/text_preferences.xml | 0 .../main/res/values-ru/text_release_notes.xml | 0 .../src/main/res/values-ru/text_strings.xml | 0 .../src/main/res/values-ru/text_vars.xml | 0 .../src/main/res/values-ru/text_wizard.xml | 0 .../src/main/res/values-small-hdpi/dimens.xml | 0 .../main/res/values-small-xhdpi/dimens.xml | 0 .../src/main/res/values-small/dimens.xml | 0 .../src/main/res/values-tr/text_about.xml | 0 .../src/main/res/values-tr/text_functions.xml | 0 .../src/main/res/values-tr/text_operators.xml | 0 .../main/res/values-tr/text_preferences.xml | 0 .../src/main/res/values-tr/text_strings.xml | 0 .../src/main/res/values-tr/text_vars.xml | 0 .../src/main/res/values-tr/text_wizard.xml | 0 .../src/main/res/values-uk/text_about.xml | 0 .../src/main/res/values-uk/text_functions.xml | 0 .../src/main/res/values-uk/text_operators.xml | 0 .../main/res/values-uk/text_preferences.xml | 0 .../src/main/res/values-uk/text_strings.xml | 0 .../src/main/res/values-uk/text_vars.xml | 0 .../src/main/res/values-uk/text_wizard.xml | 0 .../src/main/res/values-v14/dimens.xml | 0 .../src/main/res/values-vi/text_about.xml | 0 .../src/main/res/values-vi/text_functions.xml | 0 .../src/main/res/values-vi/text_operators.xml | 0 .../main/res/values-vi/text_preferences.xml | 0 .../src/main/res/values-vi/text_strings.xml | 0 .../src/main/res/values-vi/text_vars.xml | 0 .../src/main/res/values-vi/text_wizard.xml | 0 .../src/main/res/values-w820dp-v13/values.xml | 0 .../main/res/values-xlarge-hdpi/dimens.xml | 0 .../main/res/values-xlarge-mdpi/dimens.xml | 0 .../src/main/res/values-xlarge/dimens.xml | 0 .../src/main/res/values-zh-rcn/text_about.xml | 0 .../main/res/values-zh-rcn/text_functions.xml | 0 .../main/res/values-zh-rcn/text_operators.xml | 0 .../res/values-zh-rcn/text_preferences.xml | 0 .../main/res/values-zh-rcn/text_strings.xml | 0 .../src/main/res/values-zh-rcn/text_vars.xml | 0 .../main/res/values-zh-rcn/text_wizard.xml | 0 .../src/main/res/values-zh-rtw/text_about.xml | 0 .../main/res/values-zh-rtw/text_functions.xml | 0 .../main/res/values-zh-rtw/text_operators.xml | 0 .../res/values-zh-rtw/text_preferences.xml | 0 .../main/res/values-zh-rtw/text_strings.xml | 0 .../src/main/res/values-zh-rtw/text_vars.xml | 0 .../main/res/values-zh-rtw/text_wizard.xml | 0 .../src/main/res/values/admob.xml | 0 .../src/main/res/values/arrays.xml | 0 .../src/main/res/values/attributes.xml | 0 .../src/main/res/values/colors.xml | 0 .../src/main/res/values/dimens.xml | 0 .../src/main/res/values/ids.xml | 0 .../src/main/res/values/preferences.xml | 0 .../src/main/res/values/styles.xml | 0 .../src/main/res/values/text_about.xml | 0 .../src/main/res/values/text_functions.xml | 0 .../src/main/res/values/text_operators.xml | 0 .../src/main/res/values/text_preferences.xml | 0 .../main/res/values/text_release_notes.xml | 0 .../src/main/res/values/text_strings.xml | 0 .../src/main/res/values/text_vars.xml | 0 .../src/main/res/values/text_wizard.xml | 0 .../src/main/res/values/theme.xml | 0 .../src/main/res/values/theme_material.xml | 0 .../main/res/values/theme_material_light.xml | 0 .../src/main/res/values/theme_metro_blue.xml | 0 .../src/main/res/values/theme_metro_green.xml | 0 .../main/res/values/theme_metro_purple.xml | 0 .../src/main/res/values/theme_old_blue.xml | 0 .../src/main/res/values/theme_old_gray.xml | 0 .../src/main/res/values/theme_old_violet.xml | 0 .../src/main/res/values/vpi__attrs.xml | 0 .../src/main/res/values/vpi__defaults.xml | 0 .../src/main/res/xml/calculator_widget.xml | 0 .../main/res/xml/calculator_widget_info.xml | 0 .../res/xml/calculator_widget_info_3x3.xml | 0 .../res/xml/calculator_widget_info_3x4.xml | 0 .../res/xml/calculator_widget_info_4x4.xml | 0 .../res/xml/calculator_widget_info_4x5.xml | 0 {android-app => app}/src/main/res/xml/ga.xml | 0 .../src/main/res/xml/preferences.xml | 0 .../main/res/xml/preferences_appearance.xml | 0 .../main/res/xml/preferences_calculations.xml | 0 .../src/main/res/xml/preferences_onscreen.xml | 0 .../src/main/res/xml/preferences_other.xml | 0 .../src/main/res/xml/preferences_plot.xml | 0 .../src/main/res/xml/preferences_widget.xml | 0 .../android/calculator/messages.properties | 0 .../android/calculator/messages_ar.properties | 0 .../android/calculator/messages_cs.properties | 0 .../android/calculator/messages_de.properties | 0 .../android/calculator/messages_el.properties | 0 .../android/calculator/messages_es.properties | 0 .../calculator/messages_es_ES.properties | 0 .../android/calculator/messages_fi.properties | 0 .../android/calculator/messages_fr.properties | 0 .../android/calculator/messages_it.properties | 0 .../android/calculator/messages_ja.properties | 0 .../android/calculator/messages_nl.properties | 0 .../android/calculator/messages_pl.properties | 0 .../calculator/messages_pt_BR.properties | 0 .../calculator/messages_pt_PT.properties | 0 .../android/calculator/messages_ru.properties | 0 .../android/calculator/messages_tr.properties | 0 .../android/calculator/messages_uk.properties | 0 .../android/calculator/messages_vi.properties | 0 .../android/calculator/messages_zh.properties | 0 .../calculator/messages_zh_CN.properties | 0 .../calculator/messages_zh_TW.properties | 0 .../calculator/AbstractCalculatorTest.java | 0 .../CalculatorDisplayViewStateImplTest.java | 0 .../calculator/CalculatorEditorImplTest.java | 0 .../CalculatorEditorViewStateImplTest.java | 0 .../calculator/CalculatorImplTest.java | 0 .../calculator/CalculatorMessagesTest.java | 0 .../calculator/CalculatorTestUtils.java | 0 .../FromJsclSimplifyTextProcessorTest.java | 0 .../history/CalculatorHistoryImplTest.java | 0 .../FromJsclNumericTextProcessorTest.java | 0 .../android/calculator/math/MathTypeTest.java | 0 .../model/AndroidCalculatorEngineTest.java | 0 .../calculator/model/ComparisonTest.java | 0 .../calculator/model/EvaluateTest.java | 0 .../calculator/model/FunctionsTest.java | 0 .../calculator/model/NumeralBaseTest.java | 0 .../model/ToJsclTextProcessorTest.java | 0 .../android/calculator/model/nb_table.csv | 0 settings.gradle | 4 +- 1033 files changed, 4948 insertions(+), 4948 deletions(-) rename {android-app-tests => app-tests}/build.gradle (97%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/AndroidNumeralBaseTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/CalculatorTestRunner.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/AndroidCalculatorEditorViewTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/CalculatorBroadcasterTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/CalculatorReceiverTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/CalculatorTestUtils.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/history/HistoryUtilsTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/model/VarTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/plot/CalculatorGraph2dViewTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/view/AngleUnitsButtonTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/view/NumeralBasesButtonTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardActivityTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardTest.java (100%) rename {android-app-tests => app-tests}/src/test/java/org/solovyev/android/calculator/wizard/OnScreenCalculatorWizardStepTest.java (100%) rename {android-app => app}/build.gradle (100%) rename {android-app => app}/misc/doc/GoogleAdMobAdsSdk-4.3.1-javadocs.zip (100%) rename {android-app => app}/misc/doc/achartengine-0.7.0-javadocs.zip (100%) rename {android-app => app}/misc/libs/drag-button-1.0.aar (100%) rename {android-app => app}/misc/libs/plotter.aar (100%) rename {android-app => app}/misc/other/prepare_avds.sh (100%) rename {android-app => app}/misc/other/remove_avds.sh (100%) rename {android-app => app}/misc/other/take_screenshots.py (100%) rename {android-app => app}/misc/other/take_screenshots.sh (100%) rename {android-app => app}/misc/other/take_screenshots2.sh (100%) rename {android-app => app}/misc/other/wait_device.py (100%) rename {android-app => app}/misc/res/calculatorpp/01_main_screen_port.png (100%) rename {android-app => app}/misc/res/calculatorpp/01_main_screen_port_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/02_main_screen_land.png (100%) rename {android-app => app}/misc/res/calculatorpp/03_main_screen_port_with_expression.png (100%) rename {android-app => app}/misc/res/calculatorpp/04_plot_graph_menu.png (100%) rename {android-app => app}/misc/res/calculatorpp/04_plot_graph_menu_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/05_graph_screen.png (100%) rename {android-app => app}/misc/res/calculatorpp/05_graph_screen_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/06_constants_screen.png (100%) rename {android-app => app}/misc/res/calculatorpp/06_constants_screen_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/07_constant_create_dialog.png (100%) rename {android-app => app}/misc/res/calculatorpp/08_constants_context_menu.png (100%) rename {android-app => app}/misc/res/calculatorpp/09_functions_screen.png (100%) rename {android-app => app}/misc/res/calculatorpp/09_functions_screen_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/10_history_screen.png (100%) rename {android-app => app}/misc/res/calculatorpp/10_history_screen_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/11_history_item_context_menu.png (100%) rename {android-app => app}/misc/res/calculatorpp/12_saved_history_tab.png (100%) rename {android-app => app}/misc/res/calculatorpp/13_saved_history_item_context_menu.png (100%) rename {android-app => app}/misc/res/calculatorpp/14_about_screen.png (100%) rename {android-app => app}/misc/res/calculatorpp/14_about_screen_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/15_release_notes_tab.png (100%) rename {android-app => app}/misc/res/calculatorpp/16_help_screen.png (100%) rename {android-app => app}/misc/res/calculatorpp/16_help_screen_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/17_hints_tab.png (100%) rename {android-app => app}/misc/res/calculatorpp/18_preferences.png (100%) rename {android-app => app}/misc/res/calculatorpp/18_preferences_02.png (100%) rename {android-app => app}/misc/res/calculatorpp/18_preferences_03.png (100%) rename {android-app => app}/misc/res/calculatorpp/18_preferences_sm.png (100%) rename {android-app => app}/misc/res/calculatorpp/plan.png (100%) rename {android-app => app}/misc/res/calculatorpp/plan.xcf (100%) rename {android-app => app}/misc/res/description/description-de.txt (100%) rename {android-app => app}/misc/res/description/description-es-ES.txt (100%) rename {android-app => app}/misc/res/description/description-fr.txt (100%) rename {android-app => app}/misc/res/description/description-it.txt (100%) rename {android-app => app}/misc/res/description/description-pl.txt (100%) rename {android-app => app}/misc/res/description/description-pt-BR.txt (100%) rename {android-app => app}/misc/res/description/description-ru.txt (100%) rename {android-app => app}/misc/res/description/description-short-ru.txt (100%) rename {android-app => app}/misc/res/description/description-short.txt (100%) rename {android-app => app}/misc/res/description/description-tr.txt (100%) rename {android-app => app}/misc/res/description/description-vi.txt (100%) rename {android-app => app}/misc/res/description/description-zh-CN.txt (100%) rename {android-app => app}/misc/res/description/description-zh-TW.txt (100%) rename {android-app => app}/misc/res/description/description.txt (100%) rename {android-app => app}/misc/res/icon-green.png (100%) rename {android-app => app}/misc/res/icon-hi-res.png (100%) rename {android-app => app}/misc/res/icon-promo.png (100%) rename {android-app => app}/misc/res/icon.png (100%) rename {android-app => app}/misc/res/icon144.png (100%) rename {android-app => app}/misc/res/icon48.png (100%) rename {android-app => app}/misc/res/icon512.png (100%) rename {android-app => app}/misc/res/icon72.png (100%) rename {android-app => app}/misc/res/icon96.png (100%) rename {android-app => app}/misc/res/icon_onscreen144.png (100%) rename {android-app => app}/misc/res/icon_onscreen48.png (100%) rename {android-app => app}/misc/res/icon_onscreen512.png (100%) rename {android-app => app}/misc/res/icon_onscreen72.png (100%) rename {android-app => app}/misc/res/icon_onscreen96.png (100%) rename {android-app => app}/misc/res/kb_facebook.png (100%) rename {android-app => app}/misc/res/kb_facebook_icon.png (100%) rename {android-app => app}/misc/res/logo-admob.png (100%) rename {android-app => app}/misc/res/logo-scaled.png (100%) rename {android-app => app}/misc/res/logo-small.png (100%) rename {android-app => app}/misc/res/logo.cdr (100%) rename {android-app => app}/misc/res/logo.png (100%) rename {android-app => app}/misc/res/widget.png (100%) rename {android-app => app}/misc/res/work/Backup_of_logo.cdr (100%) rename {android-app => app}/misc/res/work/header.png (100%) rename {android-app => app}/misc/res/work/header_bg.png (100%) rename {android-app => app}/misc/res/work/header_sm.png (100%) rename {android-app => app}/misc/res/work/heart_original.png (100%) rename {android-app => app}/misc/res/work/icon.png (100%) rename {android-app => app}/misc/res/work/icon_favicon_light_blue.ico (100%) rename {android-app => app}/misc/res/work/icon_favicon_light_blue.png (100%) rename {android-app => app}/misc/res/work/icon_favicon_purple.ico (100%) rename {android-app => app}/misc/res/work/icon_small.png (100%) rename {android-app => app}/misc/res/work/log11o.psd (100%) rename {android-app => app}/misc/res/work/logo.cdr (100%) rename {android-app => app}/misc/res/work/logo.png (100%) rename {android-app => app}/misc/res/work/logoFULL copy.png (100%) rename {android-app => app}/misc/res/work/logoFULL.pdf (100%) rename {android-app => app}/misc/res/work/logoFULL.png (100%) rename {android-app => app}/misc/res/work/logoFULL_banner.png (100%) rename {android-app => app}/misc/res/work/logoFULL_small.png (100%) rename {android-app => app}/misc/res/work/logo_black.png (100%) rename {android-app => app}/misc/res/work/logo_blue.png (100%) rename {android-app => app}/misc/res/work/logo_light_blue.png (100%) rename {android-app => app}/misc/res/work/logo_purple.png (100%) rename {android-app => app}/misc/res/work/promo_logo.png (100%) rename {android-app => app}/misc/res/work/text_logo.png (100%) rename {android-app => app}/misc/res/work/text_logo_blue.png (100%) rename {android-app => app}/misc/res/work/text_logo_light_blue.png (100%) rename {android-app => app}/misc/res/work/text_logo_light_blue_cpp_forum.png (100%) rename {android-app => app}/misc/res/work/text_logo_purple.png (100%) rename {android-app => app}/misc/src/achartengine-0.7.0.jar (100%) rename {android-app => app}/misc/src/bsh.jar (100%) rename {android-app => app}/proguard-debug.cfg (100%) rename {android-app => app}/proguard.cfg (100%) rename {android-app => app}/project.properties (100%) rename {android-app => app}/src/main/AndroidManifest.xml (100%) rename {android-app => app}/src/main/assets/fonts/Roboto-Regular.ttf (100%) rename {android-app => app}/src/main/java/com/viewpagerindicator/CirclePageIndicator.java (100%) rename {android-app => app}/src/main/java/com/viewpagerindicator/PageIndicator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/Check.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AbstractCalculatorMathRegistry.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AbstractFixableError.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AbstractNumberBuilder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ActivityUi.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AdView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorClipboard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorDisplayView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorKeyboard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorLogger.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidCalculatorPreferenceService.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidFunctionCategory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidNumeralBase.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidOperatorCategory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/App.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/BaseActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/BaseUi.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ButtonOnClickListener.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/Calculator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorApplication.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorBroadcaster.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorButton.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorButtons.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorClipboard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventDataImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplay.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventDataImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayMenuItem.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayOnClickListener.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewStateImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditorChangeEventData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditorImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditorView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewStateImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEngine.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEngineControl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEngineImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEvalException.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventDataImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEventContainer.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEventData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEventDataImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEventHolder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEventListener.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorEventType.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorFailure.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorFailureImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorFixableError.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorInput.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorInputImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorKeyboard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorLocator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorLogger.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorMathEngine.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorMathRegistry.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorMessage.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorMessages.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorNotifier.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorOperatorsMathRegistry.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorOutput.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorOutputImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorParseException.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorPreferenceService.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorReceiver.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorSecurity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorSpecialButton.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorUtils.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/Change.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ChangeImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CharacterAtPositionFinder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ConversionFailure.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ConversionFailureImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ConversionMenuItem.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/CursorDragProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/DialogData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/DigitButtonDragProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/DummyCalculatorClipboard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/DummyCalculatorNotifier.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/Editor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/EmptyActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/EqualsDragProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/FixableError.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/FixableMessage.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/FixableMessagesDialog.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/FragmentUi.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/FunctionCategory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ListCalculatorEventContainer.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/LiteNumberBuilder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/Locator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/MathEntityDao.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/MathEntityPersistenceContainer.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/MathPersistenceEntity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/MessageDialogData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/NumberBuilder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/NumeralBaseButtons.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/OperatorCategory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ParcelableDialogData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/Preferences.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/PreparedExpression.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/StringDialogData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/SystemOutCalculatorLogger.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ToJsclTextProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/VarCategory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/Vibrator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/about/TextHelper.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/function/FunctionBuilderAdapter.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/function/FunctionEditDialogFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/ga/Ga.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/AbstractHistoryState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/BaseHistoryFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/CalculatorDisplayHistoryState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/CalculatorHistory.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/EditorHistoryState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/History.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/HistoryArrayAdapter.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/HistoryDragProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/HistoryFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/HistoryUtils.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/SavedHistoryFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/jscl/FromJsclNumericTextProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/jscl/JsclOperation.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/language/Language.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/language/Languages.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/MathType.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/MathEntityRemover.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/math/edit/VarEditorSaver.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/matrix/CalculatorMatrixActivity.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/matrix/CalculatorMatrixEditFragment.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/matrix/MatrixUi.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/matrix/MatrixView.java (96%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/AFunction.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/AndroidCalculatorEngine.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/AndroidMathEntityDao.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/Functions.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/MathEntityBuilder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/Var.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/model/Vars.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenBroadcastReceiver.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenService.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenStartActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/onscreen/CalculatorOnscreenViewState.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/onscreen/OnscreenViewListener.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/AbstractCalculatorPlotFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/AbstractGraphCalculator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/AndroidCalculatorPlotter.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/AndroidPlotLineStyle.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorGraph2dView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorGraph3dView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotFunctionSettingsActivity.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotFunctionsActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotRangeActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotter.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/CalculatorPlotterImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/FunctionEvaluator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GLText.java (98%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GLView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/Graph2dDimensions.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/Graph3d.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GraphCalculator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GraphCalculatorImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GraphData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GraphView.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GraphViewHelper.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/GraphsData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/MapPlotResourceManager.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotBoundaries.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotData.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotFunction.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotFunctionListItem.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotLineColor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotLineColorType.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotLineDef.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotLineStyle.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotResourceManager.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotUtils.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotViewDef.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/PlotterFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/SpriteBatch.java (98%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/TexampleRenderer.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/TextureRegion.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/TouchHandler.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/Vertices.java (98%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/XyFunction.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/plot/ZoomTracker.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/preferences/PreferencesActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/preferences/PreferencesFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/preferences/PurchaseDialogActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/release/ChooseThemeReleaseNoteFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/release/ChooseThemeReleaseNoteStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/release/ReleaseNoteFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/release/ReleaseNoteStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/release/ReleaseNotes.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/text/DummyTextProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/text/FromJsclSimplifyTextProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/text/TextProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/text/TextProcessorEditorResult.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/units/CalculatorNumeralBase.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/AngleUnitsButton.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/CalculatorAdditionalTitle.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/DragListenerVibrator.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/EditorTextProcessor.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/LongClickEraser.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/NumeralBaseConverterDialog.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/NumeralBasesButton.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/ScreenMetrics.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/TextHighlighter.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/UnitConverterViewBuilder.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/view/ViewsCache.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/BaseCalculatorWidgetProvider.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/CalculatorWidget.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/CalculatorWidgetConfigurationActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/CalculatorWidgetProvider.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/CalculatorWidgetProvider3x4.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/CalculatorWidgetProvider4x4.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/widget/CalculatorWidgetProvider4x5.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/CalculatorLayout.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/CalculatorMode.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizards.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/ChooseLayoutWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/ChooseModeWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/ChooseThemeWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/DragButtonWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/FinalWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/OnScreenCalculatorWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/WelcomeWizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/WizardActivity.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/WizardArrayAdapter.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/calculator/wizard/WizardFragment.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/fragments/FragmentUtils.java (97%) rename {android-app => app}/src/main/java/org/solovyev/android/sherlock/FragmentItem.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/sherlock/FragmentItemImpl.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/sherlock/tabs/ActionBarFragmentTabListener.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/BaseWizard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/ListWizardFlow.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/Wizard.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/WizardFlow.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/WizardStep.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/WizardUi.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/Wizards.java (100%) rename {android-app => app}/src/main/java/org/solovyev/android/wizard/WizardsAware.java (100%) rename {android-app => app}/src/main/res/color/cpp_wizard_button_selector.xml (100%) rename {android-app => app}/src/main/res/color/cpp_wizard_button_selector_light.xml (100%) rename {android-app => app}/src/main/res/color/primary_button_selector.xml (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_clock.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_disk.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_expand.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_functions.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_logo.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_range.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_settings.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_stats.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ab_stats_3d.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_action_done.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_action_done_light.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_add_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_delete_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_launcher.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_launcher_window.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/ic_save_grey600_48dp.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/kb_copy.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/kb_erase.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/kb_logo.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/kb_paste.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/kb_settings.png (100%) rename {android-app => app}/src/main/res/drawable-hdpi/kb_share.png (100%) rename {android-app => app}/src/main/res/drawable-land-xhdpi/layout_big_buttons.png (100%) rename {android-app => app}/src/main/res/drawable-land-xhdpi/layout_optimized.png (100%) rename {android-app => app}/src/main/res/drawable-ldpi/.emptyfolder (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_clock.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_disk.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_expand.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_functions.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_logo.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_range.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_settings.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_stats.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ab_stats_3d.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_action_done.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_action_done_light.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_add_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_delete_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_launcher.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_launcher_window.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/ic_save_grey600_48dp.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/kb_copy.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/kb_erase.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/kb_logo.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/kb_paste.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/kb_settings.png (100%) rename {android-app => app}/src/main/res/drawable-mdpi/kb_share.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/cpp_onscreen_button_close.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/cpp_onscreen_button_fold.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/cpp_onscreen_button_minimize.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/cpp_onscreen_header_logo.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/cpp_onscreen_header_logo_light.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/tablet_big_buttons.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/tablet_optimized.png (100%) rename {android-app => app}/src/main/res/drawable-nodpi/widget_preview.png (100%) rename {android-app => app}/src/main/res/drawable-v21/button_no_bg.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/cpp_wizard_button_selector.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/material_blue_button.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/material_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/material_button_light.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/material_button_light_primary.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_blue_button.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_button_green.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_button_light.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_button_purple.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_widget_button.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_widget_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable-v21/metro_widget_button_light.xml (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_clock.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_disk.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_expand.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_functions.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_logo.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_range.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_settings.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_stats.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ab_stats_3d.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_action_done.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_action_done_light.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_add_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_delete_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_launcher.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_launcher_window.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/ic_save_grey600_48dp.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/kb_copy.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/kb_erase.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/kb_logo.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/kb_paste.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/kb_settings.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/kb_share.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/layout_big_buttons.png (100%) rename {android-app => app}/src/main/res/drawable-xhdpi/layout_optimized.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_clock.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_disk.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_expand.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_functions.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_logo.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_range.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_settings.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_stats.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ab_stats_3d.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_action_done.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_action_done_light.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_add_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_delete_white_36dp.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_launcher.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_launcher_window.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/ic_save_grey600_48dp.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/logo_wizard.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/logo_wizard_light.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/logo_wizard_window.png (100%) rename {android-app => app}/src/main/res/drawable-xxhdpi/logo_wizard_window_light.png (100%) rename {android-app => app}/src/main/res/drawable-xxxhdpi/ab_logo.png (100%) rename {android-app => app}/src/main/res/drawable-xxxhdpi/ic_launcher.png (100%) rename {android-app => app}/src/main/res/drawable-xxxhdpi/ic_launcher_window.png (100%) rename {android-app => app}/src/main/res/drawable/blue_button.xml (100%) rename {android-app => app}/src/main/res/drawable/blue_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable/blue_button_dark_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/blue_button_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/button_no_bg.xml (100%) rename {android-app => app}/src/main/res/drawable/button_no_bg_pressed.xml (100%) rename {android-app => app}/src/main/res/drawable/cpp_wizard_button_selector.xml (100%) rename {android-app => app}/src/main/res/drawable/cpp_wizard_button_shape_normal.xml (100%) rename {android-app => app}/src/main/res/drawable/cpp_wizard_button_shape_pressed.xml (100%) rename {android-app => app}/src/main/res/drawable/gray_button.xml (100%) rename {android-app => app}/src/main/res/drawable/gray_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable/gray_button_dark_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/gray_button_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/material_blue_button.xml (100%) rename {android-app => app}/src/main/res/drawable/material_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable/material_button_light.xml (100%) rename {android-app => app}/src/main/res/drawable/material_button_light_primary.xml (100%) rename {android-app => app}/src/main/res/drawable/material_button_pressed.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_blue_button.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_blue_button_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_dark_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_green.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_green_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_light.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_light_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_pressed.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_purple.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_button_purple_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_widget_button.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_widget_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable/metro_widget_button_light.xml (100%) rename {android-app => app}/src/main/res/drawable/pane.xml (100%) rename {android-app => app}/src/main/res/drawable/pane_light.xml (100%) rename {android-app => app}/src/main/res/drawable/violet_button.xml (100%) rename {android-app => app}/src/main/res/drawable/violet_button_dark.xml (100%) rename {android-app => app}/src/main/res/drawable/violet_button_dark_shape.xml (100%) rename {android-app => app}/src/main/res/drawable/violet_button_shape.xml (100%) rename {android-app => app}/src/main/res/layout-land/cpp_app_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout-land/cpp_app_keyboard_mobile.xml (100%) rename {android-app => app}/src/main/res/layout-land/main_calculator.xml (100%) rename {android-app => app}/src/main/res/layout-land/main_calculator_mobile.xml (100%) rename {android-app => app}/src/main/res/layout-land/main_first_pane.xml (100%) rename {android-app => app}/src/main/res/layout-land/main_first_pane_mobile.xml (100%) rename {android-app => app}/src/main/res/layout-large-land/cpp_app_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout-large-land/main_calculator.xml (100%) rename {android-app => app}/src/main/res/layout-large/cpp_app_display.xml (100%) rename {android-app => app}/src/main/res/layout-large/cpp_app_editor.xml (100%) rename {android-app => app}/src/main/res/layout-large/cpp_app_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout-large/main_calculator.xml (100%) rename {android-app => app}/src/main/res/layout-xlarge-land/cpp_app_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout-xlarge-land/main_calculator.xml (100%) rename {android-app => app}/src/main/res/layout-xlarge/cpp_app_display.xml (100%) rename {android-app => app}/src/main/res/layout-xlarge/cpp_app_editor.xml (100%) rename {android-app => app}/src/main/res/layout-xlarge/cpp_app_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout-xlarge/main_calculator.xml (100%) rename {android-app => app}/src/main/res/layout/about_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/ad.xml (100%) rename {android-app => app}/src/main/res/layout/admob.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_activity_wizard.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_0.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_1.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_2.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_3.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_4.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_5.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_6.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_7.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_8.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_9.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_clear.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_copy.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_division.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_donate.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_dot.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_empty.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_equals.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_equals_no_bg.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_erase.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_functions.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_history.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_left.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_minus.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_multiplication.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_operators.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_paste.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_plus.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_right.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_round_brackets.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_button_vars.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_display.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_display_mobile.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_editor.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_editor_mobile.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_app_keyboard_mobile.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_dialog.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_dialog_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_fixable_messages_dialog.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_fixable_messages_dialog_message.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plot_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plot_function_list_item.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plot_function_settings_dialog.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plot_function_settings_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plot_functions_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plot_range_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_plotter_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_purchase_dialog_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_release_note_step.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_0.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_0_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_0_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_1.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_1_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_1_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_2.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_2_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_2_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_3.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_3_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_3_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_4.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_4_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_4_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_5.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_5_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_5_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_6.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_6_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_6_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_7.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_7_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_7_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_8.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_8_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_8_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_9.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_9_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_9_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_app.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_app_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_app_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_clear.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_clear_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_clear_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_copy.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_copy_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_copy_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_division.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_division_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_division_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_dot.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_dot_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_dot_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_equals.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_equals_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_equals_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_erase.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_erase_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_erase_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_functions.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_functions_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_functions_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_history.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_history_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_history_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_left.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_left_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_left_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_minus.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_minus_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_minus_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_multiplication.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_multiplication_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_multiplication_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_operators.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_operators_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_operators_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_paste.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_paste_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_paste_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_percent.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_percent_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_percent_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_plus.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_plus_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_plus_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_power.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_power_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_power_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_right.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_right_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_right_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_round_brackets.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_round_brackets_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_round_brackets_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_settings.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_settings_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_settings_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_vars.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_vars_material.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_button_vars_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_keyboard_lockscreen.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_simple_keyboard_lockscreen_collapsed.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_unit_converter.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_choose_layout.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_choose_mode.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_choose_theme.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_choose_theme_preview.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_drag_button.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_final.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_onscreen.xml (100%) rename {android-app => app}/src/main/res/layout/cpp_wizard_step_welcome.xml (100%) rename {android-app => app}/src/main/res/layout/display_error_message.xml (100%) rename {android-app => app}/src/main/res/layout/feedback.xml (100%) rename {android-app => app}/src/main/res/layout/fragment_preferences.xml (100%) rename {android-app => app}/src/main/res/layout/fragment_wizard.xml (100%) rename {android-app => app}/src/main/res/layout/fragment_wizard_buttons.xml (100%) rename {android-app => app}/src/main/res/layout/function_add_param.xml (100%) rename {android-app => app}/src/main/res/layout/function_edit.xml (100%) rename {android-app => app}/src/main/res/layout/function_edit_param.xml (100%) rename {android-app => app}/src/main/res/layout/history_edit.xml (100%) rename {android-app => app}/src/main/res/layout/history_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/history_item.xml (100%) rename {android-app => app}/src/main/res/layout/main_calculator.xml (100%) rename {android-app => app}/src/main/res/layout/main_calculator_mobile.xml (100%) rename {android-app => app}/src/main/res/layout/main_empty.xml (100%) rename {android-app => app}/src/main/res/layout/math_entities_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/math_entity.xml (100%) rename {android-app => app}/src/main/res/layout/matrix_edit_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_display.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_display_light.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_editor.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_editor_light.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_header.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_header_material.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_header_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_keyboard_material.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_keyboard_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_layout.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_layout_material.xml (100%) rename {android-app => app}/src/main/res/layout/onscreen_layout_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/release_notes_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/saved_history_item.xml (100%) rename {android-app => app}/src/main/res/layout/tabs.xml (100%) rename {android-app => app}/src/main/res/layout/var_edit.xml (100%) rename {android-app => app}/src/main/res/layout/vars_fragment.xml (100%) rename {android-app => app}/src/main/res/layout/widget_display.xml (100%) rename {android-app => app}/src/main/res/layout/widget_display_light.xml (100%) rename {android-app => app}/src/main/res/layout/widget_editor.xml (100%) rename {android-app => app}/src/main/res/layout/widget_editor_light.xml (100%) rename {android-app => app}/src/main/res/layout/widget_keyboard.xml (100%) rename {android-app => app}/src/main/res/layout/widget_keyboard_material.xml (100%) rename {android-app => app}/src/main/res/layout/widget_keyboard_material_light.xml (100%) rename {android-app => app}/src/main/res/layout/widget_layout.xml (100%) rename {android-app => app}/src/main/res/layout/widget_layout_lockscreen.xml (100%) rename {android-app => app}/src/main/res/layout/widget_layout_lockscreen_collapsed.xml (100%) rename {android-app => app}/src/main/res/layout/widget_layout_material.xml (100%) rename {android-app => app}/src/main/res/layout/widget_layout_material_light.xml (100%) rename {android-app => app}/src/main/res/menu/history_menu.xml (100%) rename {android-app => app}/src/main/res/menu/plot_menu.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_about.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-ar/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_about.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-cs/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-de/text_about.xml (100%) rename {android-app => app}/src/main/res/values-de/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-de/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-de/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-de/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-de/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-de/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-es/text_about.xml (100%) rename {android-app => app}/src/main/res/values-es/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-es/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-es/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-es/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-es/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-es/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_about.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-fi/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_about.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-fr/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-it/text_about.xml (100%) rename {android-app => app}/src/main/res/values-it/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-it/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-it/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-it/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-it/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-it/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_about.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-ja/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-large-hdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-large-mdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-large-tvdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-large-xhdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-large/arrays.xml (100%) rename {android-app => app}/src/main/res/values-large/dimens.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_about.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-nl/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-normal-hdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-normal-mdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-normal-tvdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-normal-xhdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-normal/dimens.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_about.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-pl/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_about.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-pt-rbr/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_about.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-pt-rpt/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_about.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_release_notes.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-ru/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-small-hdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-small-xhdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-small/dimens.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_about.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-tr/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_about.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-uk/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-v14/dimens.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_about.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-vi/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-w820dp-v13/values.xml (100%) rename {android-app => app}/src/main/res/values-xlarge-hdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-xlarge-mdpi/dimens.xml (100%) rename {android-app => app}/src/main/res/values-xlarge/dimens.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_about.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-zh-rcn/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_about.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_functions.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_operators.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_strings.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_vars.xml (100%) rename {android-app => app}/src/main/res/values-zh-rtw/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values/admob.xml (100%) rename {android-app => app}/src/main/res/values/arrays.xml (100%) rename {android-app => app}/src/main/res/values/attributes.xml (100%) rename {android-app => app}/src/main/res/values/colors.xml (100%) rename {android-app => app}/src/main/res/values/dimens.xml (100%) rename {android-app => app}/src/main/res/values/ids.xml (100%) rename {android-app => app}/src/main/res/values/preferences.xml (100%) rename {android-app => app}/src/main/res/values/styles.xml (100%) rename {android-app => app}/src/main/res/values/text_about.xml (100%) rename {android-app => app}/src/main/res/values/text_functions.xml (100%) rename {android-app => app}/src/main/res/values/text_operators.xml (100%) rename {android-app => app}/src/main/res/values/text_preferences.xml (100%) rename {android-app => app}/src/main/res/values/text_release_notes.xml (100%) rename {android-app => app}/src/main/res/values/text_strings.xml (100%) rename {android-app => app}/src/main/res/values/text_vars.xml (100%) rename {android-app => app}/src/main/res/values/text_wizard.xml (100%) rename {android-app => app}/src/main/res/values/theme.xml (100%) rename {android-app => app}/src/main/res/values/theme_material.xml (100%) rename {android-app => app}/src/main/res/values/theme_material_light.xml (100%) rename {android-app => app}/src/main/res/values/theme_metro_blue.xml (100%) rename {android-app => app}/src/main/res/values/theme_metro_green.xml (100%) rename {android-app => app}/src/main/res/values/theme_metro_purple.xml (100%) rename {android-app => app}/src/main/res/values/theme_old_blue.xml (100%) rename {android-app => app}/src/main/res/values/theme_old_gray.xml (100%) rename {android-app => app}/src/main/res/values/theme_old_violet.xml (100%) rename {android-app => app}/src/main/res/values/vpi__attrs.xml (100%) rename {android-app => app}/src/main/res/values/vpi__defaults.xml (100%) rename {android-app => app}/src/main/res/xml/calculator_widget.xml (100%) rename {android-app => app}/src/main/res/xml/calculator_widget_info.xml (100%) rename {android-app => app}/src/main/res/xml/calculator_widget_info_3x3.xml (100%) rename {android-app => app}/src/main/res/xml/calculator_widget_info_3x4.xml (100%) rename {android-app => app}/src/main/res/xml/calculator_widget_info_4x4.xml (100%) rename {android-app => app}/src/main/res/xml/calculator_widget_info_4x5.xml (100%) rename {android-app => app}/src/main/res/xml/ga.xml (100%) rename {android-app => app}/src/main/res/xml/preferences.xml (100%) rename {android-app => app}/src/main/res/xml/preferences_appearance.xml (100%) rename {android-app => app}/src/main/res/xml/preferences_calculations.xml (100%) rename {android-app => app}/src/main/res/xml/preferences_onscreen.xml (100%) rename {android-app => app}/src/main/res/xml/preferences_other.xml (100%) rename {android-app => app}/src/main/res/xml/preferences_plot.xml (100%) rename {android-app => app}/src/main/res/xml/preferences_widget.xml (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_ar.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_cs.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_de.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_el.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_es.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_es_ES.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_fi.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_fr.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_it.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_ja.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_nl.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_pl.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_pt_BR.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_pt_PT.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_ru.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_tr.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_uk.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_vi.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_zh.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_zh_CN.properties (100%) rename {android-app => app}/src/main/resources/org/solovyev/android/calculator/messages_zh_TW.properties (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/AbstractCalculatorTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/CalculatorDisplayViewStateImplTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/CalculatorEditorImplTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/CalculatorEditorViewStateImplTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/CalculatorImplTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/CalculatorMessagesTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/CalculatorTestUtils.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/FromJsclSimplifyTextProcessorTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/history/CalculatorHistoryImplTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/jscl/FromJsclNumericTextProcessorTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/math/MathTypeTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/model/AndroidCalculatorEngineTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/model/ComparisonTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/model/EvaluateTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/model/FunctionsTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/model/NumeralBaseTest.java (100%) rename {android-app => app}/src/test/java/org/solovyev/android/calculator/model/ToJsclTextProcessorTest.java (100%) rename {android-app => app}/src/test/resources/org/solovyev/android/calculator/model/nb_table.csv (100%) diff --git a/android-app-tests/build.gradle b/app-tests/build.gradle similarity index 97% rename from android-app-tests/build.gradle rename to app-tests/build.gradle index 8ecf7445..8d805775 100644 --- a/android-app-tests/build.gradle +++ b/app-tests/build.gradle @@ -23,7 +23,7 @@ apply plugin: 'java' dependencies { - def app = project(':android-app') + def app = project(':app') compile app testCompile app.android.applicationVariants.toList().first().javaCompile.classpath diff --git a/android-app-tests/src/test/java/org/solovyev/android/AndroidNumeralBaseTest.java b/app-tests/src/test/java/org/solovyev/android/AndroidNumeralBaseTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/AndroidNumeralBaseTest.java rename to app-tests/src/test/java/org/solovyev/android/AndroidNumeralBaseTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/CalculatorTestRunner.java b/app-tests/src/test/java/org/solovyev/android/CalculatorTestRunner.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/CalculatorTestRunner.java rename to app-tests/src/test/java/org/solovyev/android/CalculatorTestRunner.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/AndroidCalculatorEditorViewTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/AndroidCalculatorEditorViewTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/AndroidCalculatorEditorViewTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/AndroidCalculatorEditorViewTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/CalculatorBroadcasterTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/CalculatorBroadcasterTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/CalculatorBroadcasterTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/CalculatorBroadcasterTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/CalculatorReceiverTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/CalculatorReceiverTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/CalculatorReceiverTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/CalculatorReceiverTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/CalculatorTestUtils.java b/app-tests/src/test/java/org/solovyev/android/calculator/CalculatorTestUtils.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/CalculatorTestUtils.java rename to app-tests/src/test/java/org/solovyev/android/calculator/CalculatorTestUtils.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/TextHighlighterTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/history/HistoryUtilsTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/history/HistoryUtilsTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/history/HistoryUtilsTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/history/HistoryUtilsTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/model/VarTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/model/VarTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/model/VarTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/model/VarTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/plot/CalculatorGraph2dViewTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/plot/CalculatorGraph2dViewTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/plot/CalculatorGraph2dViewTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/plot/CalculatorGraph2dViewTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/view/AngleUnitsButtonTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/view/AngleUnitsButtonTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/view/AngleUnitsButtonTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/view/AngleUnitsButtonTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/view/NumeralBasesButtonTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/view/NumeralBasesButtonTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/view/NumeralBasesButtonTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/view/NumeralBasesButtonTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardActivityTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardActivityTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardActivityTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardActivityTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/wizard/CalculatorWizardTest.java diff --git a/android-app-tests/src/test/java/org/solovyev/android/calculator/wizard/OnScreenCalculatorWizardStepTest.java b/app-tests/src/test/java/org/solovyev/android/calculator/wizard/OnScreenCalculatorWizardStepTest.java similarity index 100% rename from android-app-tests/src/test/java/org/solovyev/android/calculator/wizard/OnScreenCalculatorWizardStepTest.java rename to app-tests/src/test/java/org/solovyev/android/calculator/wizard/OnScreenCalculatorWizardStepTest.java diff --git a/android-app/build.gradle b/app/build.gradle similarity index 100% rename from android-app/build.gradle rename to app/build.gradle diff --git a/android-app/misc/doc/GoogleAdMobAdsSdk-4.3.1-javadocs.zip b/app/misc/doc/GoogleAdMobAdsSdk-4.3.1-javadocs.zip similarity index 100% rename from android-app/misc/doc/GoogleAdMobAdsSdk-4.3.1-javadocs.zip rename to app/misc/doc/GoogleAdMobAdsSdk-4.3.1-javadocs.zip diff --git a/android-app/misc/doc/achartengine-0.7.0-javadocs.zip b/app/misc/doc/achartengine-0.7.0-javadocs.zip similarity index 100% rename from android-app/misc/doc/achartengine-0.7.0-javadocs.zip rename to app/misc/doc/achartengine-0.7.0-javadocs.zip diff --git a/android-app/misc/libs/drag-button-1.0.aar b/app/misc/libs/drag-button-1.0.aar similarity index 100% rename from android-app/misc/libs/drag-button-1.0.aar rename to app/misc/libs/drag-button-1.0.aar diff --git a/android-app/misc/libs/plotter.aar b/app/misc/libs/plotter.aar similarity index 100% rename from android-app/misc/libs/plotter.aar rename to app/misc/libs/plotter.aar diff --git a/android-app/misc/other/prepare_avds.sh b/app/misc/other/prepare_avds.sh similarity index 100% rename from android-app/misc/other/prepare_avds.sh rename to app/misc/other/prepare_avds.sh diff --git a/android-app/misc/other/remove_avds.sh b/app/misc/other/remove_avds.sh similarity index 100% rename from android-app/misc/other/remove_avds.sh rename to app/misc/other/remove_avds.sh diff --git a/android-app/misc/other/take_screenshots.py b/app/misc/other/take_screenshots.py similarity index 100% rename from android-app/misc/other/take_screenshots.py rename to app/misc/other/take_screenshots.py diff --git a/android-app/misc/other/take_screenshots.sh b/app/misc/other/take_screenshots.sh similarity index 100% rename from android-app/misc/other/take_screenshots.sh rename to app/misc/other/take_screenshots.sh diff --git a/android-app/misc/other/take_screenshots2.sh b/app/misc/other/take_screenshots2.sh similarity index 100% rename from android-app/misc/other/take_screenshots2.sh rename to app/misc/other/take_screenshots2.sh diff --git a/android-app/misc/other/wait_device.py b/app/misc/other/wait_device.py similarity index 100% rename from android-app/misc/other/wait_device.py rename to app/misc/other/wait_device.py diff --git a/android-app/misc/res/calculatorpp/01_main_screen_port.png b/app/misc/res/calculatorpp/01_main_screen_port.png similarity index 100% rename from android-app/misc/res/calculatorpp/01_main_screen_port.png rename to app/misc/res/calculatorpp/01_main_screen_port.png diff --git a/android-app/misc/res/calculatorpp/01_main_screen_port_sm.png b/app/misc/res/calculatorpp/01_main_screen_port_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/01_main_screen_port_sm.png rename to app/misc/res/calculatorpp/01_main_screen_port_sm.png diff --git a/android-app/misc/res/calculatorpp/02_main_screen_land.png b/app/misc/res/calculatorpp/02_main_screen_land.png similarity index 100% rename from android-app/misc/res/calculatorpp/02_main_screen_land.png rename to app/misc/res/calculatorpp/02_main_screen_land.png diff --git a/android-app/misc/res/calculatorpp/03_main_screen_port_with_expression.png b/app/misc/res/calculatorpp/03_main_screen_port_with_expression.png similarity index 100% rename from android-app/misc/res/calculatorpp/03_main_screen_port_with_expression.png rename to app/misc/res/calculatorpp/03_main_screen_port_with_expression.png diff --git a/android-app/misc/res/calculatorpp/04_plot_graph_menu.png b/app/misc/res/calculatorpp/04_plot_graph_menu.png similarity index 100% rename from android-app/misc/res/calculatorpp/04_plot_graph_menu.png rename to app/misc/res/calculatorpp/04_plot_graph_menu.png diff --git a/android-app/misc/res/calculatorpp/04_plot_graph_menu_sm.png b/app/misc/res/calculatorpp/04_plot_graph_menu_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/04_plot_graph_menu_sm.png rename to app/misc/res/calculatorpp/04_plot_graph_menu_sm.png diff --git a/android-app/misc/res/calculatorpp/05_graph_screen.png b/app/misc/res/calculatorpp/05_graph_screen.png similarity index 100% rename from android-app/misc/res/calculatorpp/05_graph_screen.png rename to app/misc/res/calculatorpp/05_graph_screen.png diff --git a/android-app/misc/res/calculatorpp/05_graph_screen_sm.png b/app/misc/res/calculatorpp/05_graph_screen_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/05_graph_screen_sm.png rename to app/misc/res/calculatorpp/05_graph_screen_sm.png diff --git a/android-app/misc/res/calculatorpp/06_constants_screen.png b/app/misc/res/calculatorpp/06_constants_screen.png similarity index 100% rename from android-app/misc/res/calculatorpp/06_constants_screen.png rename to app/misc/res/calculatorpp/06_constants_screen.png diff --git a/android-app/misc/res/calculatorpp/06_constants_screen_sm.png b/app/misc/res/calculatorpp/06_constants_screen_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/06_constants_screen_sm.png rename to app/misc/res/calculatorpp/06_constants_screen_sm.png diff --git a/android-app/misc/res/calculatorpp/07_constant_create_dialog.png b/app/misc/res/calculatorpp/07_constant_create_dialog.png similarity index 100% rename from android-app/misc/res/calculatorpp/07_constant_create_dialog.png rename to app/misc/res/calculatorpp/07_constant_create_dialog.png diff --git a/android-app/misc/res/calculatorpp/08_constants_context_menu.png b/app/misc/res/calculatorpp/08_constants_context_menu.png similarity index 100% rename from android-app/misc/res/calculatorpp/08_constants_context_menu.png rename to app/misc/res/calculatorpp/08_constants_context_menu.png diff --git a/android-app/misc/res/calculatorpp/09_functions_screen.png b/app/misc/res/calculatorpp/09_functions_screen.png similarity index 100% rename from android-app/misc/res/calculatorpp/09_functions_screen.png rename to app/misc/res/calculatorpp/09_functions_screen.png diff --git a/android-app/misc/res/calculatorpp/09_functions_screen_sm.png b/app/misc/res/calculatorpp/09_functions_screen_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/09_functions_screen_sm.png rename to app/misc/res/calculatorpp/09_functions_screen_sm.png diff --git a/android-app/misc/res/calculatorpp/10_history_screen.png b/app/misc/res/calculatorpp/10_history_screen.png similarity index 100% rename from android-app/misc/res/calculatorpp/10_history_screen.png rename to app/misc/res/calculatorpp/10_history_screen.png diff --git a/android-app/misc/res/calculatorpp/10_history_screen_sm.png b/app/misc/res/calculatorpp/10_history_screen_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/10_history_screen_sm.png rename to app/misc/res/calculatorpp/10_history_screen_sm.png diff --git a/android-app/misc/res/calculatorpp/11_history_item_context_menu.png b/app/misc/res/calculatorpp/11_history_item_context_menu.png similarity index 100% rename from android-app/misc/res/calculatorpp/11_history_item_context_menu.png rename to app/misc/res/calculatorpp/11_history_item_context_menu.png diff --git a/android-app/misc/res/calculatorpp/12_saved_history_tab.png b/app/misc/res/calculatorpp/12_saved_history_tab.png similarity index 100% rename from android-app/misc/res/calculatorpp/12_saved_history_tab.png rename to app/misc/res/calculatorpp/12_saved_history_tab.png diff --git a/android-app/misc/res/calculatorpp/13_saved_history_item_context_menu.png b/app/misc/res/calculatorpp/13_saved_history_item_context_menu.png similarity index 100% rename from android-app/misc/res/calculatorpp/13_saved_history_item_context_menu.png rename to app/misc/res/calculatorpp/13_saved_history_item_context_menu.png diff --git a/android-app/misc/res/calculatorpp/14_about_screen.png b/app/misc/res/calculatorpp/14_about_screen.png similarity index 100% rename from android-app/misc/res/calculatorpp/14_about_screen.png rename to app/misc/res/calculatorpp/14_about_screen.png diff --git a/android-app/misc/res/calculatorpp/14_about_screen_sm.png b/app/misc/res/calculatorpp/14_about_screen_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/14_about_screen_sm.png rename to app/misc/res/calculatorpp/14_about_screen_sm.png diff --git a/android-app/misc/res/calculatorpp/15_release_notes_tab.png b/app/misc/res/calculatorpp/15_release_notes_tab.png similarity index 100% rename from android-app/misc/res/calculatorpp/15_release_notes_tab.png rename to app/misc/res/calculatorpp/15_release_notes_tab.png diff --git a/android-app/misc/res/calculatorpp/16_help_screen.png b/app/misc/res/calculatorpp/16_help_screen.png similarity index 100% rename from android-app/misc/res/calculatorpp/16_help_screen.png rename to app/misc/res/calculatorpp/16_help_screen.png diff --git a/android-app/misc/res/calculatorpp/16_help_screen_sm.png b/app/misc/res/calculatorpp/16_help_screen_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/16_help_screen_sm.png rename to app/misc/res/calculatorpp/16_help_screen_sm.png diff --git a/android-app/misc/res/calculatorpp/17_hints_tab.png b/app/misc/res/calculatorpp/17_hints_tab.png similarity index 100% rename from android-app/misc/res/calculatorpp/17_hints_tab.png rename to app/misc/res/calculatorpp/17_hints_tab.png diff --git a/android-app/misc/res/calculatorpp/18_preferences.png b/app/misc/res/calculatorpp/18_preferences.png similarity index 100% rename from android-app/misc/res/calculatorpp/18_preferences.png rename to app/misc/res/calculatorpp/18_preferences.png diff --git a/android-app/misc/res/calculatorpp/18_preferences_02.png b/app/misc/res/calculatorpp/18_preferences_02.png similarity index 100% rename from android-app/misc/res/calculatorpp/18_preferences_02.png rename to app/misc/res/calculatorpp/18_preferences_02.png diff --git a/android-app/misc/res/calculatorpp/18_preferences_03.png b/app/misc/res/calculatorpp/18_preferences_03.png similarity index 100% rename from android-app/misc/res/calculatorpp/18_preferences_03.png rename to app/misc/res/calculatorpp/18_preferences_03.png diff --git a/android-app/misc/res/calculatorpp/18_preferences_sm.png b/app/misc/res/calculatorpp/18_preferences_sm.png similarity index 100% rename from android-app/misc/res/calculatorpp/18_preferences_sm.png rename to app/misc/res/calculatorpp/18_preferences_sm.png diff --git a/android-app/misc/res/calculatorpp/plan.png b/app/misc/res/calculatorpp/plan.png similarity index 100% rename from android-app/misc/res/calculatorpp/plan.png rename to app/misc/res/calculatorpp/plan.png diff --git a/android-app/misc/res/calculatorpp/plan.xcf b/app/misc/res/calculatorpp/plan.xcf similarity index 100% rename from android-app/misc/res/calculatorpp/plan.xcf rename to app/misc/res/calculatorpp/plan.xcf diff --git a/android-app/misc/res/description/description-de.txt b/app/misc/res/description/description-de.txt similarity index 100% rename from android-app/misc/res/description/description-de.txt rename to app/misc/res/description/description-de.txt diff --git a/android-app/misc/res/description/description-es-ES.txt b/app/misc/res/description/description-es-ES.txt similarity index 100% rename from android-app/misc/res/description/description-es-ES.txt rename to app/misc/res/description/description-es-ES.txt diff --git a/android-app/misc/res/description/description-fr.txt b/app/misc/res/description/description-fr.txt similarity index 100% rename from android-app/misc/res/description/description-fr.txt rename to app/misc/res/description/description-fr.txt diff --git a/android-app/misc/res/description/description-it.txt b/app/misc/res/description/description-it.txt similarity index 100% rename from android-app/misc/res/description/description-it.txt rename to app/misc/res/description/description-it.txt diff --git a/android-app/misc/res/description/description-pl.txt b/app/misc/res/description/description-pl.txt similarity index 100% rename from android-app/misc/res/description/description-pl.txt rename to app/misc/res/description/description-pl.txt diff --git a/android-app/misc/res/description/description-pt-BR.txt b/app/misc/res/description/description-pt-BR.txt similarity index 100% rename from android-app/misc/res/description/description-pt-BR.txt rename to app/misc/res/description/description-pt-BR.txt diff --git a/android-app/misc/res/description/description-ru.txt b/app/misc/res/description/description-ru.txt similarity index 100% rename from android-app/misc/res/description/description-ru.txt rename to app/misc/res/description/description-ru.txt diff --git a/android-app/misc/res/description/description-short-ru.txt b/app/misc/res/description/description-short-ru.txt similarity index 100% rename from android-app/misc/res/description/description-short-ru.txt rename to app/misc/res/description/description-short-ru.txt diff --git a/android-app/misc/res/description/description-short.txt b/app/misc/res/description/description-short.txt similarity index 100% rename from android-app/misc/res/description/description-short.txt rename to app/misc/res/description/description-short.txt diff --git a/android-app/misc/res/description/description-tr.txt b/app/misc/res/description/description-tr.txt similarity index 100% rename from android-app/misc/res/description/description-tr.txt rename to app/misc/res/description/description-tr.txt diff --git a/android-app/misc/res/description/description-vi.txt b/app/misc/res/description/description-vi.txt similarity index 100% rename from android-app/misc/res/description/description-vi.txt rename to app/misc/res/description/description-vi.txt diff --git a/android-app/misc/res/description/description-zh-CN.txt b/app/misc/res/description/description-zh-CN.txt similarity index 100% rename from android-app/misc/res/description/description-zh-CN.txt rename to app/misc/res/description/description-zh-CN.txt diff --git a/android-app/misc/res/description/description-zh-TW.txt b/app/misc/res/description/description-zh-TW.txt similarity index 100% rename from android-app/misc/res/description/description-zh-TW.txt rename to app/misc/res/description/description-zh-TW.txt diff --git a/android-app/misc/res/description/description.txt b/app/misc/res/description/description.txt similarity index 100% rename from android-app/misc/res/description/description.txt rename to app/misc/res/description/description.txt diff --git a/android-app/misc/res/icon-green.png b/app/misc/res/icon-green.png similarity index 100% rename from android-app/misc/res/icon-green.png rename to app/misc/res/icon-green.png diff --git a/android-app/misc/res/icon-hi-res.png b/app/misc/res/icon-hi-res.png similarity index 100% rename from android-app/misc/res/icon-hi-res.png rename to app/misc/res/icon-hi-res.png diff --git a/android-app/misc/res/icon-promo.png b/app/misc/res/icon-promo.png similarity index 100% rename from android-app/misc/res/icon-promo.png rename to app/misc/res/icon-promo.png diff --git a/android-app/misc/res/icon.png b/app/misc/res/icon.png similarity index 100% rename from android-app/misc/res/icon.png rename to app/misc/res/icon.png diff --git a/android-app/misc/res/icon144.png b/app/misc/res/icon144.png similarity index 100% rename from android-app/misc/res/icon144.png rename to app/misc/res/icon144.png diff --git a/android-app/misc/res/icon48.png b/app/misc/res/icon48.png similarity index 100% rename from android-app/misc/res/icon48.png rename to app/misc/res/icon48.png diff --git a/android-app/misc/res/icon512.png b/app/misc/res/icon512.png similarity index 100% rename from android-app/misc/res/icon512.png rename to app/misc/res/icon512.png diff --git a/android-app/misc/res/icon72.png b/app/misc/res/icon72.png similarity index 100% rename from android-app/misc/res/icon72.png rename to app/misc/res/icon72.png diff --git a/android-app/misc/res/icon96.png b/app/misc/res/icon96.png similarity index 100% rename from android-app/misc/res/icon96.png rename to app/misc/res/icon96.png diff --git a/android-app/misc/res/icon_onscreen144.png b/app/misc/res/icon_onscreen144.png similarity index 100% rename from android-app/misc/res/icon_onscreen144.png rename to app/misc/res/icon_onscreen144.png diff --git a/android-app/misc/res/icon_onscreen48.png b/app/misc/res/icon_onscreen48.png similarity index 100% rename from android-app/misc/res/icon_onscreen48.png rename to app/misc/res/icon_onscreen48.png diff --git a/android-app/misc/res/icon_onscreen512.png b/app/misc/res/icon_onscreen512.png similarity index 100% rename from android-app/misc/res/icon_onscreen512.png rename to app/misc/res/icon_onscreen512.png diff --git a/android-app/misc/res/icon_onscreen72.png b/app/misc/res/icon_onscreen72.png similarity index 100% rename from android-app/misc/res/icon_onscreen72.png rename to app/misc/res/icon_onscreen72.png diff --git a/android-app/misc/res/icon_onscreen96.png b/app/misc/res/icon_onscreen96.png similarity index 100% rename from android-app/misc/res/icon_onscreen96.png rename to app/misc/res/icon_onscreen96.png diff --git a/android-app/misc/res/kb_facebook.png b/app/misc/res/kb_facebook.png similarity index 100% rename from android-app/misc/res/kb_facebook.png rename to app/misc/res/kb_facebook.png diff --git a/android-app/misc/res/kb_facebook_icon.png b/app/misc/res/kb_facebook_icon.png similarity index 100% rename from android-app/misc/res/kb_facebook_icon.png rename to app/misc/res/kb_facebook_icon.png diff --git a/android-app/misc/res/logo-admob.png b/app/misc/res/logo-admob.png similarity index 100% rename from android-app/misc/res/logo-admob.png rename to app/misc/res/logo-admob.png diff --git a/android-app/misc/res/logo-scaled.png b/app/misc/res/logo-scaled.png similarity index 100% rename from android-app/misc/res/logo-scaled.png rename to app/misc/res/logo-scaled.png diff --git a/android-app/misc/res/logo-small.png b/app/misc/res/logo-small.png similarity index 100% rename from android-app/misc/res/logo-small.png rename to app/misc/res/logo-small.png diff --git a/android-app/misc/res/logo.cdr b/app/misc/res/logo.cdr similarity index 100% rename from android-app/misc/res/logo.cdr rename to app/misc/res/logo.cdr diff --git a/android-app/misc/res/logo.png b/app/misc/res/logo.png similarity index 100% rename from android-app/misc/res/logo.png rename to app/misc/res/logo.png diff --git a/android-app/misc/res/widget.png b/app/misc/res/widget.png similarity index 100% rename from android-app/misc/res/widget.png rename to app/misc/res/widget.png diff --git a/android-app/misc/res/work/Backup_of_logo.cdr b/app/misc/res/work/Backup_of_logo.cdr similarity index 100% rename from android-app/misc/res/work/Backup_of_logo.cdr rename to app/misc/res/work/Backup_of_logo.cdr diff --git a/android-app/misc/res/work/header.png b/app/misc/res/work/header.png similarity index 100% rename from android-app/misc/res/work/header.png rename to app/misc/res/work/header.png diff --git a/android-app/misc/res/work/header_bg.png b/app/misc/res/work/header_bg.png similarity index 100% rename from android-app/misc/res/work/header_bg.png rename to app/misc/res/work/header_bg.png diff --git a/android-app/misc/res/work/header_sm.png b/app/misc/res/work/header_sm.png similarity index 100% rename from android-app/misc/res/work/header_sm.png rename to app/misc/res/work/header_sm.png diff --git a/android-app/misc/res/work/heart_original.png b/app/misc/res/work/heart_original.png similarity index 100% rename from android-app/misc/res/work/heart_original.png rename to app/misc/res/work/heart_original.png diff --git a/android-app/misc/res/work/icon.png b/app/misc/res/work/icon.png similarity index 100% rename from android-app/misc/res/work/icon.png rename to app/misc/res/work/icon.png diff --git a/android-app/misc/res/work/icon_favicon_light_blue.ico b/app/misc/res/work/icon_favicon_light_blue.ico similarity index 100% rename from android-app/misc/res/work/icon_favicon_light_blue.ico rename to app/misc/res/work/icon_favicon_light_blue.ico diff --git a/android-app/misc/res/work/icon_favicon_light_blue.png b/app/misc/res/work/icon_favicon_light_blue.png similarity index 100% rename from android-app/misc/res/work/icon_favicon_light_blue.png rename to app/misc/res/work/icon_favicon_light_blue.png diff --git a/android-app/misc/res/work/icon_favicon_purple.ico b/app/misc/res/work/icon_favicon_purple.ico similarity index 100% rename from android-app/misc/res/work/icon_favicon_purple.ico rename to app/misc/res/work/icon_favicon_purple.ico diff --git a/android-app/misc/res/work/icon_small.png b/app/misc/res/work/icon_small.png similarity index 100% rename from android-app/misc/res/work/icon_small.png rename to app/misc/res/work/icon_small.png diff --git a/android-app/misc/res/work/log11o.psd b/app/misc/res/work/log11o.psd similarity index 100% rename from android-app/misc/res/work/log11o.psd rename to app/misc/res/work/log11o.psd diff --git a/android-app/misc/res/work/logo.cdr b/app/misc/res/work/logo.cdr similarity index 100% rename from android-app/misc/res/work/logo.cdr rename to app/misc/res/work/logo.cdr diff --git a/android-app/misc/res/work/logo.png b/app/misc/res/work/logo.png similarity index 100% rename from android-app/misc/res/work/logo.png rename to app/misc/res/work/logo.png diff --git a/android-app/misc/res/work/logoFULL copy.png b/app/misc/res/work/logoFULL copy.png similarity index 100% rename from android-app/misc/res/work/logoFULL copy.png rename to app/misc/res/work/logoFULL copy.png diff --git a/android-app/misc/res/work/logoFULL.pdf b/app/misc/res/work/logoFULL.pdf similarity index 100% rename from android-app/misc/res/work/logoFULL.pdf rename to app/misc/res/work/logoFULL.pdf diff --git a/android-app/misc/res/work/logoFULL.png b/app/misc/res/work/logoFULL.png similarity index 100% rename from android-app/misc/res/work/logoFULL.png rename to app/misc/res/work/logoFULL.png diff --git a/android-app/misc/res/work/logoFULL_banner.png b/app/misc/res/work/logoFULL_banner.png similarity index 100% rename from android-app/misc/res/work/logoFULL_banner.png rename to app/misc/res/work/logoFULL_banner.png diff --git a/android-app/misc/res/work/logoFULL_small.png b/app/misc/res/work/logoFULL_small.png similarity index 100% rename from android-app/misc/res/work/logoFULL_small.png rename to app/misc/res/work/logoFULL_small.png diff --git a/android-app/misc/res/work/logo_black.png b/app/misc/res/work/logo_black.png similarity index 100% rename from android-app/misc/res/work/logo_black.png rename to app/misc/res/work/logo_black.png diff --git a/android-app/misc/res/work/logo_blue.png b/app/misc/res/work/logo_blue.png similarity index 100% rename from android-app/misc/res/work/logo_blue.png rename to app/misc/res/work/logo_blue.png diff --git a/android-app/misc/res/work/logo_light_blue.png b/app/misc/res/work/logo_light_blue.png similarity index 100% rename from android-app/misc/res/work/logo_light_blue.png rename to app/misc/res/work/logo_light_blue.png diff --git a/android-app/misc/res/work/logo_purple.png b/app/misc/res/work/logo_purple.png similarity index 100% rename from android-app/misc/res/work/logo_purple.png rename to app/misc/res/work/logo_purple.png diff --git a/android-app/misc/res/work/promo_logo.png b/app/misc/res/work/promo_logo.png similarity index 100% rename from android-app/misc/res/work/promo_logo.png rename to app/misc/res/work/promo_logo.png diff --git a/android-app/misc/res/work/text_logo.png b/app/misc/res/work/text_logo.png similarity index 100% rename from android-app/misc/res/work/text_logo.png rename to app/misc/res/work/text_logo.png diff --git a/android-app/misc/res/work/text_logo_blue.png b/app/misc/res/work/text_logo_blue.png similarity index 100% rename from android-app/misc/res/work/text_logo_blue.png rename to app/misc/res/work/text_logo_blue.png diff --git a/android-app/misc/res/work/text_logo_light_blue.png b/app/misc/res/work/text_logo_light_blue.png similarity index 100% rename from android-app/misc/res/work/text_logo_light_blue.png rename to app/misc/res/work/text_logo_light_blue.png diff --git a/android-app/misc/res/work/text_logo_light_blue_cpp_forum.png b/app/misc/res/work/text_logo_light_blue_cpp_forum.png similarity index 100% rename from android-app/misc/res/work/text_logo_light_blue_cpp_forum.png rename to app/misc/res/work/text_logo_light_blue_cpp_forum.png diff --git a/android-app/misc/res/work/text_logo_purple.png b/app/misc/res/work/text_logo_purple.png similarity index 100% rename from android-app/misc/res/work/text_logo_purple.png rename to app/misc/res/work/text_logo_purple.png diff --git a/android-app/misc/src/achartengine-0.7.0.jar b/app/misc/src/achartengine-0.7.0.jar similarity index 100% rename from android-app/misc/src/achartengine-0.7.0.jar rename to app/misc/src/achartengine-0.7.0.jar diff --git a/android-app/misc/src/bsh.jar b/app/misc/src/bsh.jar similarity index 100% rename from android-app/misc/src/bsh.jar rename to app/misc/src/bsh.jar diff --git a/android-app/proguard-debug.cfg b/app/proguard-debug.cfg similarity index 100% rename from android-app/proguard-debug.cfg rename to app/proguard-debug.cfg diff --git a/android-app/proguard.cfg b/app/proguard.cfg similarity index 100% rename from android-app/proguard.cfg rename to app/proguard.cfg diff --git a/android-app/project.properties b/app/project.properties similarity index 100% rename from android-app/project.properties rename to app/project.properties diff --git a/android-app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml similarity index 100% rename from android-app/src/main/AndroidManifest.xml rename to app/src/main/AndroidManifest.xml diff --git a/android-app/src/main/assets/fonts/Roboto-Regular.ttf b/app/src/main/assets/fonts/Roboto-Regular.ttf similarity index 100% rename from android-app/src/main/assets/fonts/Roboto-Regular.ttf rename to app/src/main/assets/fonts/Roboto-Regular.ttf diff --git a/android-app/src/main/java/com/viewpagerindicator/CirclePageIndicator.java b/app/src/main/java/com/viewpagerindicator/CirclePageIndicator.java similarity index 100% rename from android-app/src/main/java/com/viewpagerindicator/CirclePageIndicator.java rename to app/src/main/java/com/viewpagerindicator/CirclePageIndicator.java diff --git a/android-app/src/main/java/com/viewpagerindicator/PageIndicator.java b/app/src/main/java/com/viewpagerindicator/PageIndicator.java similarity index 100% rename from android-app/src/main/java/com/viewpagerindicator/PageIndicator.java rename to app/src/main/java/com/viewpagerindicator/PageIndicator.java diff --git a/android-app/src/main/java/org/solovyev/android/Check.java b/app/src/main/java/org/solovyev/android/Check.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/Check.java rename to app/src/main/java/org/solovyev/android/Check.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AbstractCalculatorMathRegistry.java b/app/src/main/java/org/solovyev/android/calculator/AbstractCalculatorMathRegistry.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AbstractCalculatorMathRegistry.java rename to app/src/main/java/org/solovyev/android/calculator/AbstractCalculatorMathRegistry.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AbstractFixableError.java b/app/src/main/java/org/solovyev/android/calculator/AbstractFixableError.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AbstractFixableError.java rename to app/src/main/java/org/solovyev/android/calculator/AbstractFixableError.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AbstractNumberBuilder.java b/app/src/main/java/org/solovyev/android/calculator/AbstractNumberBuilder.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AbstractNumberBuilder.java rename to app/src/main/java/org/solovyev/android/calculator/AbstractNumberBuilder.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ActivityUi.java b/app/src/main/java/org/solovyev/android/calculator/ActivityUi.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ActivityUi.java rename to app/src/main/java/org/solovyev/android/calculator/ActivityUi.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AdView.java b/app/src/main/java/org/solovyev/android/calculator/AdView.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AdView.java rename to app/src/main/java/org/solovyev/android/calculator/AdView.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculator.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculator.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculator.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculator.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorClipboard.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorClipboard.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorClipboard.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorClipboard.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorDisplayView.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorDisplayView.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorDisplayView.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorDisplayView.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorKeyboard.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorKeyboard.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorKeyboard.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorKeyboard.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorLogger.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorLogger.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorLogger.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorLogger.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorNotifier.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorPreferenceService.java b/app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorPreferenceService.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorPreferenceService.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidCalculatorPreferenceService.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidFunctionCategory.java b/app/src/main/java/org/solovyev/android/calculator/AndroidFunctionCategory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidFunctionCategory.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidFunctionCategory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidNumeralBase.java b/app/src/main/java/org/solovyev/android/calculator/AndroidNumeralBase.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidNumeralBase.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidNumeralBase.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidOperatorCategory.java b/app/src/main/java/org/solovyev/android/calculator/AndroidOperatorCategory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidOperatorCategory.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidOperatorCategory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java b/app/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java rename to app/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/App.java b/app/src/main/java/org/solovyev/android/calculator/App.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/App.java rename to app/src/main/java/org/solovyev/android/calculator/App.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/BaseActivity.java b/app/src/main/java/org/solovyev/android/calculator/BaseActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/BaseActivity.java rename to app/src/main/java/org/solovyev/android/calculator/BaseActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/BaseUi.java b/app/src/main/java/org/solovyev/android/calculator/BaseUi.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/BaseUi.java rename to app/src/main/java/org/solovyev/android/calculator/BaseUi.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ButtonOnClickListener.java b/app/src/main/java/org/solovyev/android/calculator/ButtonOnClickListener.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ButtonOnClickListener.java rename to app/src/main/java/org/solovyev/android/calculator/ButtonOnClickListener.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/Calculator.java b/app/src/main/java/org/solovyev/android/calculator/Calculator.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/Calculator.java rename to app/src/main/java/org/solovyev/android/calculator/Calculator.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorActivityLauncher.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorApplication.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorApplication.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorApplication.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorApplication.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorBroadcaster.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorBroadcaster.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorBroadcaster.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorBroadcaster.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorButton.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorButton.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorButton.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorButton.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorButtons.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorButtons.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorButtons.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorButtons.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorClipboard.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorClipboard.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorClipboard.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorClipboard.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventData.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventData.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventDataImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventDataImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventDataImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorConversionEventDataImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDialogActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplay.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplay.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplay.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplay.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventData.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventData.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventDataImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventDataImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventDataImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayChangeEventDataImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayMenuItem.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayMenuItem.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayMenuItem.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayMenuItem.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayOnClickListener.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayOnClickListener.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayOnClickListener.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayOnClickListener.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayView.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayView.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayView.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayView.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewState.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewState.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewState.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewState.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewStateImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewStateImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewStateImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorDisplayViewStateImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditor.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditor.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorChangeEventData.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditorChangeEventData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorChangeEventData.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditorChangeEventData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditorFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditorImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditorImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorView.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditorView.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorView.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditorView.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewState.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewState.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewState.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewState.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewStateImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewStateImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewStateImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEditorViewStateImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEngine.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEngine.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEngine.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEngine.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEngineControl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEngineControl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEngineControl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEngineControl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEngineImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEngineImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEngineImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEngineImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEvalException.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEvalException.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEvalException.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEvalException.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventData.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventData.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventDataImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventDataImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventDataImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEvaluationEventDataImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventContainer.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEventContainer.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventContainer.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEventContainer.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventData.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEventData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventData.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEventData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventDataImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEventDataImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventDataImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEventDataImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventHolder.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEventHolder.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventHolder.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEventHolder.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventListener.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEventListener.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventListener.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEventListener.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventType.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorEventType.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorEventType.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorEventType.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFailure.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorFailure.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorFailure.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorFailure.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFailureImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorFailureImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorFailureImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorFailureImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFixableError.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorFixableError.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorFixableError.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorFixableError.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFragment.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorFragment.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java index 75141ad2..906c33df 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java +++ b/app/src/main/java/org/solovyev/android/calculator/CalculatorFragmentType.java @@ -1,108 +1,108 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator; - -import android.support.v4.app.Fragment; - -import org.solovyev.android.calculator.about.CalculatorAboutFragment; -import org.solovyev.android.calculator.about.CalculatorReleaseNotesFragment; -import org.solovyev.android.calculator.history.HistoryFragment; -import org.solovyev.android.calculator.history.SavedHistoryFragment; -import org.solovyev.android.calculator.math.edit.CalculatorFunctionsFragment; -import org.solovyev.android.calculator.math.edit.CalculatorOperatorsFragment; -import org.solovyev.android.calculator.math.edit.CalculatorVarsFragment; -import org.solovyev.android.calculator.matrix.CalculatorMatrixEditFragment; -import org.solovyev.android.calculator.plot.CalculatorPlotFragment; -import org.solovyev.android.calculator.plot.CalculatorPlotFunctionSettingsActivity; -import org.solovyev.android.calculator.plot.CalculatorPlotFunctionsActivity; -import org.solovyev.android.calculator.plot.CalculatorPlotRangeActivity; -import org.solovyev.android.calculator.preferences.PurchaseDialogActivity; - -import javax.annotation.Nonnull; - -/** - * User: Solovyev_S - * Date: 03.10.12 - * Time: 11:30 - */ -public enum CalculatorFragmentType { - - editor(CalculatorEditorFragment.class, R.layout.cpp_app_editor, R.string.editor), - //display(CalculatorHistoryFragment.class, "history", R.layout.history_fragment, R.string.c_history), - //keyboard(CalculatorHistoryFragment.class, "history", R.layout.history_fragment, R.string.c_history), - history(HistoryFragment.class, R.layout.history_fragment, R.string.c_history), - saved_history(SavedHistoryFragment.class, R.layout.history_fragment, R.string.c_saved_history), - variables(CalculatorVarsFragment.class, R.layout.vars_fragment, R.string.c_vars), - functions(CalculatorFunctionsFragment.class, R.layout.math_entities_fragment, R.string.c_functions), - operators(CalculatorOperatorsFragment.class, R.layout.math_entities_fragment, R.string.c_operators), - plotter(CalculatorPlotFragment.class, R.layout.cpp_plotter_fragment, R.string.c_graph), - plotter_functions(CalculatorPlotFunctionsActivity.CalculatorPlotFunctionsFragment.class, R.layout.cpp_plot_functions_fragment, R.string.cpp_plot_functions), - plotter_function_settings(CalculatorPlotFunctionSettingsActivity.CalculatorPlotFunctionSettingsFragment.class, R.layout.cpp_plot_function_settings_fragment, R.string.cpp_plot_function_settings), - plotter_range(CalculatorPlotRangeActivity.CalculatorPlotRangeFragment.class, R.layout.cpp_plot_range_fragment, R.string.cpp_plot_range), - - purchase_dialog(PurchaseDialogActivity.PurchaseDialogFragment.class, R.layout.cpp_purchase_dialog_fragment, R.string.cpp_purchase_title), - - dialog(CalculatorDialogActivity.CalculatorDialogFragment.class, R.layout.cpp_dialog_fragment, R.string.cpp_message), - - about(CalculatorAboutFragment.class, R.layout.about_fragment, R.string.c_about), - - // todo serso: strings - matrix_edit(CalculatorMatrixEditFragment.class, R.layout.matrix_edit_fragment, R.string.c_release_notes), - release_notes(CalculatorReleaseNotesFragment.class, R.layout.release_notes_fragment, R.string.c_release_notes); - - private final int defaultLayoutId; - @Nonnull - private Class fragmentClass; - private int defaultTitleResId; - - private CalculatorFragmentType(@Nonnull Class fragmentClass, - int defaultLayoutId, - int defaultTitleResId) { - this.fragmentClass = fragmentClass; - this.defaultLayoutId = defaultLayoutId; - this.defaultTitleResId = defaultTitleResId; - } - - @Nonnull - public String getFragmentTag() { - return this.name(); - } - - public int getDefaultTitleResId() { - return defaultTitleResId; - } - - @Nonnull - public Class getFragmentClass() { - return fragmentClass; - } - - public int getDefaultLayoutId() { - return defaultLayoutId; - } - - @Nonnull - public String createSubFragmentTag(@Nonnull String subFragmentTag) { - return this.getFragmentTag() + "_" + subFragmentTag; - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator; + +import android.support.v4.app.Fragment; + +import org.solovyev.android.calculator.about.CalculatorAboutFragment; +import org.solovyev.android.calculator.about.CalculatorReleaseNotesFragment; +import org.solovyev.android.calculator.history.HistoryFragment; +import org.solovyev.android.calculator.history.SavedHistoryFragment; +import org.solovyev.android.calculator.math.edit.CalculatorFunctionsFragment; +import org.solovyev.android.calculator.math.edit.CalculatorOperatorsFragment; +import org.solovyev.android.calculator.math.edit.CalculatorVarsFragment; +import org.solovyev.android.calculator.matrix.CalculatorMatrixEditFragment; +import org.solovyev.android.calculator.plot.CalculatorPlotFragment; +import org.solovyev.android.calculator.plot.CalculatorPlotFunctionSettingsActivity; +import org.solovyev.android.calculator.plot.CalculatorPlotFunctionsActivity; +import org.solovyev.android.calculator.plot.CalculatorPlotRangeActivity; +import org.solovyev.android.calculator.preferences.PurchaseDialogActivity; + +import javax.annotation.Nonnull; + +/** + * User: Solovyev_S + * Date: 03.10.12 + * Time: 11:30 + */ +public enum CalculatorFragmentType { + + editor(CalculatorEditorFragment.class, R.layout.cpp_app_editor, R.string.editor), + //display(CalculatorHistoryFragment.class, "history", R.layout.history_fragment, R.string.c_history), + //keyboard(CalculatorHistoryFragment.class, "history", R.layout.history_fragment, R.string.c_history), + history(HistoryFragment.class, R.layout.history_fragment, R.string.c_history), + saved_history(SavedHistoryFragment.class, R.layout.history_fragment, R.string.c_saved_history), + variables(CalculatorVarsFragment.class, R.layout.vars_fragment, R.string.c_vars), + functions(CalculatorFunctionsFragment.class, R.layout.math_entities_fragment, R.string.c_functions), + operators(CalculatorOperatorsFragment.class, R.layout.math_entities_fragment, R.string.c_operators), + plotter(CalculatorPlotFragment.class, R.layout.cpp_plotter_fragment, R.string.c_graph), + plotter_functions(CalculatorPlotFunctionsActivity.CalculatorPlotFunctionsFragment.class, R.layout.cpp_plot_functions_fragment, R.string.cpp_plot_functions), + plotter_function_settings(CalculatorPlotFunctionSettingsActivity.CalculatorPlotFunctionSettingsFragment.class, R.layout.cpp_plot_function_settings_fragment, R.string.cpp_plot_function_settings), + plotter_range(CalculatorPlotRangeActivity.CalculatorPlotRangeFragment.class, R.layout.cpp_plot_range_fragment, R.string.cpp_plot_range), + + purchase_dialog(PurchaseDialogActivity.PurchaseDialogFragment.class, R.layout.cpp_purchase_dialog_fragment, R.string.cpp_purchase_title), + + dialog(CalculatorDialogActivity.CalculatorDialogFragment.class, R.layout.cpp_dialog_fragment, R.string.cpp_message), + + about(CalculatorAboutFragment.class, R.layout.about_fragment, R.string.c_about), + + // todo serso: strings + matrix_edit(CalculatorMatrixEditFragment.class, R.layout.matrix_edit_fragment, R.string.c_release_notes), + release_notes(CalculatorReleaseNotesFragment.class, R.layout.release_notes_fragment, R.string.c_release_notes); + + private final int defaultLayoutId; + @Nonnull + private Class fragmentClass; + private int defaultTitleResId; + + private CalculatorFragmentType(@Nonnull Class fragmentClass, + int defaultLayoutId, + int defaultTitleResId) { + this.fragmentClass = fragmentClass; + this.defaultLayoutId = defaultLayoutId; + this.defaultTitleResId = defaultTitleResId; + } + + @Nonnull + public String getFragmentTag() { + return this.name(); + } + + public int getDefaultTitleResId() { + return defaultTitleResId; + } + + @Nonnull + public Class getFragmentClass() { + return fragmentClass; + } + + public int getDefaultLayoutId() { + return defaultLayoutId; + } + + @Nonnull + public String createSubFragmentTag(@Nonnull String subFragmentTag) { + return this.getFragmentTag() + "_" + subFragmentTag; + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorInput.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorInput.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorInput.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorInput.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorInputImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorInputImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorInputImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorInputImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboard.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboard.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboard.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboard.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardFragment.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardFragment.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorKeyboardImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java index 79100c39..77648c5e 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/CalculatorListFragment.java @@ -1,109 +1,109 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator; - -import android.app.Activity; -import android.os.Bundle; -import android.support.v4.app.ListFragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -import javax.annotation.Nonnull; - -/** - * User: Solovyev_S - * Date: 03.10.12 - * Time: 14:18 - */ -public abstract class CalculatorListFragment extends ListFragment { - - @Nonnull - private final FragmentUi ui; - - protected CalculatorListFragment(int layoutResId, int titleResId) { - ui = CalculatorApplication.getInstance().createFragmentHelper(layoutResId, titleResId); - } - - protected CalculatorListFragment(@Nonnull CalculatorFragmentType fragmentType) { - ui = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId()); - } - - protected CalculatorListFragment(@Nonnull FragmentUi ui) { - this.ui = ui; - } - - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - ui.onCreate(this); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return ui.onCreateView(this, inflater, container); - } - - @Override - public void onViewCreated(View view, Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - - ui.onViewCreated(this, view); - } - - @Override - public void onResume() { - super.onResume(); - this.ui.onResume(this); - } - - @Override - public void onPause() { - this.ui.onPause(this); - super.onPause(); - } - - @Override - public void onDestroyView() { - ui.onDestroyView(this); - super.onDestroyView(); - } - - @Override - public void onDestroy() { - ui.onDestroy(this); - super.onDestroy(); - } - - @Override - public void onDetach() { - super.onDetach(); - } -} - +/* + * 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 + */ + +package org.solovyev.android.calculator; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.ListFragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import javax.annotation.Nonnull; + +/** + * User: Solovyev_S + * Date: 03.10.12 + * Time: 14:18 + */ +public abstract class CalculatorListFragment extends ListFragment { + + @Nonnull + private final FragmentUi ui; + + protected CalculatorListFragment(int layoutResId, int titleResId) { + ui = CalculatorApplication.getInstance().createFragmentHelper(layoutResId, titleResId); + } + + protected CalculatorListFragment(@Nonnull CalculatorFragmentType fragmentType) { + ui = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId()); + } + + protected CalculatorListFragment(@Nonnull FragmentUi ui) { + this.ui = ui; + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + ui.onCreate(this); + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + return ui.onCreateView(this, inflater, container); + } + + @Override + public void onViewCreated(View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + ui.onViewCreated(this, view); + } + + @Override + public void onResume() { + super.onResume(); + this.ui.onResume(this); + } + + @Override + public void onPause() { + this.ui.onPause(this); + super.onPause(); + } + + @Override + public void onDestroyView() { + ui.onDestroyView(this); + super.onDestroyView(); + } + + @Override + public void onDestroy() { + ui.onDestroy(this); + super.onDestroy(); + } + + @Override + public void onDetach() { + super.onDetach(); + } +} + diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorLocator.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorLocator.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorLocator.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorLocator.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorLogger.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorLogger.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorLogger.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorLogger.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorMathEngine.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorMathEngine.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorMathEngine.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorMathEngine.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorMathRegistry.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorMathRegistry.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorMathRegistry.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorMathRegistry.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java index 8d05335d..3c7d1172 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java +++ b/app/src/main/java/org/solovyev/android/calculator/CalculatorMenu.java @@ -1,99 +1,99 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator; - -import android.app.Activity; -import android.content.Context; -import android.util.Log; -import android.view.MenuItem; - -import org.solovyev.android.calculator.view.NumeralBaseConverterDialog; -import org.solovyev.android.menu.LabeledMenuItem; - -import javax.annotation.Nonnull; - -/** - * User: serso - * Date: 4/23/12 - * Time: 2:25 PM - */ -enum CalculatorMenu implements LabeledMenuItem { - - settings(R.string.c_settings) { - @Override - public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { - CalculatorActivityLauncher.showSettings(context); - } - }, - - history(R.string.c_history) { - @Override - public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { - CalculatorActivityLauncher.showHistory(context); - } - }, - - plotter(R.string.cpp_plotter) { - @Override - public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { - Locator.getInstance().getPlotter().plot(); - } - }, - - conversion_tool(R.string.c_conversion_tool) { - @Override - public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { - new NumeralBaseConverterDialog(null).show(context); - } - }, - - exit(R.string.c_exit) { - @Override - public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { - if (context instanceof Activity) { - ((Activity) context).finish(); - } else { - Log.e(CalculatorActivity.TAG, "Activity menu used with context"); - } - } - }, - - about(R.string.c_about) { - @Override - public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { - CalculatorActivityLauncher.showAbout(context); - } - }; - - private final int captionResId; - - private CalculatorMenu(int captionResId) { - this.captionResId = captionResId; - } - - @Nonnull - @Override - public String getCaption(@Nonnull Context context) { - return context.getString(captionResId); - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator; + +import android.app.Activity; +import android.content.Context; +import android.util.Log; +import android.view.MenuItem; + +import org.solovyev.android.calculator.view.NumeralBaseConverterDialog; +import org.solovyev.android.menu.LabeledMenuItem; + +import javax.annotation.Nonnull; + +/** + * User: serso + * Date: 4/23/12 + * Time: 2:25 PM + */ +enum CalculatorMenu implements LabeledMenuItem { + + settings(R.string.c_settings) { + @Override + public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { + CalculatorActivityLauncher.showSettings(context); + } + }, + + history(R.string.c_history) { + @Override + public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { + CalculatorActivityLauncher.showHistory(context); + } + }, + + plotter(R.string.cpp_plotter) { + @Override + public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { + Locator.getInstance().getPlotter().plot(); + } + }, + + conversion_tool(R.string.c_conversion_tool) { + @Override + public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { + new NumeralBaseConverterDialog(null).show(context); + } + }, + + exit(R.string.c_exit) { + @Override + public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { + if (context instanceof Activity) { + ((Activity) context).finish(); + } else { + Log.e(CalculatorActivity.TAG, "Activity menu used with context"); + } + } + }, + + about(R.string.c_about) { + @Override + public void onClick(@Nonnull MenuItem data, @Nonnull Context context) { + CalculatorActivityLauncher.showAbout(context); + } + }; + + private final int captionResId; + + private CalculatorMenu(int captionResId) { + this.captionResId = captionResId; + } + + @Nonnull + @Override + public String getCaption(@Nonnull Context context) { + return context.getString(captionResId); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorMessage.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorMessage.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorMessage.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorMessage.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorMessages.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorMessages.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorMessages.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorMessages.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorNotifier.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorNotifier.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorNotifier.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorNotifier.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorOperatorsMathRegistry.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorOperatorsMathRegistry.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorOperatorsMathRegistry.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorOperatorsMathRegistry.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorOutput.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorOutput.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorOutput.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorOutput.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorOutputImpl.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorOutputImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorOutputImpl.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorOutputImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorParseException.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorParseException.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorParseException.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorParseException.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorPreferenceService.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorPreferenceService.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorPreferenceService.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorPreferenceService.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorReceiver.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorReceiver.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorReceiver.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorReceiver.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorSecurity.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorSecurity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorSecurity.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorSecurity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorSpecialButton.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorSpecialButton.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorSpecialButton.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorSpecialButton.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorUtils.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorUtils.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorUtils.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorUtils.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java rename to app/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/Change.java b/app/src/main/java/org/solovyev/android/calculator/Change.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/Change.java rename to app/src/main/java/org/solovyev/android/calculator/Change.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ChangeImpl.java b/app/src/main/java/org/solovyev/android/calculator/ChangeImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ChangeImpl.java rename to app/src/main/java/org/solovyev/android/calculator/ChangeImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CharacterAtPositionFinder.java b/app/src/main/java/org/solovyev/android/calculator/CharacterAtPositionFinder.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CharacterAtPositionFinder.java rename to app/src/main/java/org/solovyev/android/calculator/CharacterAtPositionFinder.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ConversionFailure.java b/app/src/main/java/org/solovyev/android/calculator/ConversionFailure.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ConversionFailure.java rename to app/src/main/java/org/solovyev/android/calculator/ConversionFailure.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ConversionFailureImpl.java b/app/src/main/java/org/solovyev/android/calculator/ConversionFailureImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ConversionFailureImpl.java rename to app/src/main/java/org/solovyev/android/calculator/ConversionFailureImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ConversionMenuItem.java b/app/src/main/java/org/solovyev/android/calculator/ConversionMenuItem.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ConversionMenuItem.java rename to app/src/main/java/org/solovyev/android/calculator/ConversionMenuItem.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/CursorDragProcessor.java b/app/src/main/java/org/solovyev/android/calculator/CursorDragProcessor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/CursorDragProcessor.java rename to app/src/main/java/org/solovyev/android/calculator/CursorDragProcessor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/DialogData.java b/app/src/main/java/org/solovyev/android/calculator/DialogData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/DialogData.java rename to app/src/main/java/org/solovyev/android/calculator/DialogData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/DigitButtonDragProcessor.java b/app/src/main/java/org/solovyev/android/calculator/DigitButtonDragProcessor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/DigitButtonDragProcessor.java rename to app/src/main/java/org/solovyev/android/calculator/DigitButtonDragProcessor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/DummyCalculatorClipboard.java b/app/src/main/java/org/solovyev/android/calculator/DummyCalculatorClipboard.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/DummyCalculatorClipboard.java rename to app/src/main/java/org/solovyev/android/calculator/DummyCalculatorClipboard.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/DummyCalculatorNotifier.java b/app/src/main/java/org/solovyev/android/calculator/DummyCalculatorNotifier.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/DummyCalculatorNotifier.java rename to app/src/main/java/org/solovyev/android/calculator/DummyCalculatorNotifier.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/Editor.java b/app/src/main/java/org/solovyev/android/calculator/Editor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/Editor.java rename to app/src/main/java/org/solovyev/android/calculator/Editor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/EmptyActivity.java b/app/src/main/java/org/solovyev/android/calculator/EmptyActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/EmptyActivity.java rename to app/src/main/java/org/solovyev/android/calculator/EmptyActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/EqualsDragProcessor.java b/app/src/main/java/org/solovyev/android/calculator/EqualsDragProcessor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/EqualsDragProcessor.java rename to app/src/main/java/org/solovyev/android/calculator/EqualsDragProcessor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/FixableError.java b/app/src/main/java/org/solovyev/android/calculator/FixableError.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/FixableError.java rename to app/src/main/java/org/solovyev/android/calculator/FixableError.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/FixableMessage.java b/app/src/main/java/org/solovyev/android/calculator/FixableMessage.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/FixableMessage.java rename to app/src/main/java/org/solovyev/android/calculator/FixableMessage.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/FixableMessagesDialog.java b/app/src/main/java/org/solovyev/android/calculator/FixableMessagesDialog.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/FixableMessagesDialog.java rename to app/src/main/java/org/solovyev/android/calculator/FixableMessagesDialog.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/FragmentUi.java b/app/src/main/java/org/solovyev/android/calculator/FragmentUi.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/FragmentUi.java rename to app/src/main/java/org/solovyev/android/calculator/FragmentUi.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/FunctionCategory.java b/app/src/main/java/org/solovyev/android/calculator/FunctionCategory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/FunctionCategory.java rename to app/src/main/java/org/solovyev/android/calculator/FunctionCategory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ListCalculatorEventContainer.java b/app/src/main/java/org/solovyev/android/calculator/ListCalculatorEventContainer.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ListCalculatorEventContainer.java rename to app/src/main/java/org/solovyev/android/calculator/ListCalculatorEventContainer.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/LiteNumberBuilder.java b/app/src/main/java/org/solovyev/android/calculator/LiteNumberBuilder.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/LiteNumberBuilder.java rename to app/src/main/java/org/solovyev/android/calculator/LiteNumberBuilder.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/Locator.java b/app/src/main/java/org/solovyev/android/calculator/Locator.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/Locator.java rename to app/src/main/java/org/solovyev/android/calculator/Locator.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/MathEntityDao.java b/app/src/main/java/org/solovyev/android/calculator/MathEntityDao.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/MathEntityDao.java rename to app/src/main/java/org/solovyev/android/calculator/MathEntityDao.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/MathEntityPersistenceContainer.java b/app/src/main/java/org/solovyev/android/calculator/MathEntityPersistenceContainer.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/MathEntityPersistenceContainer.java rename to app/src/main/java/org/solovyev/android/calculator/MathEntityPersistenceContainer.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/MathPersistenceEntity.java b/app/src/main/java/org/solovyev/android/calculator/MathPersistenceEntity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/MathPersistenceEntity.java rename to app/src/main/java/org/solovyev/android/calculator/MathPersistenceEntity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/MessageDialogData.java b/app/src/main/java/org/solovyev/android/calculator/MessageDialogData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/MessageDialogData.java rename to app/src/main/java/org/solovyev/android/calculator/MessageDialogData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/NumberBuilder.java b/app/src/main/java/org/solovyev/android/calculator/NumberBuilder.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/NumberBuilder.java rename to app/src/main/java/org/solovyev/android/calculator/NumberBuilder.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/NumeralBaseButtons.java b/app/src/main/java/org/solovyev/android/calculator/NumeralBaseButtons.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/NumeralBaseButtons.java rename to app/src/main/java/org/solovyev/android/calculator/NumeralBaseButtons.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/OperatorCategory.java b/app/src/main/java/org/solovyev/android/calculator/OperatorCategory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/OperatorCategory.java rename to app/src/main/java/org/solovyev/android/calculator/OperatorCategory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ParcelableDialogData.java b/app/src/main/java/org/solovyev/android/calculator/ParcelableDialogData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ParcelableDialogData.java rename to app/src/main/java/org/solovyev/android/calculator/ParcelableDialogData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/Preferences.java b/app/src/main/java/org/solovyev/android/calculator/Preferences.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/Preferences.java rename to app/src/main/java/org/solovyev/android/calculator/Preferences.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/PreparedExpression.java b/app/src/main/java/org/solovyev/android/calculator/PreparedExpression.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/PreparedExpression.java rename to app/src/main/java/org/solovyev/android/calculator/PreparedExpression.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/StringDialogData.java b/app/src/main/java/org/solovyev/android/calculator/StringDialogData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/StringDialogData.java rename to app/src/main/java/org/solovyev/android/calculator/StringDialogData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/SystemOutCalculatorLogger.java b/app/src/main/java/org/solovyev/android/calculator/SystemOutCalculatorLogger.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/SystemOutCalculatorLogger.java rename to app/src/main/java/org/solovyev/android/calculator/SystemOutCalculatorLogger.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ToJsclTextProcessor.java b/app/src/main/java/org/solovyev/android/calculator/ToJsclTextProcessor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ToJsclTextProcessor.java rename to app/src/main/java/org/solovyev/android/calculator/ToJsclTextProcessor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/VarCategory.java b/app/src/main/java/org/solovyev/android/calculator/VarCategory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/VarCategory.java rename to app/src/main/java/org/solovyev/android/calculator/VarCategory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/Vibrator.java b/app/src/main/java/org/solovyev/android/calculator/Vibrator.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/Vibrator.java rename to app/src/main/java/org/solovyev/android/calculator/Vibrator.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java b/app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java rename to app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java index 3785f188..8e828e3a 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java +++ b/app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutActivity.java @@ -1,47 +1,47 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.about; - -import android.os.Bundle; - -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.EmptyActivity; -import org.solovyev.android.calculator.R; - -import javax.annotation.Nullable; - -/** - * User: serso - * Date: 9/16/11 - * Time: 11:52 PM - */ -public class CalculatorAboutActivity extends EmptyActivity { - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - getUi().addTab(this, CalculatorFragmentType.about, null, R.id.main_layout); - getUi().addTab(this, CalculatorFragmentType.release_notes, null, R.id.main_layout); - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.about; + +import android.os.Bundle; + +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.EmptyActivity; +import org.solovyev.android.calculator.R; + +import javax.annotation.Nullable; + +/** + * User: serso + * Date: 9/16/11 + * Time: 11:52 PM + */ +public class CalculatorAboutActivity extends EmptyActivity { + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + getUi().addTab(this, CalculatorFragmentType.about, null, R.id.main_layout); + getUi().addTab(this, CalculatorFragmentType.release_notes, null, R.id.main_layout); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java b/app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java rename to app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java index 6d39ccc2..d985dd62 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java @@ -1,69 +1,69 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.about; - -import android.os.Bundle; -import android.text.method.LinkMovementMethod; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import org.solovyev.android.calculator.App; -import org.solovyev.android.calculator.CalculatorFragment; -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.R; - -import static android.view.View.GONE; -import static org.solovyev.common.text.Strings.isEmpty; - -/** - * User: serso - * Date: 12/24/11 - * Time: 11:55 PM - */ -public class CalculatorAboutFragment extends CalculatorFragment { - - public CalculatorAboutFragment() { - super(CalculatorFragmentType.about); - } - - @Override - public void onViewCreated(View root, Bundle savedInstanceState) { - super.onViewCreated(root, savedInstanceState); - - if (App.getTheme().isLight()) { - final ImageView image = (ImageView) root.findViewById(R.id.about_image); - image.setImageResource(R.drawable.logo_wizard_light); - } - - final TextView aboutTextView = (TextView) root.findViewById(R.id.cpp_about_textview); - aboutTextView.setMovementMethod(LinkMovementMethod.getInstance()); - - final TextView translatorsTextTextView = (TextView) root.findViewById(R.id.cpp_about_translators_text); - final TextView translatorsTextView = (TextView) root.findViewById(R.id.cpp_about_translators); - if (isEmpty(translatorsTextView.getText())) { - translatorsTextTextView.setVisibility(GONE); - translatorsTextView.setVisibility(GONE); - } - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.about; + +import android.os.Bundle; +import android.text.method.LinkMovementMethod; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import org.solovyev.android.calculator.App; +import org.solovyev.android.calculator.CalculatorFragment; +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.R; + +import static android.view.View.GONE; +import static org.solovyev.common.text.Strings.isEmpty; + +/** + * User: serso + * Date: 12/24/11 + * Time: 11:55 PM + */ +public class CalculatorAboutFragment extends CalculatorFragment { + + public CalculatorAboutFragment() { + super(CalculatorFragmentType.about); + } + + @Override + public void onViewCreated(View root, Bundle savedInstanceState) { + super.onViewCreated(root, savedInstanceState); + + if (App.getTheme().isLight()) { + final ImageView image = (ImageView) root.findViewById(R.id.about_image); + image.setImageResource(R.drawable.logo_wizard_light); + } + + final TextView aboutTextView = (TextView) root.findViewById(R.id.cpp_about_textview); + aboutTextView.setMovementMethod(LinkMovementMethod.getInstance()); + + final TextView translatorsTextTextView = (TextView) root.findViewById(R.id.cpp_about_translators_text); + final TextView translatorsTextView = (TextView) root.findViewById(R.id.cpp_about_translators); + if (isEmpty(translatorsTextView.getText())) { + translatorsTextTextView.setVisibility(GONE); + translatorsTextView.setVisibility(GONE); + } + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java b/app/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java rename to app/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java index 09aacbaa..fe53ede7 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/about/CalculatorReleaseNotesFragment.java @@ -1,56 +1,56 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.about; - -import android.os.Bundle; -import android.text.Html; -import android.text.method.LinkMovementMethod; -import android.view.View; -import android.widget.TextView; - -import org.solovyev.android.calculator.CalculatorFragment; -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.R; -import org.solovyev.android.calculator.release.ReleaseNotes; - -/** - * User: serso - * Date: 12/25/11 - * Time: 12:00 AM - */ -public class CalculatorReleaseNotesFragment extends CalculatorFragment { - - public CalculatorReleaseNotesFragment() { - super(CalculatorFragmentType.release_notes); - } - - @Override - public void onViewCreated(View root, Bundle savedInstanceState) { - super.onViewCreated(root, savedInstanceState); - - final TextView releaseNotes = (TextView) root.findViewById(R.id.releaseNotesTextView); - releaseNotes.setMovementMethod(LinkMovementMethod.getInstance()); - - releaseNotes.setText(Html.fromHtml(ReleaseNotes.getReleaseNotes(this.getActivity()))); - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.about; + +import android.os.Bundle; +import android.text.Html; +import android.text.method.LinkMovementMethod; +import android.view.View; +import android.widget.TextView; + +import org.solovyev.android.calculator.CalculatorFragment; +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.R; +import org.solovyev.android.calculator.release.ReleaseNotes; + +/** + * User: serso + * Date: 12/25/11 + * Time: 12:00 AM + */ +public class CalculatorReleaseNotesFragment extends CalculatorFragment { + + public CalculatorReleaseNotesFragment() { + super(CalculatorFragmentType.release_notes); + } + + @Override + public void onViewCreated(View root, Bundle savedInstanceState) { + super.onViewCreated(root, savedInstanceState); + + final TextView releaseNotes = (TextView) root.findViewById(R.id.releaseNotesTextView); + releaseNotes.setMovementMethod(LinkMovementMethod.getInstance()); + + releaseNotes.setText(Html.fromHtml(ReleaseNotes.getReleaseNotes(this.getActivity()))); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/about/TextHelper.java b/app/src/main/java/org/solovyev/android/calculator/about/TextHelper.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/about/TextHelper.java rename to app/src/main/java/org/solovyev/android/calculator/about/TextHelper.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionBuilderAdapter.java b/app/src/main/java/org/solovyev/android/calculator/function/FunctionBuilderAdapter.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/function/FunctionBuilderAdapter.java rename to app/src/main/java/org/solovyev/android/calculator/function/FunctionBuilderAdapter.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionEditDialogFragment.java b/app/src/main/java/org/solovyev/android/calculator/function/FunctionEditDialogFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/function/FunctionEditDialogFragment.java rename to app/src/main/java/org/solovyev/android/calculator/function/FunctionEditDialogFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java b/app/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java rename to app/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java index d2ce3e78..60cc57fb 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java +++ b/app/src/main/java/org/solovyev/android/calculator/function/FunctionEditorSaver.java @@ -1,166 +1,166 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.function; - -import android.view.View; -import android.widget.EditText; - -import org.solovyev.android.calculator.CalculatorFunctionsMathRegistry; -import org.solovyev.android.calculator.CalculatorMathRegistry; -import org.solovyev.android.calculator.Locator; -import org.solovyev.android.calculator.R; -import org.solovyev.android.calculator.math.edit.VarEditorSaver; -import org.solovyev.android.calculator.model.AFunction; -import org.solovyev.common.msg.MessageType; -import org.solovyev.common.text.Strings; - -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import jscl.CustomFunctionCalculationException; -import jscl.math.function.Function; -import jscl.math.function.IFunction; - -public class FunctionEditorSaver implements View.OnClickListener { - - @Nonnull - private final Object source; - - @Nonnull - private final AFunction.Builder builder; - - @Nullable - private final IFunction editedInstance; - - @Nonnull - private final View view; - - @Nonnull - private final CalculatorMathRegistry mathRegistry; - - - public FunctionEditorSaver(@Nonnull AFunction.Builder builder, - @Nullable IFunction editedInstance, - @Nonnull View view, - @Nonnull CalculatorMathRegistry registry, - @Nonnull Object source) { - - this.builder = builder; - this.editedInstance = editedInstance; - this.view = view; - this.mathRegistry = registry; - this.source = source; - } - - @Nonnull - public static FunctionEditDialogFragment.Input readInput(@Nullable IFunction function, @Nonnull View root) { - final EditText editName = (EditText) root.findViewById(R.id.function_edit_name); - String name = editName.getText().toString(); - - final EditText editValue = (EditText) root.findViewById(R.id.function_edit_value); - String content = editValue.getText().toString(); - - final EditText editDescription = (EditText) root.findViewById(R.id.function_edit_description); - String description = editDescription.getText().toString(); - - final FunctionParamsView editParams = (FunctionParamsView) root.findViewById(R.id.function_params_layout); - List parameterNames = editParams.getParameterNames(); - - return FunctionEditDialogFragment.Input.newInstance(function, name, content, description, parameterNames); - } - - @Override - public void onClick(View v) { - final Integer error; - - final FunctionEditDialogFragment.Input input = readInput(null, view); - - final String name = input.getName(); - final String content = input.getContent(); - final String description = input.getDescription(); - - List parameterNames = input.getParameterNames(); - if (parameterNames == null) { - parameterNames = Collections.emptyList(); - } - - if (VarEditorSaver.isValidName(name)) { - - boolean canBeSaved = false; - - final Function entityFromRegistry = mathRegistry.get(name); - if (entityFromRegistry == null) { - canBeSaved = true; - } else if (editedInstance != null && entityFromRegistry.getId().equals(editedInstance.getId())) { - canBeSaved = true; - } - - if (canBeSaved) { - if (validateParameters(parameterNames)) { - - if (!Strings.isEmpty(content)) { - builder.setParameterNames(parameterNames); - builder.setName(name); - builder.setDescription(description); - builder.setValue(content); - error = null; - } else { - error = R.string.function_is_empty; - } - } else { - error = R.string.function_param_not_empty; - } - } else { - error = R.string.function_already_exists; - } - } else { - error = R.string.function_name_is_not_valid; - } - - if (error != null) { - Locator.getInstance().getNotifier().showMessage(error, MessageType.error); - } else { - try { - CalculatorFunctionsMathRegistry.saveFunction(mathRegistry, new FunctionBuilderAdapter(builder), editedInstance, source, true); - } catch (CustomFunctionCalculationException e) { - Locator.getInstance().getNotifier().showMessage(e); - } catch (AFunction.Builder.CreationException e) { - Locator.getInstance().getNotifier().showMessage(e); - } - } - } - - private boolean validateParameters(@Nonnull List parameterNames) { - for (String parameterName : parameterNames) { - if (!VarEditorSaver.isValidName(parameterName)) { - return false; - } - } - - return true; - } - -} +/* + * 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 + */ + +package org.solovyev.android.calculator.function; + +import android.view.View; +import android.widget.EditText; + +import org.solovyev.android.calculator.CalculatorFunctionsMathRegistry; +import org.solovyev.android.calculator.CalculatorMathRegistry; +import org.solovyev.android.calculator.Locator; +import org.solovyev.android.calculator.R; +import org.solovyev.android.calculator.math.edit.VarEditorSaver; +import org.solovyev.android.calculator.model.AFunction; +import org.solovyev.common.msg.MessageType; +import org.solovyev.common.text.Strings; + +import java.util.Collections; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import jscl.CustomFunctionCalculationException; +import jscl.math.function.Function; +import jscl.math.function.IFunction; + +public class FunctionEditorSaver implements View.OnClickListener { + + @Nonnull + private final Object source; + + @Nonnull + private final AFunction.Builder builder; + + @Nullable + private final IFunction editedInstance; + + @Nonnull + private final View view; + + @Nonnull + private final CalculatorMathRegistry mathRegistry; + + + public FunctionEditorSaver(@Nonnull AFunction.Builder builder, + @Nullable IFunction editedInstance, + @Nonnull View view, + @Nonnull CalculatorMathRegistry registry, + @Nonnull Object source) { + + this.builder = builder; + this.editedInstance = editedInstance; + this.view = view; + this.mathRegistry = registry; + this.source = source; + } + + @Nonnull + public static FunctionEditDialogFragment.Input readInput(@Nullable IFunction function, @Nonnull View root) { + final EditText editName = (EditText) root.findViewById(R.id.function_edit_name); + String name = editName.getText().toString(); + + final EditText editValue = (EditText) root.findViewById(R.id.function_edit_value); + String content = editValue.getText().toString(); + + final EditText editDescription = (EditText) root.findViewById(R.id.function_edit_description); + String description = editDescription.getText().toString(); + + final FunctionParamsView editParams = (FunctionParamsView) root.findViewById(R.id.function_params_layout); + List parameterNames = editParams.getParameterNames(); + + return FunctionEditDialogFragment.Input.newInstance(function, name, content, description, parameterNames); + } + + @Override + public void onClick(View v) { + final Integer error; + + final FunctionEditDialogFragment.Input input = readInput(null, view); + + final String name = input.getName(); + final String content = input.getContent(); + final String description = input.getDescription(); + + List parameterNames = input.getParameterNames(); + if (parameterNames == null) { + parameterNames = Collections.emptyList(); + } + + if (VarEditorSaver.isValidName(name)) { + + boolean canBeSaved = false; + + final Function entityFromRegistry = mathRegistry.get(name); + if (entityFromRegistry == null) { + canBeSaved = true; + } else if (editedInstance != null && entityFromRegistry.getId().equals(editedInstance.getId())) { + canBeSaved = true; + } + + if (canBeSaved) { + if (validateParameters(parameterNames)) { + + if (!Strings.isEmpty(content)) { + builder.setParameterNames(parameterNames); + builder.setName(name); + builder.setDescription(description); + builder.setValue(content); + error = null; + } else { + error = R.string.function_is_empty; + } + } else { + error = R.string.function_param_not_empty; + } + } else { + error = R.string.function_already_exists; + } + } else { + error = R.string.function_name_is_not_valid; + } + + if (error != null) { + Locator.getInstance().getNotifier().showMessage(error, MessageType.error); + } else { + try { + CalculatorFunctionsMathRegistry.saveFunction(mathRegistry, new FunctionBuilderAdapter(builder), editedInstance, source, true); + } catch (CustomFunctionCalculationException e) { + Locator.getInstance().getNotifier().showMessage(e); + } catch (AFunction.Builder.CreationException e) { + Locator.getInstance().getNotifier().showMessage(e); + } + } + } + + private boolean validateParameters(@Nonnull List parameterNames) { + for (String parameterName : parameterNames) { + if (!VarEditorSaver.isValidName(parameterName)) { + return false; + } + } + + return true; + } + +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java b/app/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java rename to app/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java index 067f435a..a64589ea 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java +++ b/app/src/main/java/org/solovyev/android/calculator/function/FunctionParamEditText.java @@ -1,56 +1,56 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.function; - -import android.content.Context; -import android.os.Parcelable; -import android.util.AttributeSet; -import android.view.AbsSavedState; -import android.widget.EditText; - -public class FunctionParamEditText extends EditText { - - public FunctionParamEditText(Context context) { - super(context); - } - - public FunctionParamEditText(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public FunctionParamEditText(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - // we restore state manually outside - @Override - public Parcelable onSaveInstanceState() { - super.onSaveInstanceState(); - return AbsSavedState.EMPTY_STATE; - } - - @Override - public void onRestoreInstanceState(Parcelable state) { - super.onRestoreInstanceState(null); - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.function; + +import android.content.Context; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.view.AbsSavedState; +import android.widget.EditText; + +public class FunctionParamEditText extends EditText { + + public FunctionParamEditText(Context context) { + super(context); + } + + public FunctionParamEditText(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public FunctionParamEditText(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + // we restore state manually outside + @Override + public Parcelable onSaveInstanceState() { + super.onSaveInstanceState(); + return AbsSavedState.EMPTY_STATE; + } + + @Override + public void onRestoreInstanceState(Parcelable state) { + super.onRestoreInstanceState(null); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java b/app/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java rename to app/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java index 91ae7881..177411c4 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java +++ b/app/src/main/java/org/solovyev/android/calculator/function/FunctionParamsView.java @@ -1,215 +1,215 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.function; - -import android.annotation.TargetApi; -import android.content.Context; -import android.os.Build; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.EditText; -import android.widget.LinearLayout; -import android.widget.TextView; - -import org.solovyev.android.calculator.R; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import jscl.text.MutableInt; - -public class FunctionParamsView extends LinearLayout { - - private static final String PARAM_TAG_PREFIX = "function_param_"; - @Nonnull - private final MutableInt paramsCount = new MutableInt(0); - @Nonnull - private final List paramIds = new ArrayList(10); - - public FunctionParamsView(Context context) { - super(context); - } - - public FunctionParamsView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - @TargetApi(Build.VERSION_CODES.HONEYCOMB) - public FunctionParamsView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - public void init() { - init(Collections.emptyList()); - } - - public void init(@Nonnull List parameters) { - this.setOrientation(VERTICAL); - - final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); - - final View addParamView = inflater.inflate(R.layout.function_add_param, null); - - final View addParamButton = addParamView.findViewById(R.id.function_add_param_button); - - addParamButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - addParam(null); - } - }); - - this.addView(addParamView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); - - for (String parameter : parameters) { - addParam(parameter); - } - } - - public void addParam(@Nullable String name) { - synchronized (paramsCount) { - final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); - - final Integer id = paramsCount.intValue(); - - final View editParamView = inflater.inflate(R.layout.function_edit_param, null); - - editParamView.setTag(getParamTag(id)); - - final EditText paramNameEditText = (EditText) editParamView.findViewById(R.id.function_param_edit_text); - paramNameEditText.setText(name); - - final View removeParamButton = editParamView.findViewById(R.id.function_remove_param_button); - removeParamButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - removeParam(id); - } - }); - - final View upParamButton = editParamView.findViewById(R.id.function_up_param_button); - upParamButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - upParam(id); - } - }); - - final View downParamButton = editParamView.findViewById(R.id.function_down_param_button); - downParamButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - downParam(id); - } - }); - - this.addView(editParamView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); - - paramIds.add(id); - paramsCount.increment(); - } - } - - private void downParam(@Nonnull Integer id) { - synchronized (paramsCount) { - int index = paramIds.indexOf(id); - if (index < paramIds.size() - 1) { - swap(index, index + 1); - } - } - } - - private void upParam(@Nonnull Integer id) { - synchronized (paramsCount) { - int index = paramIds.indexOf(id); - if (index > 0) { - swap(index, index - 1); - } - } - } - - private void swap(int index1, int index2) { - final View editParamView1 = getParamView(paramIds.get(index1)); - final View editParamView2 = getParamView(paramIds.get(index2)); - - if (editParamView1 != null && editParamView2 != null) { - final EditText paramNameEditText1 = (EditText) editParamView1.findViewById(R.id.function_param_edit_text); - final EditText paramNameEditText2 = (EditText) editParamView2.findViewById(R.id.function_param_edit_text); - swap(paramNameEditText1, paramNameEditText2); - } - } - - private void swap(@Nonnull TextView first, - @Nonnull TextView second) { - final CharSequence tmp = first.getText(); - first.setText(second.getText()); - second.setText(tmp); - } - - @Nullable - private View getParamView(@Nonnull Integer id) { - final String tag = getParamTag(id); - return this.findViewWithTag(tag); - } - - @Nonnull - private String getParamTag(@Nonnull Integer index) { - return PARAM_TAG_PREFIX + index; - } - - public void removeParam(@Nonnull Integer id) { - synchronized (paramsCount) { - if (paramIds.contains(id)) { - final View editParamView = getParamView(id); - if (editParamView != null) { - this.removeView(editParamView); - paramIds.remove(id); - } - } - } - } - - @Nonnull - public List getParameterNames() { - synchronized (paramsCount) { - final List result = new ArrayList(paramsCount.intValue()); - - for (Integer id : paramIds) { - final View paramView = getParamView(id); - if (paramView != null) { - final EditText paramNameEditText = (EditText) paramView.findViewById(R.id.function_param_edit_text); - result.add(paramNameEditText.getText().toString()); - } - } - - return result; - } - } - -} +/* + * 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 + */ + +package org.solovyev.android.calculator.function; + +import android.annotation.TargetApi; +import android.content.Context; +import android.os.Build; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.TextView; + +import org.solovyev.android.calculator.R; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import jscl.text.MutableInt; + +public class FunctionParamsView extends LinearLayout { + + private static final String PARAM_TAG_PREFIX = "function_param_"; + @Nonnull + private final MutableInt paramsCount = new MutableInt(0); + @Nonnull + private final List paramIds = new ArrayList(10); + + public FunctionParamsView(Context context) { + super(context); + } + + public FunctionParamsView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @TargetApi(Build.VERSION_CODES.HONEYCOMB) + public FunctionParamsView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + public void init() { + init(Collections.emptyList()); + } + + public void init(@Nonnull List parameters) { + this.setOrientation(VERTICAL); + + final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + + final View addParamView = inflater.inflate(R.layout.function_add_param, null); + + final View addParamButton = addParamView.findViewById(R.id.function_add_param_button); + + addParamButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + addParam(null); + } + }); + + this.addView(addParamView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); + + for (String parameter : parameters) { + addParam(parameter); + } + } + + public void addParam(@Nullable String name) { + synchronized (paramsCount) { + final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + + final Integer id = paramsCount.intValue(); + + final View editParamView = inflater.inflate(R.layout.function_edit_param, null); + + editParamView.setTag(getParamTag(id)); + + final EditText paramNameEditText = (EditText) editParamView.findViewById(R.id.function_param_edit_text); + paramNameEditText.setText(name); + + final View removeParamButton = editParamView.findViewById(R.id.function_remove_param_button); + removeParamButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + removeParam(id); + } + }); + + final View upParamButton = editParamView.findViewById(R.id.function_up_param_button); + upParamButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + upParam(id); + } + }); + + final View downParamButton = editParamView.findViewById(R.id.function_down_param_button); + downParamButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + downParam(id); + } + }); + + this.addView(editParamView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); + + paramIds.add(id); + paramsCount.increment(); + } + } + + private void downParam(@Nonnull Integer id) { + synchronized (paramsCount) { + int index = paramIds.indexOf(id); + if (index < paramIds.size() - 1) { + swap(index, index + 1); + } + } + } + + private void upParam(@Nonnull Integer id) { + synchronized (paramsCount) { + int index = paramIds.indexOf(id); + if (index > 0) { + swap(index, index - 1); + } + } + } + + private void swap(int index1, int index2) { + final View editParamView1 = getParamView(paramIds.get(index1)); + final View editParamView2 = getParamView(paramIds.get(index2)); + + if (editParamView1 != null && editParamView2 != null) { + final EditText paramNameEditText1 = (EditText) editParamView1.findViewById(R.id.function_param_edit_text); + final EditText paramNameEditText2 = (EditText) editParamView2.findViewById(R.id.function_param_edit_text); + swap(paramNameEditText1, paramNameEditText2); + } + } + + private void swap(@Nonnull TextView first, + @Nonnull TextView second) { + final CharSequence tmp = first.getText(); + first.setText(second.getText()); + second.setText(tmp); + } + + @Nullable + private View getParamView(@Nonnull Integer id) { + final String tag = getParamTag(id); + return this.findViewWithTag(tag); + } + + @Nonnull + private String getParamTag(@Nonnull Integer index) { + return PARAM_TAG_PREFIX + index; + } + + public void removeParam(@Nonnull Integer id) { + synchronized (paramsCount) { + if (paramIds.contains(id)) { + final View editParamView = getParamView(id); + if (editParamView != null) { + this.removeView(editParamView); + paramIds.remove(id); + } + } + } + } + + @Nonnull + public List getParameterNames() { + synchronized (paramsCount) { + final List result = new ArrayList(paramsCount.intValue()); + + for (Integer id : paramIds) { + final View paramView = getParamView(id); + if (paramView != null) { + final EditText paramNameEditText = (EditText) paramView.findViewById(R.id.function_param_edit_text); + result.add(paramNameEditText.getText().toString()); + } + } + + return result; + } + } + +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/ga/Ga.java b/app/src/main/java/org/solovyev/android/calculator/ga/Ga.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/ga/Ga.java rename to app/src/main/java/org/solovyev/android/calculator/ga/Ga.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/AbstractHistoryState.java b/app/src/main/java/org/solovyev/android/calculator/history/AbstractHistoryState.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/AbstractHistoryState.java rename to app/src/main/java/org/solovyev/android/calculator/history/AbstractHistoryState.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java b/app/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java rename to app/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java index a4e3fdf1..695f3cc5 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java +++ b/app/src/main/java/org/solovyev/android/calculator/history/AndroidCalculatorHistory.java @@ -1,175 +1,175 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.history; - -import android.app.Application; -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.PreferenceManager; - -import org.solovyev.android.calculator.Calculator; -import org.solovyev.android.calculator.CalculatorEventData; -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.common.history.HistoryAction; - -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * User: serso - * Date: 10/9/11 - * Time: 6:35 PM - */ -public class AndroidCalculatorHistory implements CalculatorHistory { - - @Nonnull - private final CalculatorHistoryImpl calculatorHistory; - - @Nonnull - private final Context context; - - public AndroidCalculatorHistory(@Nonnull Application application, @Nonnull Calculator calculator) { - this.context = application; - calculatorHistory = new CalculatorHistoryImpl(calculator); - } - - @Override - public void load() { - final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); - if (preferences != null) { - final String value = preferences.getString("org.solovyev.android.calculator.CalculatorModel_history", null); - if (value != null) { - calculatorHistory.fromXml(value); - } - } - } - - public void save() { - final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context); - final SharedPreferences.Editor editor = settings.edit(); - - editor.putString("org.solovyev.android.calculator.CalculatorModel_history", calculatorHistory.toXml()); - - editor.apply(); - } - - public void clearSavedHistory() { - calculatorHistory.clearSavedHistory(); - save(); - } - - public void removeSavedHistory(@Nonnull CalculatorHistoryState historyState) { - historyState.setSaved(false); - calculatorHistory.removeSavedHistory(historyState); - save(); - } - - @Override - public boolean isEmpty() { - return calculatorHistory.isEmpty(); - } - - @Override - public CalculatorHistoryState getLastHistoryState() { - return calculatorHistory.getLastHistoryState(); - } - - @Override - public boolean isUndoAvailable() { - return calculatorHistory.isUndoAvailable(); - } - - @Override - public CalculatorHistoryState undo(@Nullable CalculatorHistoryState currentState) { - return calculatorHistory.undo(currentState); - } - - @Override - public boolean isRedoAvailable() { - return calculatorHistory.isRedoAvailable(); - } - - @Override - public CalculatorHistoryState redo(@Nullable CalculatorHistoryState currentState) { - return calculatorHistory.redo(currentState); - } - - @Override - public boolean isActionAvailable(@Nonnull HistoryAction historyAction) { - return calculatorHistory.isActionAvailable(historyAction); - } - - @Override - public CalculatorHistoryState doAction(@Nonnull HistoryAction historyAction, @Nullable CalculatorHistoryState currentState) { - return calculatorHistory.doAction(historyAction, currentState); - } - - @Override - public void addState(@Nullable CalculatorHistoryState currentState) { - calculatorHistory.addState(currentState); - } - - @Nonnull - @Override - public List getStates() { - return calculatorHistory.getStates(); - } - - @Nonnull - @Override - public List getStates(boolean includeIntermediateStates) { - return calculatorHistory.getStates(includeIntermediateStates); - } - - @Override - public void clear() { - calculatorHistory.clear(); - } - - @Nonnull - public List getSavedHistory() { - return calculatorHistory.getSavedHistory(); - } - - @Nonnull - public CalculatorHistoryState addSavedState(@Nonnull CalculatorHistoryState historyState) { - return calculatorHistory.addSavedState(historyState); - } - - @Override - public void fromXml(@Nonnull String xml) { - calculatorHistory.fromXml(xml); - } - - @Override - public String toXml() { - return calculatorHistory.toXml(); - } - - @Override - public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { - calculatorHistory.onCalculatorEvent(calculatorEventData, calculatorEventType, data); - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.history; + +import android.app.Application; +import android.content.Context; +import android.content.SharedPreferences; +import android.preference.PreferenceManager; + +import org.solovyev.android.calculator.Calculator; +import org.solovyev.android.calculator.CalculatorEventData; +import org.solovyev.android.calculator.CalculatorEventType; +import org.solovyev.common.history.HistoryAction; + +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * User: serso + * Date: 10/9/11 + * Time: 6:35 PM + */ +public class AndroidCalculatorHistory implements CalculatorHistory { + + @Nonnull + private final CalculatorHistoryImpl calculatorHistory; + + @Nonnull + private final Context context; + + public AndroidCalculatorHistory(@Nonnull Application application, @Nonnull Calculator calculator) { + this.context = application; + calculatorHistory = new CalculatorHistoryImpl(calculator); + } + + @Override + public void load() { + final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + if (preferences != null) { + final String value = preferences.getString("org.solovyev.android.calculator.CalculatorModel_history", null); + if (value != null) { + calculatorHistory.fromXml(value); + } + } + } + + public void save() { + final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context); + final SharedPreferences.Editor editor = settings.edit(); + + editor.putString("org.solovyev.android.calculator.CalculatorModel_history", calculatorHistory.toXml()); + + editor.apply(); + } + + public void clearSavedHistory() { + calculatorHistory.clearSavedHistory(); + save(); + } + + public void removeSavedHistory(@Nonnull CalculatorHistoryState historyState) { + historyState.setSaved(false); + calculatorHistory.removeSavedHistory(historyState); + save(); + } + + @Override + public boolean isEmpty() { + return calculatorHistory.isEmpty(); + } + + @Override + public CalculatorHistoryState getLastHistoryState() { + return calculatorHistory.getLastHistoryState(); + } + + @Override + public boolean isUndoAvailable() { + return calculatorHistory.isUndoAvailable(); + } + + @Override + public CalculatorHistoryState undo(@Nullable CalculatorHistoryState currentState) { + return calculatorHistory.undo(currentState); + } + + @Override + public boolean isRedoAvailable() { + return calculatorHistory.isRedoAvailable(); + } + + @Override + public CalculatorHistoryState redo(@Nullable CalculatorHistoryState currentState) { + return calculatorHistory.redo(currentState); + } + + @Override + public boolean isActionAvailable(@Nonnull HistoryAction historyAction) { + return calculatorHistory.isActionAvailable(historyAction); + } + + @Override + public CalculatorHistoryState doAction(@Nonnull HistoryAction historyAction, @Nullable CalculatorHistoryState currentState) { + return calculatorHistory.doAction(historyAction, currentState); + } + + @Override + public void addState(@Nullable CalculatorHistoryState currentState) { + calculatorHistory.addState(currentState); + } + + @Nonnull + @Override + public List getStates() { + return calculatorHistory.getStates(); + } + + @Nonnull + @Override + public List getStates(boolean includeIntermediateStates) { + return calculatorHistory.getStates(includeIntermediateStates); + } + + @Override + public void clear() { + calculatorHistory.clear(); + } + + @Nonnull + public List getSavedHistory() { + return calculatorHistory.getSavedHistory(); + } + + @Nonnull + public CalculatorHistoryState addSavedState(@Nonnull CalculatorHistoryState historyState) { + return calculatorHistory.addSavedState(historyState); + } + + @Override + public void fromXml(@Nonnull String xml) { + calculatorHistory.fromXml(xml); + } + + @Override + public String toXml() { + return calculatorHistory.toXml(); + } + + @Override + public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { + calculatorHistory.onCalculatorEvent(calculatorEventData, calculatorEventType, data); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/BaseHistoryFragment.java b/app/src/main/java/org/solovyev/android/calculator/history/BaseHistoryFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/BaseHistoryFragment.java rename to app/src/main/java/org/solovyev/android/calculator/history/BaseHistoryFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorDisplayHistoryState.java b/app/src/main/java/org/solovyev/android/calculator/history/CalculatorDisplayHistoryState.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorDisplayHistoryState.java rename to app/src/main/java/org/solovyev/android/calculator/history/CalculatorDisplayHistoryState.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistory.java b/app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistory.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistory.java rename to app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistory.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java b/app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java rename to app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java index eac25d72..7e3e8c7e 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java +++ b/app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryActivity.java @@ -1,59 +1,59 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.history; - -import android.os.Bundle; - -import org.solovyev.android.calculator.BaseActivity; -import org.solovyev.android.calculator.CalculatorEventData; -import org.solovyev.android.calculator.CalculatorEventListener; -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.android.calculator.R; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import static org.solovyev.android.calculator.CalculatorFragmentType.history; -import static org.solovyev.android.calculator.CalculatorFragmentType.saved_history; - -public class CalculatorHistoryActivity extends BaseActivity implements CalculatorEventListener { - - public CalculatorHistoryActivity() { - super(R.layout.main_empty, CalculatorHistoryActivity.class.getSimpleName()); - } - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - ui.addTab(this, history, null, R.id.main_layout); - ui.addTab(this, saved_history, null, R.id.main_layout); - } - - @Override - public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { - if (calculatorEventType == CalculatorEventType.use_history_state) { - this.finish(); - } - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.history; + +import android.os.Bundle; + +import org.solovyev.android.calculator.BaseActivity; +import org.solovyev.android.calculator.CalculatorEventData; +import org.solovyev.android.calculator.CalculatorEventListener; +import org.solovyev.android.calculator.CalculatorEventType; +import org.solovyev.android.calculator.R; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import static org.solovyev.android.calculator.CalculatorFragmentType.history; +import static org.solovyev.android.calculator.CalculatorFragmentType.saved_history; + +public class CalculatorHistoryActivity extends BaseActivity implements CalculatorEventListener { + + public CalculatorHistoryActivity() { + super(R.layout.main_empty, CalculatorHistoryActivity.class.getSimpleName()); + } + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + ui.addTab(this, history, null, R.id.main_layout); + ui.addTab(this, saved_history, null, R.id.main_layout); + } + + @Override + public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { + if (calculatorEventType == CalculatorEventType.use_history_state) { + this.finish(); + } + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryImpl.java b/app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryImpl.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryImpl.java rename to app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryImpl.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryState.java b/app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryState.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryState.java rename to app/src/main/java/org/solovyev/android/calculator/history/CalculatorHistoryState.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/EditorHistoryState.java b/app/src/main/java/org/solovyev/android/calculator/history/EditorHistoryState.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/EditorHistoryState.java rename to app/src/main/java/org/solovyev/android/calculator/history/EditorHistoryState.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/History.java b/app/src/main/java/org/solovyev/android/calculator/history/History.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/History.java rename to app/src/main/java/org/solovyev/android/calculator/history/History.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryArrayAdapter.java b/app/src/main/java/org/solovyev/android/calculator/history/HistoryArrayAdapter.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/HistoryArrayAdapter.java rename to app/src/main/java/org/solovyev/android/calculator/history/HistoryArrayAdapter.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryDragProcessor.java b/app/src/main/java/org/solovyev/android/calculator/history/HistoryDragProcessor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/HistoryDragProcessor.java rename to app/src/main/java/org/solovyev/android/calculator/history/HistoryDragProcessor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryFragment.java b/app/src/main/java/org/solovyev/android/calculator/history/HistoryFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/HistoryFragment.java rename to app/src/main/java/org/solovyev/android/calculator/history/HistoryFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuData.java b/app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuData.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuData.java rename to app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuData.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java b/app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java rename to app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java index f098b8cc..b708b2c1 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java +++ b/app/src/main/java/org/solovyev/android/calculator/history/HistoryItemMenuItem.java @@ -1,168 +1,168 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.history; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.Context; -import android.content.DialogInterface; -import android.text.ClipboardManager; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.EditText; -import android.widget.TextView; -import android.widget.Toast; - -import org.solovyev.android.calculator.Locator; -import org.solovyev.android.calculator.R; -import org.solovyev.android.menu.LabeledMenuItem; -import org.solovyev.common.text.Strings; - -import javax.annotation.Nonnull; - -/** - * User: serso - * Date: 12/18/11 - * Time: 3:09 PM - */ -public enum HistoryItemMenuItem implements LabeledMenuItem { - - use(R.string.c_use) { - @Override - public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { - BaseHistoryFragment.useHistoryItem(data.getHistoryState()); - } - }, - - copy_expression(R.string.c_copy_expression) { - @Override - public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { - final CalculatorHistoryState calculatorHistoryState = data.getHistoryState(); - final String text = calculatorHistoryState.getEditorState().getText(); - if (!Strings.isEmpty(text)) { - final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); - clipboard.setText(text); - Toast.makeText(context, context.getText(R.string.c_expression_copied), Toast.LENGTH_SHORT).show(); - } - } - }, - - copy_result(R.string.c_copy_result) { - @Override - public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { - final CalculatorHistoryState calculatorHistoryState = data.getHistoryState(); - final String text = calculatorHistoryState.getDisplayState().getEditorState().getText(); - if (!Strings.isEmpty(text)) { - final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); - clipboard.setText(text); - Toast.makeText(context, context.getText(R.string.c_result_copied), Toast.LENGTH_SHORT).show(); - } - } - }, - - save(R.string.c_save) { - @Override - public void onClick(@Nonnull final HistoryItemMenuData data, @Nonnull final Context context) { - final CalculatorHistoryState historyState = data.getHistoryState(); - if (!historyState.isSaved()) { - createEditHistoryDialog(data, context, true); - } else { - Toast.makeText(context, context.getText(R.string.c_history_already_saved), Toast.LENGTH_LONG).show(); - } - } - }, - - edit(R.string.c_edit) { - @Override - public void onClick(@Nonnull final HistoryItemMenuData data, @Nonnull final Context context) { - final CalculatorHistoryState historyState = data.getHistoryState(); - if (historyState.isSaved()) { - createEditHistoryDialog(data, context, false); - } else { - Toast.makeText(context, context.getText(R.string.c_history_must_be_saved), Toast.LENGTH_LONG).show(); - } - } - }, - - remove(R.string.c_remove) { - @Override - public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { - final CalculatorHistoryState historyState = data.getHistoryState(); - if (historyState.isSaved()) { - data.getAdapter().remove(historyState); - Locator.getInstance().getHistory().removeSavedHistory(historyState); - Toast.makeText(context, context.getText(R.string.c_history_was_removed), Toast.LENGTH_LONG).show(); - data.getAdapter().notifyDataSetChanged(); - } - } - }; - - private final int captionId; - - private HistoryItemMenuItem(int captionId) { - this.captionId = captionId; - } - - private static void createEditHistoryDialog(@Nonnull final HistoryItemMenuData data, @Nonnull final Context context, final boolean save) { - final CalculatorHistoryState historyState = data.getHistoryState(); - - final LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - final View editView = layoutInflater.inflate(R.layout.history_edit, null); - final TextView historyExpression = (TextView) editView.findViewById(R.id.history_edit_expression); - historyExpression.setText(BaseHistoryFragment.getHistoryText(historyState)); - - final EditText comment = (EditText) editView.findViewById(R.id.history_edit_comment); - comment.setText(historyState.getComment()); - - final AlertDialog.Builder builder = new AlertDialog.Builder(context) - .setTitle(save ? R.string.c_save_history : R.string.c_edit_history) - .setCancelable(true) - .setNegativeButton(R.string.c_cancel, null) - .setPositiveButton(R.string.c_save, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - if (save) { - final CalculatorHistoryState savedHistoryItem = Locator.getInstance().getHistory().addSavedState(historyState); - savedHistoryItem.setComment(comment.getText().toString()); - Locator.getInstance().getHistory().save(); - // we don't need to add element to the adapter as adapter of another activity must be updated and not this - //data.getAdapter().add(savedHistoryItem); - } else { - historyState.setComment(comment.getText().toString()); - Locator.getInstance().getHistory().save(); - } - data.getAdapter().notifyDataSetChanged(); - Toast.makeText(context, context.getText(R.string.c_history_saved), Toast.LENGTH_LONG).show(); - } - }) - .setView(editView); - - builder.create().show(); - } - - @Nonnull - @Override - public String getCaption(@Nonnull Context context) { - return context.getString(captionId); - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.history; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.text.ClipboardManager; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import org.solovyev.android.calculator.Locator; +import org.solovyev.android.calculator.R; +import org.solovyev.android.menu.LabeledMenuItem; +import org.solovyev.common.text.Strings; + +import javax.annotation.Nonnull; + +/** + * User: serso + * Date: 12/18/11 + * Time: 3:09 PM + */ +public enum HistoryItemMenuItem implements LabeledMenuItem { + + use(R.string.c_use) { + @Override + public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { + BaseHistoryFragment.useHistoryItem(data.getHistoryState()); + } + }, + + copy_expression(R.string.c_copy_expression) { + @Override + public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { + final CalculatorHistoryState calculatorHistoryState = data.getHistoryState(); + final String text = calculatorHistoryState.getEditorState().getText(); + if (!Strings.isEmpty(text)) { + final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); + clipboard.setText(text); + Toast.makeText(context, context.getText(R.string.c_expression_copied), Toast.LENGTH_SHORT).show(); + } + } + }, + + copy_result(R.string.c_copy_result) { + @Override + public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { + final CalculatorHistoryState calculatorHistoryState = data.getHistoryState(); + final String text = calculatorHistoryState.getDisplayState().getEditorState().getText(); + if (!Strings.isEmpty(text)) { + final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); + clipboard.setText(text); + Toast.makeText(context, context.getText(R.string.c_result_copied), Toast.LENGTH_SHORT).show(); + } + } + }, + + save(R.string.c_save) { + @Override + public void onClick(@Nonnull final HistoryItemMenuData data, @Nonnull final Context context) { + final CalculatorHistoryState historyState = data.getHistoryState(); + if (!historyState.isSaved()) { + createEditHistoryDialog(data, context, true); + } else { + Toast.makeText(context, context.getText(R.string.c_history_already_saved), Toast.LENGTH_LONG).show(); + } + } + }, + + edit(R.string.c_edit) { + @Override + public void onClick(@Nonnull final HistoryItemMenuData data, @Nonnull final Context context) { + final CalculatorHistoryState historyState = data.getHistoryState(); + if (historyState.isSaved()) { + createEditHistoryDialog(data, context, false); + } else { + Toast.makeText(context, context.getText(R.string.c_history_must_be_saved), Toast.LENGTH_LONG).show(); + } + } + }, + + remove(R.string.c_remove) { + @Override + public void onClick(@Nonnull HistoryItemMenuData data, @Nonnull Context context) { + final CalculatorHistoryState historyState = data.getHistoryState(); + if (historyState.isSaved()) { + data.getAdapter().remove(historyState); + Locator.getInstance().getHistory().removeSavedHistory(historyState); + Toast.makeText(context, context.getText(R.string.c_history_was_removed), Toast.LENGTH_LONG).show(); + data.getAdapter().notifyDataSetChanged(); + } + } + }; + + private final int captionId; + + private HistoryItemMenuItem(int captionId) { + this.captionId = captionId; + } + + private static void createEditHistoryDialog(@Nonnull final HistoryItemMenuData data, @Nonnull final Context context, final boolean save) { + final CalculatorHistoryState historyState = data.getHistoryState(); + + final LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + final View editView = layoutInflater.inflate(R.layout.history_edit, null); + final TextView historyExpression = (TextView) editView.findViewById(R.id.history_edit_expression); + historyExpression.setText(BaseHistoryFragment.getHistoryText(historyState)); + + final EditText comment = (EditText) editView.findViewById(R.id.history_edit_comment); + comment.setText(historyState.getComment()); + + final AlertDialog.Builder builder = new AlertDialog.Builder(context) + .setTitle(save ? R.string.c_save_history : R.string.c_edit_history) + .setCancelable(true) + .setNegativeButton(R.string.c_cancel, null) + .setPositiveButton(R.string.c_save, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + if (save) { + final CalculatorHistoryState savedHistoryItem = Locator.getInstance().getHistory().addSavedState(historyState); + savedHistoryItem.setComment(comment.getText().toString()); + Locator.getInstance().getHistory().save(); + // we don't need to add element to the adapter as adapter of another activity must be updated and not this + //data.getAdapter().add(savedHistoryItem); + } else { + historyState.setComment(comment.getText().toString()); + Locator.getInstance().getHistory().save(); + } + data.getAdapter().notifyDataSetChanged(); + Toast.makeText(context, context.getText(R.string.c_history_saved), Toast.LENGTH_LONG).show(); + } + }) + .setView(editView); + + builder.create().show(); + } + + @Nonnull + @Override + public String getCaption(@Nonnull Context context) { + return context.getString(captionId); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/HistoryUtils.java b/app/src/main/java/org/solovyev/android/calculator/history/HistoryUtils.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/HistoryUtils.java rename to app/src/main/java/org/solovyev/android/calculator/history/HistoryUtils.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/SavedHistoryFragment.java b/app/src/main/java/org/solovyev/android/calculator/history/SavedHistoryFragment.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/history/SavedHistoryFragment.java rename to app/src/main/java/org/solovyev/android/calculator/history/SavedHistoryFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java b/app/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java rename to app/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java index 4e812694..ea172449 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java +++ b/app/src/main/java/org/solovyev/android/calculator/history/TextViewEditorAdapter.java @@ -1,68 +1,68 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.history; - -import android.widget.EditText; -import android.widget.TextView; - -import org.solovyev.android.calculator.Editor; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * User: serso - * Date: 12/17/11 - * Time: 9:39 PM - */ -public class TextViewEditorAdapter implements Editor { - - @Nonnull - private final TextView textView; - - public TextViewEditorAdapter(@Nonnull TextView textView) { - this.textView = textView; - } - - @Override - public CharSequence getText() { - return textView.getText().toString(); - } - - @Override - public void setText(@Nullable CharSequence text) { - textView.setText(text); - } - - @Override - public int getSelection() { - return textView.getSelectionStart(); - } - - @Override - public void setSelection(int selection) { - if (textView instanceof EditText) { - ((EditText) textView).setSelection(selection); - } - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.history; + +import android.widget.EditText; +import android.widget.TextView; + +import org.solovyev.android.calculator.Editor; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * User: serso + * Date: 12/17/11 + * Time: 9:39 PM + */ +public class TextViewEditorAdapter implements Editor { + + @Nonnull + private final TextView textView; + + public TextViewEditorAdapter(@Nonnull TextView textView) { + this.textView = textView; + } + + @Override + public CharSequence getText() { + return textView.getText().toString(); + } + + @Override + public void setText(@Nullable CharSequence text) { + textView.setText(text); + } + + @Override + public int getSelection() { + return textView.getSelectionStart(); + } + + @Override + public void setSelection(int selection) { + if (textView instanceof EditText) { + ((EditText) textView).setSelection(selection); + } + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/jscl/FromJsclNumericTextProcessor.java b/app/src/main/java/org/solovyev/android/calculator/jscl/FromJsclNumericTextProcessor.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/jscl/FromJsclNumericTextProcessor.java rename to app/src/main/java/org/solovyev/android/calculator/jscl/FromJsclNumericTextProcessor.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/jscl/JsclOperation.java b/app/src/main/java/org/solovyev/android/calculator/jscl/JsclOperation.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/jscl/JsclOperation.java rename to app/src/main/java/org/solovyev/android/calculator/jscl/JsclOperation.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/language/Language.java b/app/src/main/java/org/solovyev/android/calculator/language/Language.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/language/Language.java rename to app/src/main/java/org/solovyev/android/calculator/language/Language.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/language/Languages.java b/app/src/main/java/org/solovyev/android/calculator/language/Languages.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/language/Languages.java rename to app/src/main/java/org/solovyev/android/calculator/language/Languages.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/MathType.java b/app/src/main/java/org/solovyev/android/calculator/math/MathType.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/math/MathType.java rename to app/src/main/java/org/solovyev/android/calculator/math/MathType.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java similarity index 96% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java index 3c054127..95ac4e29 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/math/edit/AbstractMathEntityListFragment.java @@ -1,351 +1,351 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.math.edit; - -import android.content.Context; -import android.os.Bundle; -import android.os.Handler; -import android.support.v4.app.ListFragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.ArrayAdapter; -import android.widget.ListView; -import android.widget.TextView; - -import org.solovyev.android.calculator.CalculatorApplication; -import org.solovyev.android.calculator.CalculatorEventData; -import org.solovyev.android.calculator.CalculatorEventListener; -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.CalculatorMathRegistry; -import org.solovyev.android.calculator.FragmentUi; -import org.solovyev.android.calculator.R; -import org.solovyev.android.menu.AMenuItem; -import org.solovyev.android.menu.ContextMenuBuilder; -import org.solovyev.android.menu.LabeledMenuItem; -import org.solovyev.android.menu.ListContextMenu; -import org.solovyev.common.JPredicate; -import org.solovyev.common.Objects; -import org.solovyev.common.filter.Filter; -import org.solovyev.common.math.MathEntity; -import org.solovyev.common.text.Strings; - -import java.util.Comparator; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - - -/** - * User: serso - * Date: 12/21/11 - * Time: 9:24 PM - */ -public abstract class AbstractMathEntityListFragment extends ListFragment implements CalculatorEventListener { - - /* - ********************************************************************** - * - * CONSTANTS - * - ********************************************************************** - */ - - public static final String MATH_ENTITY_CATEGORY_EXTRA_STRING = "org.solovyev.android.calculator.CalculatorVarsActivity_math_entity_category"; - - - /* - ********************************************************************** - * - * FIELDS - * - ********************************************************************** - */ - @Nonnull - private final FragmentUi ui; - @Nonnull - private final Handler uiHandler = new Handler(); - @Nullable - private MathEntityArrayAdapter adapter; - @Nullable - private String category; - - protected AbstractMathEntityListFragment(@Nonnull CalculatorFragmentType fragmentType) { - ui = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId()); - } - - @Nonnull - public static Bundle createBundleFor(@Nonnull String categoryId) { - final Bundle result = new Bundle(1); - putCategory(result, categoryId); - return result; - } - - static void putCategory(@Nonnull Bundle bundle, @Nonnull String categoryId) { - bundle.putString(MATH_ENTITY_CATEGORY_EXTRA_STRING, categoryId); - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - final Bundle bundle = getArguments(); - if (bundle != null) { - category = bundle.getString(MATH_ENTITY_CATEGORY_EXTRA_STRING); - } - - ui.onCreate(this); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return ui.onCreateView(this, inflater, container); - } - - @Override - public void onViewCreated(View root, Bundle savedInstanceState) { - super.onViewCreated(root, savedInstanceState); - - ui.onViewCreated(this, root); - - final ListView lv = getListView(); - lv.setTextFilterEnabled(true); - - lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { - public void onItemClick(final AdapterView parent, - final View view, - final int position, - final long id) { - final AMenuItem onClick = getOnClickAction(); - if (onClick != null) { - onClick.onClick(((T) parent.getItemAtPosition(position)), getActivity()); - } - } - }); - - getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { - @Override - public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { - final T item = (T) parent.getItemAtPosition(position); - - final List> menuItems = getMenuItemsOnLongClick(item); - - if (!menuItems.isEmpty()) { - final ContextMenuBuilder, T> menuBuilder = ContextMenuBuilder.newInstance(AbstractMathEntityListFragment.this.getActivity(), "math-entity-menu", ListContextMenu.newInstance(menuItems)); - menuBuilder.build(item).show(); - } - - return true; - } - }); - } - - @Nullable - protected abstract AMenuItem getOnClickAction(); - - @Override - public void onDestroyView() { - ui.onDestroyView(this); - super.onDestroyView(); - } - - @Override - public void onDestroy() { - ui.onDestroy(this); - - super.onDestroy(); - } - - @Nonnull - protected abstract List> getMenuItemsOnLongClick(@Nonnull T item); - - @Override - public void onPause() { - this.ui.onPause(this); - - super.onPause(); - } - - @Override - public void onResume() { - super.onResume(); - - this.ui.onResume(this); - - adapter = new MathEntityArrayAdapter(getDescriptionGetter(), this.getActivity(), getMathEntitiesByCategory()); - setListAdapter(adapter); - - sort(); - } - - @Nonnull - private List getMathEntitiesByCategory() { - final List result = getMathEntities(); - - new Filter(new JPredicate() { - @Override - public boolean apply(T t) { - return !isInCategory(t); - } - }).filter(result.iterator()); - - return result; - } - - protected boolean isInCategory(@Nullable T t) { - return t != null && (category == null || Objects.areEqual(getMathEntityCategory(t), category)); - } - - @Nonnull - protected abstract MathEntityDescriptionGetter getDescriptionGetter(); - - @Nonnull - protected abstract List getMathEntities(); - - @Nullable - abstract String getMathEntityCategory(@Nonnull T t); - - protected void sort() { - final MathEntityArrayAdapter localAdapter = adapter; - if (localAdapter != null) { - localAdapter.sort(new Comparator() { - @Override - public int compare(T function1, T function2) { - return function1.getName().compareTo(function2.getName()); - } - }); - - localAdapter.notifyDataSetChanged(); - } - } - - public void addToAdapter(@Nonnull T mathEntity) { - if (this.adapter != null) { - this.adapter.add(mathEntity); - } - } - - public void removeFromAdapter(@Nonnull T mathEntity) { - if (this.adapter != null) { - this.adapter.remove(mathEntity); - } - } - - public void notifyAdapter() { - if (this.adapter != null) { - this.adapter.notifyDataSetChanged(); - } - } - - @Nullable - protected MathEntityArrayAdapter getAdapter() { - return adapter; - } - - @Nonnull - protected Handler getUiHandler() { - return uiHandler; - } - - @Override - public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { - } - - /* - ********************************************************************** - * - * STATIC - * - ********************************************************************** - */ - - protected static interface MathEntityDescriptionGetter { - - @Nullable - String getDescription(@Nonnull Context context, @Nonnull String mathEntityName); - } - - protected static class MathEntityArrayAdapter extends ArrayAdapter { - - @Nonnull - private final MathEntityDescriptionGetter descriptionGetter; - - private MathEntityArrayAdapter(@Nonnull MathEntityDescriptionGetter descriptionGetter, - @Nonnull Context context, - @Nonnull List objects) { - super(context, R.layout.math_entity, R.id.math_entity_text, objects); - this.descriptionGetter = descriptionGetter; - } - - @Override - public View getView(int position, @Nullable View convertView, ViewGroup parent) { - final ViewGroup result; - - if (convertView == null) { - result = (ViewGroup) super.getView(position, convertView, parent); - fillView(position, result); - } else { - result = (ViewGroup) convertView; - fillView(position, result); - } - - - return result; - } - - private void fillView(int position, @Nonnull ViewGroup result) { - final T mathEntity = getItem(position); - - final TextView text = (TextView) result.findViewById(R.id.math_entity_text); - text.setText(String.valueOf(mathEntity)); - - final String mathEntityDescription = descriptionGetter.getDescription(getContext(), mathEntity.getName()); - - final TextView description = (TextView) result.findViewById(R.id.math_entity_short_description); - if (!Strings.isEmpty(mathEntityDescription)) { - description.setVisibility(View.VISIBLE); - description.setText(mathEntityDescription); - } else { - description.setVisibility(View.GONE); - } - } - } - - protected static class MathEntityDescriptionGetterImpl implements MathEntityDescriptionGetter { - - @Nonnull - private final CalculatorMathRegistry mathRegistry; - - public MathEntityDescriptionGetterImpl(@Nonnull CalculatorMathRegistry mathRegistry) { - this.mathRegistry = mathRegistry; - } - - @Override - public String getDescription(@Nonnull Context context, @Nonnull String mathEntityName) { - return this.mathRegistry.getDescription(mathEntityName); - } - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.math.edit; + +import android.content.Context; +import android.os.Bundle; +import android.os.Handler; +import android.support.v4.app.ListFragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.TextView; + +import org.solovyev.android.calculator.CalculatorApplication; +import org.solovyev.android.calculator.CalculatorEventData; +import org.solovyev.android.calculator.CalculatorEventListener; +import org.solovyev.android.calculator.CalculatorEventType; +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.CalculatorMathRegistry; +import org.solovyev.android.calculator.FragmentUi; +import org.solovyev.android.calculator.R; +import org.solovyev.android.menu.AMenuItem; +import org.solovyev.android.menu.ContextMenuBuilder; +import org.solovyev.android.menu.LabeledMenuItem; +import org.solovyev.android.menu.ListContextMenu; +import org.solovyev.common.JPredicate; +import org.solovyev.common.Objects; +import org.solovyev.common.filter.Filter; +import org.solovyev.common.math.MathEntity; +import org.solovyev.common.text.Strings; + +import java.util.Comparator; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + + +/** + * User: serso + * Date: 12/21/11 + * Time: 9:24 PM + */ +public abstract class AbstractMathEntityListFragment extends ListFragment implements CalculatorEventListener { + + /* + ********************************************************************** + * + * CONSTANTS + * + ********************************************************************** + */ + + public static final String MATH_ENTITY_CATEGORY_EXTRA_STRING = "org.solovyev.android.calculator.CalculatorVarsActivity_math_entity_category"; + + + /* + ********************************************************************** + * + * FIELDS + * + ********************************************************************** + */ + @Nonnull + private final FragmentUi ui; + @Nonnull + private final Handler uiHandler = new Handler(); + @Nullable + private MathEntityArrayAdapter adapter; + @Nullable + private String category; + + protected AbstractMathEntityListFragment(@Nonnull CalculatorFragmentType fragmentType) { + ui = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId()); + } + + @Nonnull + public static Bundle createBundleFor(@Nonnull String categoryId) { + final Bundle result = new Bundle(1); + putCategory(result, categoryId); + return result; + } + + static void putCategory(@Nonnull Bundle bundle, @Nonnull String categoryId) { + bundle.putString(MATH_ENTITY_CATEGORY_EXTRA_STRING, categoryId); + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + final Bundle bundle = getArguments(); + if (bundle != null) { + category = bundle.getString(MATH_ENTITY_CATEGORY_EXTRA_STRING); + } + + ui.onCreate(this); + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + return ui.onCreateView(this, inflater, container); + } + + @Override + public void onViewCreated(View root, Bundle savedInstanceState) { + super.onViewCreated(root, savedInstanceState); + + ui.onViewCreated(this, root); + + final ListView lv = getListView(); + lv.setTextFilterEnabled(true); + + lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { + public void onItemClick(final AdapterView parent, + final View view, + final int position, + final long id) { + final AMenuItem onClick = getOnClickAction(); + if (onClick != null) { + onClick.onClick(((T) parent.getItemAtPosition(position)), getActivity()); + } + } + }); + + getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { + @Override + public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { + final T item = (T) parent.getItemAtPosition(position); + + final List> menuItems = getMenuItemsOnLongClick(item); + + if (!menuItems.isEmpty()) { + final ContextMenuBuilder, T> menuBuilder = ContextMenuBuilder.newInstance(AbstractMathEntityListFragment.this.getActivity(), "math-entity-menu", ListContextMenu.newInstance(menuItems)); + menuBuilder.build(item).show(); + } + + return true; + } + }); + } + + @Nullable + protected abstract AMenuItem getOnClickAction(); + + @Override + public void onDestroyView() { + ui.onDestroyView(this); + super.onDestroyView(); + } + + @Override + public void onDestroy() { + ui.onDestroy(this); + + super.onDestroy(); + } + + @Nonnull + protected abstract List> getMenuItemsOnLongClick(@Nonnull T item); + + @Override + public void onPause() { + this.ui.onPause(this); + + super.onPause(); + } + + @Override + public void onResume() { + super.onResume(); + + this.ui.onResume(this); + + adapter = new MathEntityArrayAdapter(getDescriptionGetter(), this.getActivity(), getMathEntitiesByCategory()); + setListAdapter(adapter); + + sort(); + } + + @Nonnull + private List getMathEntitiesByCategory() { + final List result = getMathEntities(); + + new Filter(new JPredicate() { + @Override + public boolean apply(T t) { + return !isInCategory(t); + } + }).filter(result.iterator()); + + return result; + } + + protected boolean isInCategory(@Nullable T t) { + return t != null && (category == null || Objects.areEqual(getMathEntityCategory(t), category)); + } + + @Nonnull + protected abstract MathEntityDescriptionGetter getDescriptionGetter(); + + @Nonnull + protected abstract List getMathEntities(); + + @Nullable + abstract String getMathEntityCategory(@Nonnull T t); + + protected void sort() { + final MathEntityArrayAdapter localAdapter = adapter; + if (localAdapter != null) { + localAdapter.sort(new Comparator() { + @Override + public int compare(T function1, T function2) { + return function1.getName().compareTo(function2.getName()); + } + }); + + localAdapter.notifyDataSetChanged(); + } + } + + public void addToAdapter(@Nonnull T mathEntity) { + if (this.adapter != null) { + this.adapter.add(mathEntity); + } + } + + public void removeFromAdapter(@Nonnull T mathEntity) { + if (this.adapter != null) { + this.adapter.remove(mathEntity); + } + } + + public void notifyAdapter() { + if (this.adapter != null) { + this.adapter.notifyDataSetChanged(); + } + } + + @Nullable + protected MathEntityArrayAdapter getAdapter() { + return adapter; + } + + @Nonnull + protected Handler getUiHandler() { + return uiHandler; + } + + @Override + public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { + } + + /* + ********************************************************************** + * + * STATIC + * + ********************************************************************** + */ + + protected static interface MathEntityDescriptionGetter { + + @Nullable + String getDescription(@Nonnull Context context, @Nonnull String mathEntityName); + } + + protected static class MathEntityArrayAdapter extends ArrayAdapter { + + @Nonnull + private final MathEntityDescriptionGetter descriptionGetter; + + private MathEntityArrayAdapter(@Nonnull MathEntityDescriptionGetter descriptionGetter, + @Nonnull Context context, + @Nonnull List objects) { + super(context, R.layout.math_entity, R.id.math_entity_text, objects); + this.descriptionGetter = descriptionGetter; + } + + @Override + public View getView(int position, @Nullable View convertView, ViewGroup parent) { + final ViewGroup result; + + if (convertView == null) { + result = (ViewGroup) super.getView(position, convertView, parent); + fillView(position, result); + } else { + result = (ViewGroup) convertView; + fillView(position, result); + } + + + return result; + } + + private void fillView(int position, @Nonnull ViewGroup result) { + final T mathEntity = getItem(position); + + final TextView text = (TextView) result.findViewById(R.id.math_entity_text); + text.setText(String.valueOf(mathEntity)); + + final String mathEntityDescription = descriptionGetter.getDescription(getContext(), mathEntity.getName()); + + final TextView description = (TextView) result.findViewById(R.id.math_entity_short_description); + if (!Strings.isEmpty(mathEntityDescription)) { + description.setVisibility(View.VISIBLE); + description.setText(mathEntityDescription); + } else { + description.setVisibility(View.GONE); + } + } + } + + protected static class MathEntityDescriptionGetterImpl implements MathEntityDescriptionGetter { + + @Nonnull + private final CalculatorMathRegistry mathRegistry; + + public MathEntityDescriptionGetterImpl(@Nonnull CalculatorMathRegistry mathRegistry) { + this.mathRegistry = mathRegistry; + } + + @Override + public String getDescription(@Nonnull Context context, @Nonnull String mathEntityName) { + return this.mathRegistry.getDescription(mathEntityName); + } + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsActivity.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsActivity.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java index eac0912b..e15c8607 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorFunctionsFragment.java @@ -1,280 +1,280 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.math.edit; - -import android.app.Activity; -import android.content.Context; -import android.os.Bundle; -import android.os.Parcelable; -import android.support.v7.app.ActionBarActivity; -import android.text.ClipboardManager; -import android.view.View; -import android.widget.ListView; - -import com.melnykov.fab.FloatingActionButton; - -import org.solovyev.android.calculator.CalculatorEventData; -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.CalculatorMathRegistry; -import org.solovyev.android.calculator.Change; -import org.solovyev.android.calculator.Locator; -import org.solovyev.android.calculator.R; -import org.solovyev.android.calculator.function.FunctionEditDialogFragment; -import org.solovyev.android.menu.AMenuItem; -import org.solovyev.android.menu.LabeledMenuItem; -import org.solovyev.common.text.Strings; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import jscl.math.function.Function; -import jscl.math.function.IFunction; - -/** - * User: serso - * Date: 10/29/11 - * Time: 4:55 PM - */ -public class CalculatorFunctionsFragment extends AbstractMathEntityListFragment { - - public static final String CREATE_FUNCTION_EXTRA = "create_function"; - - public CalculatorFunctionsFragment() { - super(CalculatorFragmentType.functions); - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - final Bundle bundle = getArguments(); - if (bundle != null) { - final Parcelable parcelable = bundle.getParcelable(CREATE_FUNCTION_EXTRA); - if (parcelable instanceof FunctionEditDialogFragment.Input) { - FunctionEditDialogFragment.showDialog((FunctionEditDialogFragment.Input) parcelable, getFragmentManager()); - - // in order to stop intent for other tabs - bundle.remove(CREATE_FUNCTION_EXTRA); - } - } - - setHasOptionsMenu(true); - - } - - @Override - public void onViewCreated(View root, Bundle savedInstanceState) { - super.onViewCreated(root, savedInstanceState); - - final ListView lv = getListView(); - final FloatingActionButton fab = (FloatingActionButton) root.findViewById(R.id.fab); - fab.setVisibility(View.VISIBLE); - fab.attachToListView(lv); - fab.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - FunctionEditDialogFragment.showDialog(FunctionEditDialogFragment.Input.newInstance(), getFragmentManager()); - } - }); - } - - @Override - protected AMenuItem getOnClickAction() { - return LongClickMenuItem.use; - } - - @Nonnull - @Override - protected List> getMenuItemsOnLongClick(@Nonnull Function item) { - List> result = new ArrayList>(Arrays.asList(LongClickMenuItem.values())); - - final CalculatorMathRegistry functionsRegistry = Locator.getInstance().getEngine().getFunctionsRegistry(); - if (Strings.isEmpty(functionsRegistry.getDescription(item.getName()))) { - result.remove(LongClickMenuItem.copy_description); - } - - final Function function = functionsRegistry.get(item.getName()); - if (function == null || function.isSystem()) { - result.remove(LongClickMenuItem.edit); - result.remove(LongClickMenuItem.remove); - } - - return result; - } - - @Nonnull - @Override - protected MathEntityDescriptionGetter getDescriptionGetter() { - return new MathEntityDescriptionGetterImpl(Locator.getInstance().getEngine().getFunctionsRegistry()); - } - - @Nonnull - @Override - protected List getMathEntities() { - return new ArrayList(Locator.getInstance().getEngine().getFunctionsRegistry().getEntities()); - } - - @Override - protected String getMathEntityCategory(@Nonnull Function function) { - return Locator.getInstance().getEngine().getFunctionsRegistry().getCategory(function); - } - - @Override - public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { - super.onCalculatorEvent(calculatorEventData, calculatorEventType, data); - - switch (calculatorEventType) { - case function_added: - processFunctionAdded((Function) data); - break; - - case function_changed: - processFunctionChanged((Change) data); - break; - - case function_removed: - processFunctionRemoved((Function) data); - break; - } - } - - - private void processFunctionRemoved(@Nonnull final Function function) { - if (this.isInCategory(function)) { - getUiHandler().post(new Runnable() { - @Override - public void run() { - removeFromAdapter(function); - notifyAdapter(); - } - }); - } - } - - private void processFunctionChanged(@Nonnull final Change change) { - final IFunction newFunction = change.getNewValue(); - - if (newFunction instanceof Function) { - - if (this.isInCategory((Function) newFunction)) { - - getUiHandler().post(new Runnable() { - @Override - public void run() { - IFunction oldValue = change.getOldValue(); - - if (oldValue.isIdDefined()) { - final MathEntityArrayAdapter adapter = getAdapter(); - if (adapter != null) { - for (int i = 0; i < adapter.getCount(); i++) { - final Function functionFromAdapter = adapter.getItem(i); - if (functionFromAdapter.isIdDefined() && oldValue.getId().equals(functionFromAdapter.getId())) { - adapter.remove(functionFromAdapter); - break; - } - } - } - } - - addToAdapter((Function) newFunction); - sort(); - } - }); - } - } else { - throw new IllegalArgumentException("Function must be instance of jscl.math.function.Function class!"); - } - } - - private void processFunctionAdded(@Nonnull final Function function) { - if (this.isInCategory(function)) { - getUiHandler().post(new Runnable() { - @Override - public void run() { - addToAdapter(function); - sort(); - } - }); - } - } - - /* - ********************************************************************** - * - * STATIC - * - ********************************************************************** - */ - - private static enum LongClickMenuItem implements LabeledMenuItem { - use(R.string.c_use) { - @Override - public void onClick(@Nonnull Function function, @Nonnull Context context) { - Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.use_function, function); - } - }, - - edit(R.string.c_edit) { - @Override - public void onClick(@Nonnull Function function, @Nonnull Context context) { - if (function instanceof IFunction) { - FunctionEditDialogFragment.showDialog(FunctionEditDialogFragment.Input.newFromFunction((IFunction) function), ((ActionBarActivity) context).getSupportFragmentManager()); - } - } - }, - - remove(R.string.c_remove) { - @Override - public void onClick(@Nonnull Function function, @Nonnull Context context) { - MathEntityRemover.newFunctionRemover(function, null, context, context).showConfirmationDialog(); - } - }, - - copy_description(R.string.c_copy_description) { - @Override - public void onClick(@Nonnull Function function, @Nonnull Context context) { - final String text = Locator.getInstance().getEngine().getFunctionsRegistry().getDescription(function.getName()); - if (!Strings.isEmpty(text)) { - final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); - clipboard.setText(text); - } - } - }; - private final int captionId; - - LongClickMenuItem(int captionId) { - this.captionId = captionId; - } - - @Nonnull - @Override - public String getCaption(@Nonnull Context context) { - return context.getString(captionId); - } - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.math.edit; + +import android.app.Activity; +import android.content.Context; +import android.os.Bundle; +import android.os.Parcelable; +import android.support.v7.app.ActionBarActivity; +import android.text.ClipboardManager; +import android.view.View; +import android.widget.ListView; + +import com.melnykov.fab.FloatingActionButton; + +import org.solovyev.android.calculator.CalculatorEventData; +import org.solovyev.android.calculator.CalculatorEventType; +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.CalculatorMathRegistry; +import org.solovyev.android.calculator.Change; +import org.solovyev.android.calculator.Locator; +import org.solovyev.android.calculator.R; +import org.solovyev.android.calculator.function.FunctionEditDialogFragment; +import org.solovyev.android.menu.AMenuItem; +import org.solovyev.android.menu.LabeledMenuItem; +import org.solovyev.common.text.Strings; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import jscl.math.function.Function; +import jscl.math.function.IFunction; + +/** + * User: serso + * Date: 10/29/11 + * Time: 4:55 PM + */ +public class CalculatorFunctionsFragment extends AbstractMathEntityListFragment { + + public static final String CREATE_FUNCTION_EXTRA = "create_function"; + + public CalculatorFunctionsFragment() { + super(CalculatorFragmentType.functions); + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + final Bundle bundle = getArguments(); + if (bundle != null) { + final Parcelable parcelable = bundle.getParcelable(CREATE_FUNCTION_EXTRA); + if (parcelable instanceof FunctionEditDialogFragment.Input) { + FunctionEditDialogFragment.showDialog((FunctionEditDialogFragment.Input) parcelable, getFragmentManager()); + + // in order to stop intent for other tabs + bundle.remove(CREATE_FUNCTION_EXTRA); + } + } + + setHasOptionsMenu(true); + + } + + @Override + public void onViewCreated(View root, Bundle savedInstanceState) { + super.onViewCreated(root, savedInstanceState); + + final ListView lv = getListView(); + final FloatingActionButton fab = (FloatingActionButton) root.findViewById(R.id.fab); + fab.setVisibility(View.VISIBLE); + fab.attachToListView(lv); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + FunctionEditDialogFragment.showDialog(FunctionEditDialogFragment.Input.newInstance(), getFragmentManager()); + } + }); + } + + @Override + protected AMenuItem getOnClickAction() { + return LongClickMenuItem.use; + } + + @Nonnull + @Override + protected List> getMenuItemsOnLongClick(@Nonnull Function item) { + List> result = new ArrayList>(Arrays.asList(LongClickMenuItem.values())); + + final CalculatorMathRegistry functionsRegistry = Locator.getInstance().getEngine().getFunctionsRegistry(); + if (Strings.isEmpty(functionsRegistry.getDescription(item.getName()))) { + result.remove(LongClickMenuItem.copy_description); + } + + final Function function = functionsRegistry.get(item.getName()); + if (function == null || function.isSystem()) { + result.remove(LongClickMenuItem.edit); + result.remove(LongClickMenuItem.remove); + } + + return result; + } + + @Nonnull + @Override + protected MathEntityDescriptionGetter getDescriptionGetter() { + return new MathEntityDescriptionGetterImpl(Locator.getInstance().getEngine().getFunctionsRegistry()); + } + + @Nonnull + @Override + protected List getMathEntities() { + return new ArrayList(Locator.getInstance().getEngine().getFunctionsRegistry().getEntities()); + } + + @Override + protected String getMathEntityCategory(@Nonnull Function function) { + return Locator.getInstance().getEngine().getFunctionsRegistry().getCategory(function); + } + + @Override + public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { + super.onCalculatorEvent(calculatorEventData, calculatorEventType, data); + + switch (calculatorEventType) { + case function_added: + processFunctionAdded((Function) data); + break; + + case function_changed: + processFunctionChanged((Change) data); + break; + + case function_removed: + processFunctionRemoved((Function) data); + break; + } + } + + + private void processFunctionRemoved(@Nonnull final Function function) { + if (this.isInCategory(function)) { + getUiHandler().post(new Runnable() { + @Override + public void run() { + removeFromAdapter(function); + notifyAdapter(); + } + }); + } + } + + private void processFunctionChanged(@Nonnull final Change change) { + final IFunction newFunction = change.getNewValue(); + + if (newFunction instanceof Function) { + + if (this.isInCategory((Function) newFunction)) { + + getUiHandler().post(new Runnable() { + @Override + public void run() { + IFunction oldValue = change.getOldValue(); + + if (oldValue.isIdDefined()) { + final MathEntityArrayAdapter adapter = getAdapter(); + if (adapter != null) { + for (int i = 0; i < adapter.getCount(); i++) { + final Function functionFromAdapter = adapter.getItem(i); + if (functionFromAdapter.isIdDefined() && oldValue.getId().equals(functionFromAdapter.getId())) { + adapter.remove(functionFromAdapter); + break; + } + } + } + } + + addToAdapter((Function) newFunction); + sort(); + } + }); + } + } else { + throw new IllegalArgumentException("Function must be instance of jscl.math.function.Function class!"); + } + } + + private void processFunctionAdded(@Nonnull final Function function) { + if (this.isInCategory(function)) { + getUiHandler().post(new Runnable() { + @Override + public void run() { + addToAdapter(function); + sort(); + } + }); + } + } + + /* + ********************************************************************** + * + * STATIC + * + ********************************************************************** + */ + + private static enum LongClickMenuItem implements LabeledMenuItem { + use(R.string.c_use) { + @Override + public void onClick(@Nonnull Function function, @Nonnull Context context) { + Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.use_function, function); + } + }, + + edit(R.string.c_edit) { + @Override + public void onClick(@Nonnull Function function, @Nonnull Context context) { + if (function instanceof IFunction) { + FunctionEditDialogFragment.showDialog(FunctionEditDialogFragment.Input.newFromFunction((IFunction) function), ((ActionBarActivity) context).getSupportFragmentManager()); + } + } + }, + + remove(R.string.c_remove) { + @Override + public void onClick(@Nonnull Function function, @Nonnull Context context) { + MathEntityRemover.newFunctionRemover(function, null, context, context).showConfirmationDialog(); + } + }, + + copy_description(R.string.c_copy_description) { + @Override + public void onClick(@Nonnull Function function, @Nonnull Context context) { + final String text = Locator.getInstance().getEngine().getFunctionsRegistry().getDescription(function.getName()); + if (!Strings.isEmpty(text)) { + final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); + clipboard.setText(text); + } + } + }; + private final int captionId; + + LongClickMenuItem(int captionId) { + this.captionId = captionId; + } + + @Nonnull + @Override + public String getCaption(@Nonnull Context context) { + return context.getString(captionId); + } + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsActivity.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsActivity.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java index 71e57a19..f6017815 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorOperatorsFragment.java @@ -1,158 +1,158 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.math.edit; - -import android.app.Activity; -import android.content.Context; -import android.text.ClipboardManager; - -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.Locator; -import org.solovyev.android.calculator.R; -import org.solovyev.android.menu.AMenuItem; -import org.solovyev.android.menu.LabeledMenuItem; -import org.solovyev.common.text.Strings; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Nonnull; - -import jscl.math.operator.Operator; - -/** - * User: serso - * Date: 11/17/11 - * Time: 1:53 PM - */ - -public class CalculatorOperatorsFragment extends AbstractMathEntityListFragment { - - public CalculatorOperatorsFragment() { - super(CalculatorFragmentType.operators); - } - - @Override - protected AMenuItem getOnClickAction() { - return LongClickMenuItem.use; - } - - @Nonnull - @Override - protected List> getMenuItemsOnLongClick(@Nonnull Operator item) { - final List> result = new ArrayList>(Arrays.asList(LongClickMenuItem.values())); - - if (Strings.isEmpty(OperatorDescriptionGetter.instance.getDescription(this.getActivity(), item.getName()))) { - result.remove(LongClickMenuItem.copy_description); - } - - return result; - } - - @Nonnull - @Override - protected MathEntityDescriptionGetter getDescriptionGetter() { - return OperatorDescriptionGetter.instance; - } - - - @Nonnull - @Override - protected List getMathEntities() { - final List result = new ArrayList(); - - result.addAll(Locator.getInstance().getEngine().getOperatorsRegistry().getEntities()); - result.addAll(Locator.getInstance().getEngine().getPostfixFunctionsRegistry().getEntities()); - - return result; - } - - @Override - protected String getMathEntityCategory(@Nonnull Operator operator) { - String result = Locator.getInstance().getEngine().getOperatorsRegistry().getCategory(operator); - if (result == null) { - result = Locator.getInstance().getEngine().getPostfixFunctionsRegistry().getCategory(operator); - } - - return result; - } - - private static enum OperatorDescriptionGetter implements MathEntityDescriptionGetter { - - instance; - - @Override - public String getDescription(@Nonnull Context context, @Nonnull String mathEntityName) { - String result = Locator.getInstance().getEngine().getOperatorsRegistry().getDescription(mathEntityName); - if (Strings.isEmpty(result)) { - result = Locator.getInstance().getEngine().getPostfixFunctionsRegistry().getDescription(mathEntityName); - } - - return result; - } - } - - /* - ********************************************************************** - * - * STATIC - * - ********************************************************************** - */ - - private static enum LongClickMenuItem implements LabeledMenuItem { - - use(R.string.c_use) { - @Override - public void onClick(@Nonnull Operator data, @Nonnull Context context) { - Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.use_operator, data); - } - }, - - copy_description(R.string.c_copy_description) { - @Override - public void onClick(@Nonnull Operator data, @Nonnull Context context) { - final String text = OperatorDescriptionGetter.instance.getDescription(context, data.getName()); - if (!Strings.isEmpty(text)) { - final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); - clipboard.setText(text); - } - } - }; - private final int captionId; - - LongClickMenuItem(int captionId) { - this.captionId = captionId; - } - - @Nonnull - @Override - public String getCaption(@Nonnull Context context) { - return context.getString(captionId); - } - } - -} - +/* + * 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 + */ + +package org.solovyev.android.calculator.math.edit; + +import android.app.Activity; +import android.content.Context; +import android.text.ClipboardManager; + +import org.solovyev.android.calculator.CalculatorEventType; +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.Locator; +import org.solovyev.android.calculator.R; +import org.solovyev.android.menu.AMenuItem; +import org.solovyev.android.menu.LabeledMenuItem; +import org.solovyev.common.text.Strings; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Nonnull; + +import jscl.math.operator.Operator; + +/** + * User: serso + * Date: 11/17/11 + * Time: 1:53 PM + */ + +public class CalculatorOperatorsFragment extends AbstractMathEntityListFragment { + + public CalculatorOperatorsFragment() { + super(CalculatorFragmentType.operators); + } + + @Override + protected AMenuItem getOnClickAction() { + return LongClickMenuItem.use; + } + + @Nonnull + @Override + protected List> getMenuItemsOnLongClick(@Nonnull Operator item) { + final List> result = new ArrayList>(Arrays.asList(LongClickMenuItem.values())); + + if (Strings.isEmpty(OperatorDescriptionGetter.instance.getDescription(this.getActivity(), item.getName()))) { + result.remove(LongClickMenuItem.copy_description); + } + + return result; + } + + @Nonnull + @Override + protected MathEntityDescriptionGetter getDescriptionGetter() { + return OperatorDescriptionGetter.instance; + } + + + @Nonnull + @Override + protected List getMathEntities() { + final List result = new ArrayList(); + + result.addAll(Locator.getInstance().getEngine().getOperatorsRegistry().getEntities()); + result.addAll(Locator.getInstance().getEngine().getPostfixFunctionsRegistry().getEntities()); + + return result; + } + + @Override + protected String getMathEntityCategory(@Nonnull Operator operator) { + String result = Locator.getInstance().getEngine().getOperatorsRegistry().getCategory(operator); + if (result == null) { + result = Locator.getInstance().getEngine().getPostfixFunctionsRegistry().getCategory(operator); + } + + return result; + } + + private static enum OperatorDescriptionGetter implements MathEntityDescriptionGetter { + + instance; + + @Override + public String getDescription(@Nonnull Context context, @Nonnull String mathEntityName) { + String result = Locator.getInstance().getEngine().getOperatorsRegistry().getDescription(mathEntityName); + if (Strings.isEmpty(result)) { + result = Locator.getInstance().getEngine().getPostfixFunctionsRegistry().getDescription(mathEntityName); + } + + return result; + } + } + + /* + ********************************************************************** + * + * STATIC + * + ********************************************************************** + */ + + private static enum LongClickMenuItem implements LabeledMenuItem { + + use(R.string.c_use) { + @Override + public void onClick(@Nonnull Operator data, @Nonnull Context context) { + Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.use_operator, data); + } + }, + + copy_description(R.string.c_copy_description) { + @Override + public void onClick(@Nonnull Operator data, @Nonnull Context context) { + final String text = OperatorDescriptionGetter.instance.getDescription(context, data.getName()); + if (!Strings.isEmpty(text)) { + final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Activity.CLIPBOARD_SERVICE); + clipboard.setText(text); + } + } + }; + private final int captionId; + + LongClickMenuItem(int captionId) { + this.captionId = captionId; + } + + @Nonnull + @Override + public String getCaption(@Nonnull Context context) { + return context.getString(captionId); + } + } + +} + diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java index 01ec409c..bb5e7a4e 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsFragment.java @@ -1,294 +1,294 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.math.edit; - -import android.content.Context; -import android.os.Bundle; -import android.support.v7.app.ActionBarActivity; -import android.view.View; -import android.widget.ListView; - -import com.melnykov.fab.FloatingActionButton; - -import org.solovyev.android.calculator.CalculatorEventData; -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.android.calculator.CalculatorFragmentType; -import org.solovyev.android.calculator.CalculatorParseException; -import org.solovyev.android.calculator.Change; -import org.solovyev.android.calculator.Locator; -import org.solovyev.android.calculator.PreparedExpression; -import org.solovyev.android.calculator.R; -import org.solovyev.android.calculator.ToJsclTextProcessor; -import org.solovyev.android.calculator.math.MathType; -import org.solovyev.android.menu.AMenuItem; -import org.solovyev.android.menu.LabeledMenuItem; -import org.solovyev.common.JPredicate; -import org.solovyev.common.collections.Collections; -import org.solovyev.common.text.Strings; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import jscl.math.function.IConstant; - -/** - * User: serso - * Date: 9/28/11 - * Time: 10:55 PM - */ -public class CalculatorVarsFragment extends AbstractMathEntityListFragment { - - public static final String CREATE_VAR_EXTRA_STRING = "create_var"; - - public CalculatorVarsFragment() { - super(CalculatorFragmentType.variables); - } - - public static boolean isValidValue(@Nonnull String value) { - try { - final PreparedExpression expression = ToJsclTextProcessor.getInstance().process(value); - final List constants = expression.getUndefinedVars(); - return constants.isEmpty(); - } catch (RuntimeException e) { - return true; - } catch (CalculatorParseException e) { - return true; - } - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - final Bundle bundle = getArguments(); - if (bundle != null) { - final String varValue = bundle.getString(CREATE_VAR_EXTRA_STRING); - if (!Strings.isEmpty(varValue)) { - VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newFromValue(varValue), getFragmentManager()); - - // in order to stop intent for other tabs - bundle.remove(CREATE_VAR_EXTRA_STRING); - } - } - - setHasOptionsMenu(true); - } - - @Override - public void onViewCreated(View root, Bundle savedInstanceState) { - super.onViewCreated(root, savedInstanceState); - - final ListView lv = getListView(); - final FloatingActionButton fab = (FloatingActionButton) root.findViewById(R.id.fab); - fab.setVisibility(View.VISIBLE); - fab.attachToListView(lv); - fab.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newInstance(), getFragmentManager()); - } - }); - } - - @Override - protected AMenuItem getOnClickAction() { - return LongClickMenuItem.use; - } - - @Nonnull - @Override - protected List> getMenuItemsOnLongClick(@Nonnull IConstant item) { - final List> result = new ArrayList>(Arrays.asList(LongClickMenuItem.values())); - - if (item.isSystem()) { - result.remove(LongClickMenuItem.edit); - result.remove(LongClickMenuItem.remove); - } - - if (Strings.isEmpty(Locator.getInstance().getEngine().getVarsRegistry().getDescription(item.getName()))) { - result.remove(LongClickMenuItem.copy_description); - } - - if (Strings.isEmpty(item.getValue())) { - result.remove(LongClickMenuItem.copy_value); - } - - return result; - } - - @Nonnull - @Override - protected MathEntityDescriptionGetter getDescriptionGetter() { - return new MathEntityDescriptionGetterImpl(Locator.getInstance().getEngine().getVarsRegistry()); - } - - @SuppressWarnings({"UnusedDeclaration"}) - public void addVarButtonClickHandler(@Nonnull View v) { - VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newInstance(), this.getActivity().getSupportFragmentManager()); - } - - @Nonnull - @Override - protected List getMathEntities() { - final List result = new ArrayList(Locator.getInstance().getEngine().getVarsRegistry().getEntities()); - - Collections.removeAll(result, new JPredicate() { - @Override - public boolean apply(@Nullable IConstant var) { - return var != null && Collections.contains(var.getName(), MathType.INFINITY_JSCL, MathType.NAN); - } - }); - - return result; - } - - @Override - protected String getMathEntityCategory(@Nonnull IConstant var) { - return Locator.getInstance().getEngine().getVarsRegistry().getCategory(var); - } - - @Override - public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { - super.onCalculatorEvent(calculatorEventData, calculatorEventType, data); - - switch (calculatorEventType) { - case constant_added: - processConstantAdded((IConstant) data); - break; - - case constant_changed: - processConstantChanged((Change) data); - break; - - case constant_removed: - processConstantRemoved((IConstant) data); - break; - } - } - - private void processConstantRemoved(@Nonnull final IConstant constant) { - if (this.isInCategory(constant)) { - getUiHandler().post(new Runnable() { - @Override - public void run() { - removeFromAdapter(constant); - notifyAdapter(); - } - }); - } - } - - private void processConstantChanged(@Nonnull final Change change) { - final IConstant newConstant = change.getNewValue(); - if (this.isInCategory(newConstant)) { - getUiHandler().post(new Runnable() { - @Override - public void run() { - removeFromAdapter(change.getOldValue()); - addToAdapter(newConstant); - sort(); - } - }); - } - } - - private void processConstantAdded(@Nonnull final IConstant constant) { - if (this.isInCategory(constant)) { - getUiHandler().post(new Runnable() { - @Override - public void run() { - addToAdapter(constant); - sort(); - } - }); - } - } - - /* - ********************************************************************** - * - * STATIC - * - ********************************************************************** - */ - - private static enum LongClickMenuItem implements LabeledMenuItem { - use(R.string.c_use) { - @Override - public void onClick(@Nonnull IConstant data, @Nonnull Context context) { - Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.use_constant, data); - } - }, - - edit(R.string.c_edit) { - @Override - public void onClick(@Nonnull IConstant constant, @Nonnull Context context) { - VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newFromConstant(constant), ((ActionBarActivity) context).getSupportFragmentManager()); - } - }, - - remove(R.string.c_remove) { - @Override - public void onClick(@Nonnull IConstant constant, @Nonnull Context context) { - MathEntityRemover.newConstantRemover(constant, null, context, context).showConfirmationDialog(); - } - }, - - copy_value(R.string.c_copy_value) { - @Override - public void onClick(@Nonnull IConstant data, @Nonnull Context context) { - final String text = data.getValue(); - if (!Strings.isEmpty(text)) { - if (text == null) throw new AssertionError(); - Locator.getInstance().getClipboard().setText(text); - } - } - }, - - copy_description(R.string.c_copy_description) { - @Override - public void onClick(@Nonnull IConstant data, @Nonnull Context context) { - final String text = Locator.getInstance().getEngine().getVarsRegistry().getDescription(data.getName()); - if (!Strings.isEmpty(text)) { - if (text == null) throw new AssertionError(); - Locator.getInstance().getClipboard().setText(text); - } - } - }; - private final int captionId; - - LongClickMenuItem(int captionId) { - this.captionId = captionId; - } - - @Nonnull - @Override - public String getCaption(@Nonnull Context context) { - return context.getString(captionId); - } - } -} +/* + * 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 + */ + +package org.solovyev.android.calculator.math.edit; + +import android.content.Context; +import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.ListView; + +import com.melnykov.fab.FloatingActionButton; + +import org.solovyev.android.calculator.CalculatorEventData; +import org.solovyev.android.calculator.CalculatorEventType; +import org.solovyev.android.calculator.CalculatorFragmentType; +import org.solovyev.android.calculator.CalculatorParseException; +import org.solovyev.android.calculator.Change; +import org.solovyev.android.calculator.Locator; +import org.solovyev.android.calculator.PreparedExpression; +import org.solovyev.android.calculator.R; +import org.solovyev.android.calculator.ToJsclTextProcessor; +import org.solovyev.android.calculator.math.MathType; +import org.solovyev.android.menu.AMenuItem; +import org.solovyev.android.menu.LabeledMenuItem; +import org.solovyev.common.JPredicate; +import org.solovyev.common.collections.Collections; +import org.solovyev.common.text.Strings; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import jscl.math.function.IConstant; + +/** + * User: serso + * Date: 9/28/11 + * Time: 10:55 PM + */ +public class CalculatorVarsFragment extends AbstractMathEntityListFragment { + + public static final String CREATE_VAR_EXTRA_STRING = "create_var"; + + public CalculatorVarsFragment() { + super(CalculatorFragmentType.variables); + } + + public static boolean isValidValue(@Nonnull String value) { + try { + final PreparedExpression expression = ToJsclTextProcessor.getInstance().process(value); + final List constants = expression.getUndefinedVars(); + return constants.isEmpty(); + } catch (RuntimeException e) { + return true; + } catch (CalculatorParseException e) { + return true; + } + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + final Bundle bundle = getArguments(); + if (bundle != null) { + final String varValue = bundle.getString(CREATE_VAR_EXTRA_STRING); + if (!Strings.isEmpty(varValue)) { + VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newFromValue(varValue), getFragmentManager()); + + // in order to stop intent for other tabs + bundle.remove(CREATE_VAR_EXTRA_STRING); + } + } + + setHasOptionsMenu(true); + } + + @Override + public void onViewCreated(View root, Bundle savedInstanceState) { + super.onViewCreated(root, savedInstanceState); + + final ListView lv = getListView(); + final FloatingActionButton fab = (FloatingActionButton) root.findViewById(R.id.fab); + fab.setVisibility(View.VISIBLE); + fab.attachToListView(lv); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newInstance(), getFragmentManager()); + } + }); + } + + @Override + protected AMenuItem getOnClickAction() { + return LongClickMenuItem.use; + } + + @Nonnull + @Override + protected List> getMenuItemsOnLongClick(@Nonnull IConstant item) { + final List> result = new ArrayList>(Arrays.asList(LongClickMenuItem.values())); + + if (item.isSystem()) { + result.remove(LongClickMenuItem.edit); + result.remove(LongClickMenuItem.remove); + } + + if (Strings.isEmpty(Locator.getInstance().getEngine().getVarsRegistry().getDescription(item.getName()))) { + result.remove(LongClickMenuItem.copy_description); + } + + if (Strings.isEmpty(item.getValue())) { + result.remove(LongClickMenuItem.copy_value); + } + + return result; + } + + @Nonnull + @Override + protected MathEntityDescriptionGetter getDescriptionGetter() { + return new MathEntityDescriptionGetterImpl(Locator.getInstance().getEngine().getVarsRegistry()); + } + + @SuppressWarnings({"UnusedDeclaration"}) + public void addVarButtonClickHandler(@Nonnull View v) { + VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newInstance(), this.getActivity().getSupportFragmentManager()); + } + + @Nonnull + @Override + protected List getMathEntities() { + final List result = new ArrayList(Locator.getInstance().getEngine().getVarsRegistry().getEntities()); + + Collections.removeAll(result, new JPredicate() { + @Override + public boolean apply(@Nullable IConstant var) { + return var != null && Collections.contains(var.getName(), MathType.INFINITY_JSCL, MathType.NAN); + } + }); + + return result; + } + + @Override + protected String getMathEntityCategory(@Nonnull IConstant var) { + return Locator.getInstance().getEngine().getVarsRegistry().getCategory(var); + } + + @Override + public void onCalculatorEvent(@Nonnull CalculatorEventData calculatorEventData, @Nonnull CalculatorEventType calculatorEventType, @Nullable Object data) { + super.onCalculatorEvent(calculatorEventData, calculatorEventType, data); + + switch (calculatorEventType) { + case constant_added: + processConstantAdded((IConstant) data); + break; + + case constant_changed: + processConstantChanged((Change) data); + break; + + case constant_removed: + processConstantRemoved((IConstant) data); + break; + } + } + + private void processConstantRemoved(@Nonnull final IConstant constant) { + if (this.isInCategory(constant)) { + getUiHandler().post(new Runnable() { + @Override + public void run() { + removeFromAdapter(constant); + notifyAdapter(); + } + }); + } + } + + private void processConstantChanged(@Nonnull final Change change) { + final IConstant newConstant = change.getNewValue(); + if (this.isInCategory(newConstant)) { + getUiHandler().post(new Runnable() { + @Override + public void run() { + removeFromAdapter(change.getOldValue()); + addToAdapter(newConstant); + sort(); + } + }); + } + } + + private void processConstantAdded(@Nonnull final IConstant constant) { + if (this.isInCategory(constant)) { + getUiHandler().post(new Runnable() { + @Override + public void run() { + addToAdapter(constant); + sort(); + } + }); + } + } + + /* + ********************************************************************** + * + * STATIC + * + ********************************************************************** + */ + + private static enum LongClickMenuItem implements LabeledMenuItem { + use(R.string.c_use) { + @Override + public void onClick(@Nonnull IConstant data, @Nonnull Context context) { + Locator.getInstance().getCalculator().fireCalculatorEvent(CalculatorEventType.use_constant, data); + } + }, + + edit(R.string.c_edit) { + @Override + public void onClick(@Nonnull IConstant constant, @Nonnull Context context) { + VarEditDialogFragment.showDialog(VarEditDialogFragment.Input.newFromConstant(constant), ((ActionBarActivity) context).getSupportFragmentManager()); + } + }, + + remove(R.string.c_remove) { + @Override + public void onClick(@Nonnull IConstant constant, @Nonnull Context context) { + MathEntityRemover.newConstantRemover(constant, null, context, context).showConfirmationDialog(); + } + }, + + copy_value(R.string.c_copy_value) { + @Override + public void onClick(@Nonnull IConstant data, @Nonnull Context context) { + final String text = data.getValue(); + if (!Strings.isEmpty(text)) { + if (text == null) throw new AssertionError(); + Locator.getInstance().getClipboard().setText(text); + } + } + }, + + copy_description(R.string.c_copy_description) { + @Override + public void onClick(@Nonnull IConstant data, @Nonnull Context context) { + final String text = Locator.getInstance().getEngine().getVarsRegistry().getDescription(data.getName()); + if (!Strings.isEmpty(text)) { + if (text == null) throw new AssertionError(); + Locator.getInstance().getClipboard().setText(text); + } + } + }; + private final int captionId; + + LongClickMenuItem(int captionId) { + this.captionId = captionId; + } + + @Nonnull + @Override + public String getCaption(@Nonnull Context context) { + return context.getString(captionId); + } + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/MathEntityRemover.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/MathEntityRemover.java similarity index 100% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/MathEntityRemover.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/MathEntityRemover.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java b/app/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java similarity index 97% rename from android-app/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java rename to app/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java index 6d019752..6d15f61e 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/math/edit/VarEditDialogFragment.java @@ -1,340 +1,340 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator.math.edit; - -import android.annotation.TargetApi; -import android.os.Build; -import android.os.Bundle; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentManager; -import android.text.Editable; -import android.text.TextWatcher; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.EditText; -import android.widget.LinearLayout; -import android.widget.TextView; -import android.widget.Toast; - -import org.solovyev.android.Views; -import org.solovyev.android.calculator.App; -import org.solovyev.android.calculator.CalculatorEventData; -import org.solovyev.android.calculator.CalculatorEventListener; -import org.solovyev.android.calculator.CalculatorEventType; -import org.solovyev.android.calculator.Locator; -import org.solovyev.android.calculator.R; -import org.solovyev.android.calculator.model.Var; -import org.solovyev.common.text.Strings; - -import java.util.Arrays; -import java.util.List; -import java.util.Locale; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import jscl.math.function.IConstant; - -import static android.graphics.Paint.UNDERLINE_TEXT_FLAG; -import static android.view.View.GONE; -import static android.view.View.VISIBLE; -import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; -import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; -import static android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE; -import static android.widget.LinearLayout.HORIZONTAL; - -public class VarEditDialogFragment extends DialogFragment implements CalculatorEventListener { - - private final static String greekAlphabet = "αβγδεζηθικλμνξοπρστυφχψω"; - private final static List acceptableChars = Arrays.asList(Strings.toObjects(("1234567890abcdefghijklmnopqrstuvwxyzйцукенгшщзхъфывапролджэячсмитьбюё_" + greekAlphabet).toCharArray())); - - private Input input; - - public VarEditDialogFragment() { - input = Input.newInstance(); - } - - @Nonnull - public static VarEditDialogFragment create(@Nonnull Input input) { - final VarEditDialogFragment fragment = new VarEditDialogFragment(); - fragment.input = input; - return fragment; - } - - public static void showDialog(@Nonnull Input input, @Nonnull FragmentManager fm) { - App.showDialog(create(input), "constant-editor", fm); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return inflater.inflate(R.layout.var_edit, container, false); - } - - @Override - public void onResume() { - super.onResume(); - - Locator.getInstance().getCalculator().addCalculatorEventListener(this); - } - - @Override - public void onPause() { - Locator.getInstance().getCalculator().removeCalculatorEventListener(this); - - super.onPause(); - } - - @Override - public void onViewCreated(@Nonnull View root, Bundle savedInstanceState) { - super.onViewCreated(root, savedInstanceState); - - final String errorMsg = this.getString(R.string.c_char_is_not_accepted); - - final EditText editName = (EditText) root.findViewById(R.id.var_edit_name); - editName.setText(input.getName()); - editName.addTextChangedListener(new TextWatcher() { - - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - } - - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - } - - @Override - public void afterTextChanged(Editable s) { - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (!acceptableChars.contains(Character.toLowerCase(c))) { - s.delete(i, i + 1); - Toast.makeText(getActivity(), String.format(errorMsg, c), Toast.LENGTH_SHORT).show(); - } - } - } - }); - - fillGreekKeyboard(root, editName); - - // show soft keyboard automatically - editName.requestFocus(); - getDialog().getWindow().setSoftInputMode(SOFT_INPUT_STATE_VISIBLE); - - final EditText editValue = (EditText) root.findViewById(R.id.var_edit_value); - editValue.setText(input.getValue()); - - final EditText editDescription = (EditText) root.findViewById(R.id.var_edit_description); - editDescription.setText(input.getDescription()); - - final Var.Builder varBuilder; - final IConstant constant = input.getConstant(); - if (constant != null) { - varBuilder = new Var.Builder(constant); - } else { - varBuilder = new Var.Builder(); - } - - root.findViewById(R.id.cancel_button).setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - } - }); - - root.findViewById(R.id.save_button).setOnClickListener(new VarEditorSaver(varBuilder, constant, root, Locator.getInstance().getEngine().getVarsRegistry(), this)); - - if (constant == null) { - // CREATE MODE - getDialog().setTitle(R.string.c_var_create_var); - - root.findViewById(R.id.remove_button).setVisibility(View.GONE); - } else { - // EDIT MODE - getDialog().setTitle(R.string.c_var_edit_var); - - root.findViewById(R.id.remove_button).setOnClickListener(MathEntityRemover.newConstantRemover(constant, null, getActivity(), VarEditDialogFragment.this)); - } - } - - private void fillGreekKeyboard(View root, final EditText editName) { - final TextView greekKeyboardToggle = (TextView) root.findViewById(R.id.var_toggle_greek_keyboard); - final ViewGroup greekKeyboard = (ViewGroup) root.findViewById(R.id.var_greek_keyboard); - greekKeyboardToggle.setPaintFlags(greekKeyboardToggle.getPaintFlags() | UNDERLINE_TEXT_FLAG); - greekKeyboardToggle.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (greekKeyboard.getVisibility() == VISIBLE) { - greekKeyboard.setVisibility(GONE); - greekKeyboardToggle.setText(R.string.cpp_var_show_greek_keyboard); - } else { - greekKeyboard.setVisibility(VISIBLE); - greekKeyboardToggle.setText(R.string.cpp_var_hide_greek_keyboard); - } - } - }); - LinearLayout keyboardRow = null; - final View.OnClickListener buttonOnClickListener = new View.OnClickListener() { - @Override - public void onClick(View view) { - if (!(view instanceof Button)) throw new AssertionError(); - editName.append(((Button) view).getText()); - } - }; - for (int i = 0; i < greekAlphabet.length(); i++) { - if (i % 5 == 0) { - keyboardRow = new LinearLayout(getActivity()); - keyboardRow.setOrientation(HORIZONTAL); - greekKeyboard.addView(keyboardRow, new ViewGroup.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); - } - final Button button = new Button(getActivity()); - button.setText(String.valueOf(greekAlphabet.charAt(i))); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - fixCapitalization(button); - } - button.setOnClickListener(buttonOnClickListener); - assert keyboardRow != null; - keyboardRow.addView(button, new LinearLayout.LayoutParams(0, WRAP_CONTENT, 1F)); - } - final Button button = new Button(getActivity()); - button.setText("↑"); - button.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - final boolean upperCase = button.getText().equals("↑"); - Views.processViewsOfType(greekKeyboard, Button.class, new Views.ViewProcessor