copyright + code reformat

This commit is contained in:
Sergey Solovyev
2013-06-26 12:22:07 +04:00
parent 23d5441b99
commit 99e7471ebd
579 changed files with 14908 additions and 3680 deletions

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.solovyev.android.calculator.onscreen"
android:versionCode="1"
android:versionName="1.0">
package="org.solovyev.android.calculator.onscreen"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="17" />
android:minSdkVersion="4"
android:targetSdkVersion="17"/>
</manifest>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>

View File

@@ -7,10 +7,10 @@
-->
<org.solovyev.android.calculator.AndroidCalculatorDisplayView xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/calculator_display"
style="@style/cpp_onscreen_display_style"
a:padding="@dimen/cpp_display_padding"
a:inputType="textMultiLine"
a:maxLines="3"
a:scrollHorizontally="false"
a:scrollbars="none" />
a:id="@+id/calculator_display"
style="@style/cpp_onscreen_display_style"
a:padding="@dimen/cpp_display_padding"
a:inputType="textMultiLine"
a:maxLines="3"
a:scrollHorizontally="false"
a:scrollbars="none"/>

View File

@@ -7,16 +7,16 @@
-->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/main_fragment_layout"
style="?cpp_fragment_layout_style"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:padding="@dimen/cpp_editor_padding">
a:id="@+id/main_fragment_layout"
style="?cpp_fragment_layout_style"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:padding="@dimen/cpp_editor_padding">
<org.solovyev.android.calculator.AndroidCalculatorEditorView
a:id="@+id/calculator_editor"
style="@style/cpp_onscreen_editor_style"
a:textIsSelectable="true"
a:hint="@string/c_calc_editor_hint" />
a:id="@+id/calculator_editor"
style="@style/cpp_onscreen_editor_style"
a:textIsSelectable="true"
a:hint="@string/c_calc_editor_hint"/>
</LinearLayout>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>

View File

@@ -1,41 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="30dp">
a:layout_width="match_parent"
a:layout_height="30dp">
<LinearLayout
a:id="@+id/onscreen_header_buttons"
a:layout_width="wrap_content"
a:layout_height="match_parent"
a:layout_alignParentRight="true">
a:id="@+id/onscreen_header_buttons"
a:layout_width="wrap_content"
a:layout_height="match_parent"
a:layout_alignParentRight="true">
<ImageButton
a:id="@+id/onscreen_fold_button"
style="@style/onscreen_header_button_style"
a:src="@drawable/cpp_onscreen_button_fold" />
a:id="@+id/onscreen_fold_button"
style="@style/onscreen_header_button_style"
a:src="@drawable/cpp_onscreen_button_fold"/>
<ImageButton
a:id="@+id/onscreen_minimize_button"
style="@style/onscreen_header_button_style"
a:src="@drawable/cpp_onscreen_button_minimize" />
a:id="@+id/onscreen_minimize_button"
style="@style/onscreen_header_button_style"
a:src="@drawable/cpp_onscreen_button_minimize"/>
<ImageButton
a:id="@+id/onscreen_close_button"
style="@style/onscreen_header_button_style"
a:src="@drawable/cpp_onscreen_button_close" />
a:id="@+id/onscreen_close_button"
style="@style/onscreen_header_button_style"
a:src="@drawable/cpp_onscreen_button_close"/>
</LinearLayout>
<ImageView
a:id="@+id/onscreen_title"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:src="@drawable/cpp_onscreen_header_logo"
a:scaleType="fitStart"
a:paddingLeft="6dp"
a:paddingTop="2dp"
a:paddingBottom="2dp"
a:layout_toLeftOf="@id/onscreen_header_buttons" />
a:id="@+id/onscreen_title"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:src="@drawable/cpp_onscreen_header_logo"
a:scaleType="fitStart"
a:paddingLeft="6dp"
a:paddingTop="2dp"
a:paddingBottom="2dp"
a:layout_toLeftOf="@id/onscreen_header_buttons"/>
</RelativeLayout>

View File

@@ -1,74 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:orientation="vertical">
a:layout_width="match_parent"
a:layout_height="match_parent"
a:orientation="vertical">
<LinearLayout
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/cpp_simple_button_7" />
<include layout="@layout/cpp_simple_button_7"/>
<include layout="@layout/cpp_simple_button_8" />
<include layout="@layout/cpp_simple_button_8"/>
<include layout="@layout/cpp_simple_button_9" />
<include layout="@layout/cpp_simple_button_9"/>
<include layout="@layout/cpp_simple_button_multiplication" />
<include layout="@layout/cpp_simple_button_multiplication"/>
<include layout="@layout/cpp_simple_button_erase" />
<include layout="@layout/cpp_simple_button_erase"/>
</LinearLayout>
<LinearLayout
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/cpp_simple_button_4" />
<include layout="@layout/cpp_simple_button_4"/>
<include layout="@layout/cpp_simple_button_5" />
<include layout="@layout/cpp_simple_button_5"/>
<include layout="@layout/cpp_simple_button_6" />
<include layout="@layout/cpp_simple_button_6"/>
<include layout="@layout/cpp_simple_button_division" />
<include layout="@layout/cpp_simple_button_division"/>
<include layout="@layout/cpp_simple_button_percent" />
<include layout="@layout/cpp_simple_button_percent"/>
</LinearLayout>
<LinearLayout
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/cpp_simple_button_1" />
<include layout="@layout/cpp_simple_button_1"/>
<include layout="@layout/cpp_simple_button_2" />
<include layout="@layout/cpp_simple_button_2"/>
<include layout="@layout/cpp_simple_button_3" />
<include layout="@layout/cpp_simple_button_3"/>
<include layout="@layout/cpp_simple_button_plus" />
<include layout="@layout/cpp_simple_button_plus"/>
<include layout="@layout/cpp_simple_button_power" />
<include layout="@layout/cpp_simple_button_power"/>
</LinearLayout>
<LinearLayout
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/cpp_simple_button_round_brackets" />
<include layout="@layout/cpp_simple_button_round_brackets"/>
<include layout="@layout/cpp_simple_button_0" />
<include layout="@layout/cpp_simple_button_0"/>
<include layout="@layout/cpp_simple_button_dot" />
<include layout="@layout/cpp_simple_button_dot"/>
<include layout="@layout/cpp_simple_button_subtraction" />
<include layout="@layout/cpp_simple_button_subtraction"/>
<include layout="@layout/cpp_simple_button_app" />
<include layout="@layout/cpp_simple_button_app"/>
</LinearLayout>

View File

@@ -1,51 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical"
style="@style/cpp_onscreen_main_layout_style">
a:orientation="vertical"
style="@style/cpp_onscreen_main_layout_style">
<include
a:id="@+id/onscreen_header"
layout="@layout/onscreen_header" />
a:id="@+id/onscreen_header"
layout="@layout/onscreen_header"/>
<LinearLayout
a:id="@+id/onscreen_content"
a:orientation="vertical"
a:layout_width="match_parent"
a:layout_height="match_parent">
a:id="@+id/onscreen_content"
a:orientation="vertical"
a:layout_width="match_parent"
a:layout_height="match_parent">
<include
layout="@layout/onscreen_editor"
a:layout_width="match_parent"
a:layout_height="wrap_content" />
layout="@layout/onscreen_editor"
a:layout_width="match_parent"
a:layout_height="wrap_content"/>
<LinearLayout
a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include
layout="@layout/cpp_simple_button_equals"
a:layout_margin="@dimen/cpp_button_margin"
a:layout_weight="1"
a:layout_width="0dp"
a:layout_height="match_parent" />
a:layout_width="match_parent"
a:layout_height="0dp">
<include
layout="@layout/onscreen_display"
a:layout_weight="4"
a:layout_width="0dp"
a:layout_height="wrap_content" />
layout="@layout/cpp_simple_button_equals"
a:layout_margin="@dimen/cpp_button_margin"
a:layout_weight="1"
a:layout_width="0dp"
a:layout_height="match_parent"/>
<include
layout="@layout/onscreen_display"
a:layout_weight="4"
a:layout_width="0dp"
a:layout_height="wrap_content"/>
</LinearLayout>
<include
layout="@layout/onscreen_keyboard"
a:layout_weight="4"
a:layout_width="match_parent"
a:layout_height="0dp" />
layout="@layout/onscreen_keyboard"
a:layout_weight="4"
a:layout_width="match_parent"
a:layout_height="0dp"/>
</LinearLayout>
<include layout="@layout/onscreen_footer" />
<include layout="@layout/onscreen_footer"/>
</LinearLayout>

View File

@@ -1,3 +1,25 @@
/*
* 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.onscreen;
import android.content.BroadcastReceiver;
@@ -5,7 +27,9 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import javax.annotation.Nonnull;
import org.solovyev.android.calculator.CalculatorPreferences;
/**

View File

@@ -1,3 +1,25 @@
/*
* 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.onscreen;
import android.app.NotificationManager;
@@ -9,8 +31,10 @@ import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
import android.util.DisplayMetrics;
import android.view.WindowManager;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.solovyev.android.Views;
import org.solovyev.android.calculator.CalculatorDisplayViewState;
import org.solovyev.android.calculator.CalculatorEditorViewState;

View File

@@ -1,3 +1,25 @@
/*
* 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.onscreen;
import android.app.Activity;
@@ -5,7 +27,9 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import javax.annotation.Nonnull;
import org.solovyev.android.Android;
import org.solovyev.android.App;
import org.solovyev.android.calculator.AbstractFixableError;

View File

@@ -1,3 +1,25 @@
/*
* 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.onscreen;
import android.content.Context;
@@ -11,8 +33,10 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.solovyev.android.calculator.*;
import org.solovyev.android.prefs.Preference;
@@ -370,7 +394,7 @@ public class CalculatorOnscreenView {
private static class WindowDragTouchListener implements View.OnTouchListener {
/*
**********************************************************************
**********************************************************************
*
* CONSTANTS
*

View File

@@ -1,11 +1,35 @@
/*
* 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.onscreen;
import android.content.SharedPreferences;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.json.JSONException;
import org.json.JSONObject;
import org.solovyev.android.prefs.AbstractPreference;

View File

@@ -1,3 +1,25 @@
/*
* 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.onscreen;
/**