Version 1.12

This commit is contained in:
Vlad Mihalachi 2014-10-12 18:11:19 +02:00
parent df5a302129
commit 46842a5343
80 changed files with 1202 additions and 345 deletions

View File

@ -4,6 +4,11 @@
<option name="myLocal" value="false" />
<inspection_tool class="AndroidLintMissingQuantity" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintMissingTranslation" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintNewApi" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintUnusedQuantity" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
</profile>
</component>

View File

@ -25,10 +25,10 @@ android {
defaultConfig {
applicationId "com.maskyn.fileeditorpro"
minSdkVersion 14
minSdkVersion 10
targetSdkVersion 19
versionCode 27
versionName "1.11"
versionCode 29
versionName "1.12"
}
compileOptions {

View File

@ -36,7 +36,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/nome_app_turbo_editor"
android:hardwareAccelerated="false"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:supportsRtl="true"
android:name="sharedcode.turboeditor.activity.MyApp"

View File

@ -42,10 +42,10 @@ android {
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.maskyn.fileeditor"
minSdkVersion 14
minSdkVersion 10
targetSdkVersion 19
versionCode 27
versionName "1.11"
versionCode 29
versionName "1.12"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7

View File

@ -26,6 +26,7 @@
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<supports-screens
android:anyDensity="true"
@ -39,7 +40,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/nome_app_turbo_editor"
android:hardwareAccelerated="false"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:supportsRtl="true"
android:name="sharedcode.turboeditor.activity.MyApp"

View File

@ -30,11 +30,9 @@ import java.util.Calendar;
import sharedcode.turboeditor.preferences.PreferenceHelper;
public class AdsHelper {
private Activity activity;
private InterstitialAd interstitial;
public AdsHelper(Activity activity) {
this.activity = activity;
interstitial = new InterstitialAd(activity);
interstitial.setAdUnitId("ca-app-pub-5679083452234719/7178038180");
@ -47,15 +45,6 @@ public class AdsHelper {
}
public void displayInterstitial() {
int numberOfAdsRequested = PreferenceHelper.getNumberOfAdsRequested(activity);
numberOfAdsRequested++;
PreferenceHelper.setNumberOfAdsRequested(activity, numberOfAdsRequested);
if (numberOfAdsRequested % 3 == 0 && interstitial != null && interstitial.isLoaded()) {
interstitial.show();
int today = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
PreferenceHelper.setLastDayAdShowed(activity, today);
}
}
}

View File

@ -31,18 +31,18 @@
jumboMode="false"
revision="20.0.0"
sha1="f449c5674e0427708d4fb17c4a2ec74c267e74d6"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\support-annotations-20.0.0-be727b9c9ce08c6ee055559b9506b675c13db989.jar"
jar="C:\Users\Vlad\AppData\Local\Android\android-sdk\extras\android\m2repository\com\android\support\support-annotations\20.0.0\support-annotations-20.0.0.jar"
jumboMode="false"
revision="19.1.0"
sha1="9d9013e9ff35fc3756411e62873c363c70c638fa"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\juniversalchardet-1.0.3-sources-436707958bb47977373cb4a2d842cdbf635fd840.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\libs\juniversalchardet-1.0.3-sources.jar"
jumboMode="false"
revision="19.1.0"
sha1="77979eaa98f90806f984155f44f63cc1fb60ac25"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\library-2.4.0-6b043a8574fb97c742ca3065362b2a29e8f870bc.jar"
jar="C:\Users\Vlad\.gradle\caches\modules-2\files-2.1\com.nineoldandroids\library\2.4.0\e9b63380f3a242dbdbf103a2355ad7e43bad17cb\library-2.4.0.jar"
jumboMode="false"
revision="19.1.0"
sha1="e9b63380f3a242dbdbf103a2355ad7e43bad17cb"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\crashlytics-1.1.13-7bbec76a44aa9cc3279ec6bff22b2c929a8abf67.jar"
jar="C:\Users\Vlad\.gradle\caches\modules-2\files-2.1\com.crashlytics.android\crashlytics\1.1.13\e821eafa1bf489a26bdb71f95078c26785b37a1\crashlytics-1.1.13.jar"
@ -54,7 +54,7 @@
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="90293e557820d96b56a206152f96fd716712b98c"/>
sha1="fd9b2146c585dd1d2bebf34947ffe2dbcc017c51"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app\build\intermediates\pre-dexed\debug\commons-io-2.4-63b64e68cd19031cd252ac65a3ef94421c1bf0f4.jar"
jar="C:\Users\Vlad\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.4\b1b6ea3b7e4aa4f492509a4952029cd8e48019ad\commons-io-2.4.jar"
@ -72,7 +72,7 @@
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\turbo-editor.libraries\FloatingActionButton\unspecified\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="22b92dd8763ce4c1a9bd71a25d6270a6398ac955"/>
sha1="2e2f6526f3c5fb34230d14e52bdc24addb67ea9f"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\juniversalchardet-1.0.3-sources-58cfedaebe3b94ec0eaa2ede4e66aae8dbe309b0.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\libs\juniversalchardet-1.0.3-sources.jar"
@ -80,23 +80,35 @@
revision="19.1.0"
sha1="77979eaa98f90806f984155f44f63cc1fb60ac25"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\classes-7a329e7f23515542bf02d96773d08da1d2333a7b.jar"
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\debug\classes-7a329e7f23515542bf02d96773d08da1d2333a7b.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\turbo-editor.libraries\FloatingActionButton\unspecified\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="22b92dd8763ce4c1a9bd71a25d6270a6398ac955"/>
sha1="2e2f6526f3c5fb34230d14e52bdc24addb67ea9f"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\classes-9b612f0cb16e63277808158fe971bb4f40c98d29.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\com.github.gabrielemariotti.changeloglib\library\1.5.1\classes.jar"
jumboMode="false"
revision="20.0.0"
sha1="74a89f0f8b56d9f11d70b8d8134cf4109f4797dc"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\debug\classes-cdb6170a1d0bff9e575ad3ffbf525f5448b9edfc.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\org.solovyev.android\checkout\0.5.1\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="365d5d82a77aaad1aa83381e97480593d531ac0e"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app\build\intermediates\pre-dexed\debug\classes-2ad27a3265673aeeb8f40e4322d8e19509329c96.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app\build\intermediates\exploded-aar\com.github.gabrielemariotti.changeloglib\library\1.5.1\classes.jar"
jumboMode="false"
revision="20.0.0"
sha1="74a89f0f8b56d9f11d70b8d8134cf4109f4797dc"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\support-v4-19.0.1-f87b13e7ed00736c2050eda75093bf42b0503c64.jar"
jar="C:\Users\Vlad\AppData\Local\Android\android-sdk\extras\android\m2repository\com\android\support\support-v4\19.0.1\support-v4-19.0.1.jar"
jumboMode="false"
revision="19.1.0"
sha1="587da9a481ffd341d2fa091704489b89845ddacd"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app-pro\build\intermediates\pre-dexed\release\classes-3e47e18f46719c7bf296f4b49ff03aaa3d406ba6.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app-pro\build\intermediates\exploded-aar\TurboMaterialEditor.libraries\sharedCode\unspecified\classes.jar"
@ -121,12 +133,24 @@
jumboMode="false"
revision="20.0.0"
sha1="c9508d53a0ddc7399493e4c7ad474718c5ed196e"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\classes-b074fd82146b96b10c95466b0162b8da83a6ec6e.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\org.solovyev.android\checkout\0.5.1\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="365d5d82a77aaad1aa83381e97480593d531ac0e"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\classes-515446996fed08836a9331ef47b508a0383ffa22.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\turbo-editor.libraries\RootCommands\unspecified\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="cb3d22565863773944a8c15de408e864e34d6da1"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\debug\support-v4-19.1.0-cf7033c44b86e758f85990185111614bac3ecfa8.jar"
jar="C:\Users\Vlad\AppData\Local\Android\android-sdk\extras\android\m2repository\com\android\support\support-v4\19.1.0\support-v4-19.1.0.jar"
jumboMode="false"
revision="19.1.0"
sha1="85f201b380937e61a9dce6ca90ccf6872abbfb67"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\juniversalchardet-1.0.3-9db20cdcb8ae72104757d81297c98978c65bd91b.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\libs\juniversalchardet-1.0.3.jar"
@ -139,24 +163,12 @@
jumboMode="false"
revision="20.0.0"
sha1="591d72211acc0b909b79c840e0b3ed9a0982d807"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\internal_impl-20.0.0-edeafbea8ee49aead89729b1fc0541af3708b834.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\libs\internal_impl-20.0.0.jar"
jumboMode="false"
revision="19.1.0"
sha1="e40b3078e3fbd353c9f44da8df25a8fc0078209d"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\classes-91de6979bb6be1b46cde32b462c23831eadd01d4.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\com.github.gabrielemariotti.changeloglib\library\1.5.1\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="74a89f0f8b56d9f11d70b8d8134cf4109f4797dc"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\pre-dexed\debug\classes-0dd78bfcbe1a497e15390bba3a50f41cf42d9162.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app-pro\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="8694693636ab36910c8100ce527c258ff3ebece0"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app-pro\build\intermediates\pre-dexed\debug\support-v4-19.0.1-f87b13e7ed00736c2050eda75093bf42b0503c64.jar"
jar="C:\Users\Vlad\AppData\Local\Android\android-sdk\extras\android\m2repository\com\android\support\support-v4\19.0.1\support-v4-19.0.1.jar"
@ -194,11 +206,11 @@
revision="19.1.0"
sha1="8694693636ab36910c8100ce527c258ff3ebece0"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\release\classes-4dd6beddde59ff8bd6c22bd0d65ac974f7e489d2.jar"
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\pre-dexed\debug\classes-4dd6beddde59ff8bd6c22bd0d65ac974f7e489d2.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\app\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="768b3e680c198fd79098e28fa64b532125e8c3f2"/>
sha1="7bc7ded1dbd6619408b58e2184aad20bb75533d5"/>
<item
dex="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app-pro\build\intermediates\pre-dexed\debug\classes-bfc447e4dbe83598b94dbdc8e38492cbbda6ebb2.jar"
jar="C:\Users\Vlad\Documents\AndroidStudioProjects\TurboMaterialEditor\app-pro\build\intermediates\exploded-aar\TurboMaterialEditor.libraries\RootCommands\unspecified\classes.jar"

Binary file not shown.

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.faizmalkani.floatingactionbutton">

View File

@ -1,11 +1,11 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId 'com.faizmalkani.floatingactionbutton'
minSdkVersion 14
minSdkVersion 7
targetSdkVersion 19
versionName "1.0"
versionCode 1
@ -25,4 +25,6 @@ android {
}
dependencies {
compile 'com.nineoldandroids:library:2.4.0'
}

View File

@ -5,7 +5,7 @@
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:minSdkVersion="7"
android:targetSdkVersion="19" />
<application android:allowBackup="true" >

View File

@ -5,7 +5,7 @@
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:minSdkVersion="7"
android:targetSdkVersion="19" />
<application android:allowBackup="true" >

View File

@ -3,7 +3,7 @@
package="com.faizmalkani.floatingactionbutton.test" >
<uses-sdk
android:minSdkVersion="14"
android:minSdkVersion="7"
android:targetSdkVersion="19" />
<instrumentation

View File

@ -1,4 +1,3 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="FloatingActionButton">

View File

@ -1,10 +1,27 @@
/*
* Copyright (c) 2014 SBG Apps
*
* 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.
*/
package com.faizmalkani.floatingactionbutton;
import android.view.View;
import android.widget.AbsListView;
/**
* Created by Stéphane on 09/07/2014.
*/
class DirectionScrollListener implements AbsListView.OnScrollListener {
private static final int DIRECTION_CHANGE_THRESHOLD = 1;
@ -34,10 +51,7 @@ class DirectionScrollListener implements AbsListView.OnScrollListener {
goingDown = firstVisibleItem > mPrevPosition;
}
if (changed && mUpdated) {
if(goingDown)
mFloatingActionButton.hideFab();
else
mFloatingActionButton.showFab();
mFloatingActionButton.hide(goingDown);
}
mPrevPosition = firstVisibleItem;
mPrevTop = firstViewTop;

View File

@ -1,9 +1,7 @@
package com.faizmalkani.floatingactionbutton;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@ -11,135 +9,146 @@ import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.AbsListView;
public class FloatingActionButton extends View
{
Context _context;
Paint mButtonPaint, mDrawablePaint;
Bitmap mBitmap;
int mScreenHeight;
float currentY;
boolean mHidden = false;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.view.ViewHelper;
ObjectAnimator mShowAnimation;
ObjectAnimator mHideAnimation;
public class FloatingActionButton extends View {
public FloatingActionButton(Context context, AttributeSet attributeSet)
{
super(context, attributeSet);
_context = context;
init(Color.WHITE);
private final Interpolator mInterpolator = new AccelerateDecelerateInterpolator();
private final Paint mButtonPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private final Paint mDrawablePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private Bitmap mBitmap;
private int mColor;
private boolean mHidden = false;
/**
* The FAB button's Y position when it is displayed.
*/
private float mYDisplayed = -1;
/**
* The FAB button's Y position when it is hidden.
*/
private float mYHidden = -1;
public FloatingActionButton(Context context) {
this(context, null);
}
@SuppressLint("NewApi")
public FloatingActionButton(Context context)
{
super(context);
_context = context;
init(Color.WHITE);
}
public void setColor(int fabColor)
{
init(fabColor);
}
public void setDrawable(Drawable fabDrawable)
{
mBitmap = ((BitmapDrawable) fabDrawable).getBitmap();
invalidate();
public FloatingActionButton(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public void init(int fabColor)
{
setWillNotDraw(false);
this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
mButtonPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mButtonPaint.setColor(fabColor);
public FloatingActionButton(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.FloatingActionButton);
mColor = a.getColor(R.styleable.FloatingActionButton_color, Color.WHITE);
mButtonPaint.setStyle(Paint.Style.FILL);
mButtonPaint.setShadowLayer(10.0f, 0.0f, 3.5f, Color.argb(100, 0, 0, 0));
mDrawablePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
invalidate();
mButtonPaint.setColor(mColor);
float radius, dx, dy;
radius = a.getFloat(R.styleable.FloatingActionButton_shadowRadius, 10.0f);
dx = a.getFloat(R.styleable.FloatingActionButton_shadowDx, 0.0f);
dy = a.getFloat(R.styleable.FloatingActionButton_shadowDy, 3.5f);
int color = a.getInteger(R.styleable.FloatingActionButton_shadowColor, Color.argb(100, 0, 0, 0));
mButtonPaint.setShadowLayer(radius, dx, dy, color);
WindowManager mWindowManager = (WindowManager) _context.getSystemService(Context.WINDOW_SERVICE);
Drawable drawable = a.getDrawable(R.styleable.FloatingActionButton_drawable);
if (null != drawable) {
mBitmap = ((BitmapDrawable) drawable).getBitmap();
}
setWillNotDraw(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
setLayerType(View.LAYER_TYPE_SOFTWARE, null);
WindowManager mWindowManager = (WindowManager)
context.getSystemService(Context.WINDOW_SERVICE);
Display display = mWindowManager.getDefaultDisplay();
Point size = new Point();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
display.getSize(size);
mScreenHeight = size.y;
mYHidden = size.y;
} else mYHidden = display.getHeight();
}
mShowAnimation = ObjectAnimator.ofFloat(this, "Y", currentY);
mHideAnimation = ObjectAnimator.ofFloat(this, "Y", mScreenHeight);
public static int darkenColor(int color) {
float[] hsv = new float[3];
Color.colorToHSV(color, hsv);
hsv[2] *= 0.8f;
return Color.HSVToColor(hsv);
}
public void setColor(int color) {
mColor = color;
mButtonPaint.setColor(mColor);
invalidate();
}
public void setDrawable(Drawable drawable) {
mBitmap = ((BitmapDrawable) drawable).getBitmap();
invalidate();
}
@Override
protected void onDraw(Canvas canvas)
{
setClickable(true);
canvas.drawCircle(getWidth()/2, getHeight()/2,(float) (getWidth()/2.6), mButtonPaint);
canvas.drawBitmap(mBitmap, (getWidth() - mBitmap.getWidth()) / 2, (getHeight() - mBitmap.getHeight()) / 2, mDrawablePaint);
protected void onDraw(Canvas canvas) {
canvas.drawCircle(getWidth() / 2, getHeight() / 2, (float) (getWidth() / 2.6), mButtonPaint);
if (null != mBitmap) {
canvas.drawBitmap(mBitmap, (getWidth() - mBitmap.getWidth()) / 2,
(getHeight() - mBitmap.getHeight()) / 2, mDrawablePaint);
}
}
@Override
public boolean onTouchEvent(MotionEvent event)
{
if(event.getAction() == MotionEvent.ACTION_UP)
{
setAlpha(1.0f);
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
// Perform the default behavior
super.onLayout(changed, left, top, right, bottom);
// Store the FAB button's displayed Y position if we are not already aware of it
if (mYDisplayed == -1) {
mYDisplayed = ViewHelper.getY(this);
}
else if(event.getAction() == MotionEvent.ACTION_DOWN)
{
setAlpha(0.6f);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
int color;
if (event.getAction() == MotionEvent.ACTION_UP) {
color = mColor;
} else {
color = darkenColor(mColor);
}
mButtonPaint.setColor(color);
invalidate();
return super.onTouchEvent(event);
}
public int dpToPx(int dp)
{
DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
return Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT));
}
public void hide(boolean hide) {
// If the hidden state is being updated
if (mHidden != hide) {
public void hideFab()
{
if(!mHidden && mShowAnimation != null && !mShowAnimation.isRunning())
{
currentY = getY();
mHideAnimation = ObjectAnimator.ofFloat(this, "Y", mScreenHeight);
mHideAnimation.setInterpolator(new AccelerateInterpolator());
mHideAnimation.start();
mHidden = true;
}
}
// Store the new hidden state
mHidden = hide;
public void showFab()
{
if(mHidden && mHideAnimation != null && !mHideAnimation.isRunning())
{
mShowAnimation = ObjectAnimator.ofFloat(this, "Y", currentY);
mShowAnimation.setInterpolator(new DecelerateInterpolator());
mShowAnimation.start();
mHidden = false;
// Animate the FAB to it's new Y position
ObjectAnimator animator = ObjectAnimator.ofFloat(this, "y", mHidden ? mYHidden : mYDisplayed).setDuration(500);
animator.setInterpolator(mInterpolator);
animator.start();
}
}
public boolean isHidden(){
return mHidden;
}
public void listenTo(AbsListView listView) {
if (null != listView) {
listView.setOnScrollListener(new DirectionScrollListener(this));
}
}
}

View File

@ -20,7 +20,7 @@ android {
defaultConfig {
minSdkVersion 7
targetSdkVersion 20
targetSdkVersion 19
}
}

View File

@ -29,7 +29,7 @@ android {
defaultConfig {
applicationId "sharedcode.turboeditor"
minSdkVersion 14
minSdkVersion 10
targetSdkVersion 19
versionCode 1
versionName "1.0"
@ -54,9 +54,10 @@ dependencies {
compile('de.greenrobot:eventbus:2.2.1') {
exclude module: 'support-v4'
}
// compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
// compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
compile files('libs/juniversalchardet-1.0.3.jar')
compile 'com.android.support:support-v4:20.0.0'
compile "com.android.support:support-v4:19.0.+"
compile 'com.github.gabrielemariotti.changeloglib:library:1.5.1'
compile 'commons-io:commons-io:2.4'
compile 'org.solovyev.android:checkout:0.5.1@aar'
}

View File

@ -0,0 +1,144 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* 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.
*/
package com.android.vending.billing;
import android.os.Bundle;
/**
* InAppBillingService is the service that provides in-app billing version 3 and beyond.
* This service provides the following features:
* 1. Provides a new API to get details of in-app items published for the app including
* price, type, title and description.
* 2. The purchase flow is synchronous and purchase information is available immediately
* after it completes.
* 3. Purchase information of in-app purchases is maintained within the Google Play system
* till the purchase is consumed.
* 4. An API to consume a purchase of an inapp item. All purchases of one-time
* in-app items are consumable and thereafter can be purchased again.
* 5. An API to get current purchases of the user immediately. This will not contain any
* consumed purchases.
*
* All calls will give a response code with the following possible values
* RESULT_OK = 0 - success
* RESULT_USER_CANCELED = 1 - user pressed back or canceled a dialog
* RESULT_BILLING_UNAVAILABLE = 3 - this billing API version is not supported for the type requested
* RESULT_ITEM_UNAVAILABLE = 4 - requested SKU is not available for purchase
* RESULT_DEVELOPER_ERROR = 5 - invalid arguments provided to the API
* RESULT_ERROR = 6 - Fatal error during the API action
* RESULT_ITEM_ALREADY_OWNED = 7 - Failure to purchase since item is already owned
* RESULT_ITEM_NOT_OWNED = 8 - Failure to consume since item is not owned
*/
interface IInAppBillingService {
/**
* Checks support for the requested billing API version, package and in-app type.
* Minimum API version supported by this interface is 3.
* @param apiVersion the billing version which the app is using
* @param packageName the package name of the calling app
* @param type type of the in-app item being purchased "inapp" for one-time purchases
* and "subs" for subscription.
* @return RESULT_OK(0) on success, corresponding result code on failures
*/
int isBillingSupported(int apiVersion, String packageName, String type);
/**
* Provides details of a list of SKUs
* Given a list of SKUs of a valid type in the skusBundle, this returns a bundle
* with a list JSON strings containing the productId, price, title and description.
* This API can be called with a maximum of 20 SKUs.
* @param apiVersion billing API version that the Third-party is using
* @param packageName the package name of the calling app
* @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST"
* @return Bundle containing the following key-value pairs
* "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on
* failure as listed above.
* "DETAILS_LIST" with a StringArrayList containing purchase information
* in JSON format similar to:
* '{ "productId" : "exampleSku", "type" : "inapp", "price" : "$5.00",
* "title : "Example Title", "description" : "This is an example description" }'
*/
Bundle getSkuDetails(int apiVersion, String packageName, String type, in Bundle skusBundle);
/**
* Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU,
* the type, a unique purchase token and an optional developer payload.
* @param apiVersion billing API version that the app is using
* @param packageName package name of the calling app
* @param sku the SKU of the in-app item as published in the developer console
* @param type the type of the in-app item ("inapp" for one-time purchases
* and "subs" for subscription).
* @param developerPayload optional argument to be sent back with the purchase information
* @return Bundle containing the following key-value pairs
* "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on
* failure as listed above.
* "BUY_INTENT" - PendingIntent to start the purchase flow
*
* The Pending intent should be launched with startIntentSenderForResult. When purchase flow
* has completed, the onActivityResult() will give a resultCode of OK or CANCELED.
* If the purchase is successful, the result data will contain the following key-value pairs
* "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on
* failure as listed above.
* "INAPP_PURCHASE_DATA" - String in JSON format similar to
* '{"orderId":"12999763169054705758.1371079406387615",
* "packageName":"com.example.app",
* "productId":"exampleSku",
* "purchaseTime":1345678900000,
* "purchaseToken" : "122333444455555",
* "developerPayload":"example developer payload" }'
* "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that
* was signed with the private key of the developer
* TODO: change this to app-specific keys.
*/
Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type,
String developerPayload);
/**
* Returns the current SKUs owned by the user of the type and package name specified along with
* purchase information and a signature of the data to be validated.
* This will return all SKUs that have been purchased in V3 and managed items purchased using
* V1 and V2 that have not been consumed.
* @param apiVersion billing API version that the app is using
* @param packageName package name of the calling app
* @param type the type of the in-app items being requested
* ("inapp" for one-time purchases and "subs" for subscription).
* @param continuationToken to be set as null for the first call, if the number of owned
* skus are too many, a continuationToken is returned in the response bundle.
* This method can be called again with the continuation token to get the next set of
* owned skus.
* @return Bundle containing the following key-value pairs
* "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on
* failure as listed above.
* "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs
* "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information
* "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures
* of the purchase information
* "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the
* next set of in-app purchases. Only set if the
* user has more owned skus than the current list.
*/
Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken);
/**
* Consume the last purchase of the given SKU. This will result in this item being removed
* from all subsequent responses to getPurchases() and allow re-purchase of this item.
* @param apiVersion billing API version that the app is using
* @param packageName package name of the calling app
* @param purchaseToken token in the purchase information JSON that identifies the purchase
* to be consumed
* @return 0 if consumption succeeded. Appropriate error values for failures.
*/
int consumePurchase(int apiVersion, String packageName, String purchaseToken);
}

View File

@ -20,6 +20,7 @@
package sharedcode.turboeditor.activity;
import android.app.ActionBar;
import android.os.ParcelFileDescriptor;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
@ -46,6 +47,8 @@ import org.sufficientlysecure.rootcommands.Shell;
import org.sufficientlysecure.rootcommands.Toolbox;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileNotFoundException;
import de.greenrobot.event.EventBus;
import sharedcode.turboeditor.R;
@ -53,6 +56,7 @@ import sharedcode.turboeditor.fragment.ChangelogDialogFragment;
import sharedcode.turboeditor.fragment.EditorFragment;
import sharedcode.turboeditor.fragment.NoFileOpenedFragment;
import sharedcode.turboeditor.preferences.PreferenceHelper;
import sharedcode.turboeditor.util.AccessStorageApi;
import sharedcode.turboeditor.util.AppInfoHelper;
import sharedcode.turboeditor.util.EventBusEvents;
import sharedcode.turboeditor.util.ProCheckUtils;
@ -62,6 +66,8 @@ import sharedcode.turboeditor.views.CustomDrawerLayout;
public abstract class BaseHomeActivity extends Activity {
private static final int SELECT_FILE_CODE = 121;
private static final int KITKAT_OPEN_REQUEST_CODE = 41;
private EditText editor;
/*
@ -211,15 +217,25 @@ public abstract class BaseHomeActivity extends Activity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == SELECT_FILE_CODE) {
String path = data.getStringExtra("path");
if (resultCode == RESULT_OK) {
String path = "";
if (requestCode == SELECT_FILE_CODE) {
path = data.getStringExtra("path");
}
if (requestCode == KITKAT_OPEN_REQUEST_CODE) {
path = AccessStorageApi.getPath(getBaseContext(), data.getData());
}
if(!path.isEmpty()){
File file = new File(path);
if (file.isFile() && file.exists()) {
EventBus.getDefault().postSticky(new EventBusEvents.NewFileToOpen(new File(path)));
} else if (file.isDirectory()) {
EventBus.getDefault().postSticky(new EventBusEvents.AFileIsSelected(path));
}
}
}
}
@Override
@ -241,6 +257,7 @@ public abstract class BaseHomeActivity extends Activity {
//region Calls from the layout
public void OpenFile(View view) {
Intent subActivity = new Intent(BaseHomeActivity.this, SelectFileActivity.class);
subActivity.putExtra("action", SelectFileActivity.Actions.SelectFile);
Bundle scaleBundle = ActivityOptionsCompat.makeScaleUpAnimation(
@ -252,8 +269,8 @@ public abstract class BaseHomeActivity extends Activity {
}
public void CreateFile(View view) {
onEvent(new EventBusEvents.NewFileToOpen(""));
onEvent(new EventBusEvents.AFileIsSelected("")); // simulate click on the list
onEvent(new EventBusEvents.NewFileToOpen("")); // do not send the event to others
EventBus.getDefault().post(new EventBusEvents.AFileIsSelected(""));
}
public void OpenInfo(View view) {
@ -395,14 +412,6 @@ public abstract class BaseHomeActivity extends Activity {
displayInterstitial();
}
public void onEvent(EventBusEvents.AFileIsSelected event) {
String name = FilenameUtils.getName(event.getPath());
if (name.isEmpty())
getActionBar().setTitle(R.string.nome_app_turbo_editor);
else
getActionBar().setTitle(name);
}
/**
* When a file can't be opened
* Invoked by the EditorFragment
@ -515,10 +524,10 @@ public abstract class BaseHomeActivity extends Activity {
&& type != null) {
// Post event
EventBus.getDefault().postSticky(new EventBusEvents.NewFileToOpen(new File(intent.getData().getPath())));
EventBus.getDefault().postSticky(new EventBusEvents.AFileIsSelected(intent.getData().getPath()));
} else if (Intent.ACTION_SEND.equals(action) && type != null) {
if ("text/plain".equals(type)) {
onEvent(new EventBusEvents.NewFileToOpen(intent.getStringExtra(Intent.EXTRA_TEXT)));
onEvent(new EventBusEvents.AFileIsSelected("")); // simulate click on the list
}
}
}

View File

@ -20,13 +20,30 @@
package sharedcode.turboeditor.activity;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
import android.widget.TextView;
import com.android.vending.billing.IInAppBillingService;
import org.json.JSONException;
import org.json.JSONObject;
import org.solovyev.android.checkout.ActivityCheckout;
import org.solovyev.android.checkout.Checkout;
import org.solovyev.android.checkout.Inventory;
import org.solovyev.android.checkout.Products;
import java.util.ArrayList;
import java.util.Arrays;
import sharedcode.turboeditor.R;
import sharedcode.turboeditor.util.AppInfoHelper;
import sharedcode.turboeditor.util.Constants;
@ -51,12 +68,32 @@ public class PreferenceAbout extends Activity {
proVersionText.setText(ProCheckUtils.isPro(getBaseContext()) ? getString(R.string.donate) : getString(R.string.pro_version));
Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
serviceIntent.setPackage("com.android.vending");
bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
}
IInAppBillingService mService;
ServiceConnection mServiceConn = new ServiceConnection() {
@Override
public void onServiceDisconnected(ComponentName name) {
mService = null;
}
@Override
protected void onDestroy() {
//checkout.stop();
public void onServiceConnected(ComponentName name,
IBinder service) {
mService = IInAppBillingService.Stub.asInterface(service);
}
};
@Override
public void onDestroy() {
super.onDestroy();
if (mService != null) {
unbindService(mServiceConn);
}
}
public void OpenPlayStore(View view) {
@ -79,16 +116,47 @@ public class PreferenceAbout extends Activity {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=26VWS2TSAMUJA"))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
} else {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.maskyn.fileeditorpro"))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
//startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.maskyn.fileeditorpro"))
// .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(),
"fileeditor.proversion", "inapp", "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ");
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
startIntentSenderForResult(pendingIntent.getIntentSender(),
1001, new Intent(), Integer.valueOf(0), Integer.valueOf(0),
Integer.valueOf(0));
}
} catch (Exception e) {
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 1001) {
int responseCode = data.getIntExtra("RESPONSE_CODE", 0);
String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA");
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
if (resultCode == RESULT_OK) {
try {
JSONObject jo = new JSONObject(purchaseData);
String sku = jo.getString("productId");
//alert("You have bought the " + sku + ". Excellent choice,
// adventurer!");
}
catch (JSONException e) {
//alert("Failed to parse purchase data.");
e.printStackTrace();
}
}
}
}
public void OpenGithub(View view) {
String url = "https://github.com/vmihalachi/TurboEditor";
String url = "http://github.com/vmihalachi/TurboEditor";
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
@ -118,11 +186,13 @@ public class PreferenceAbout extends Activity {
}
public void OpenGooglePlusCommunity(View view) {
String url = "https://plus.google.com/u/0/communities/111974095419108178946";
String url = "http://plus.google.com/u/0/communities/111974095419108178946";
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
/*void setupClickablePreferences() {
final Preference email = findPreference("aboutactivity_authoremail"),
changelog = findPreference("aboutactivity_changelog"),

View File

@ -23,14 +23,16 @@ import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.view.MenuItemCompat;
import android.widget.PopupMenu;
import android.widget.SearchView;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Filter;
import android.widget.ListView;
import android.widget.PopupMenu;
import android.widget.SearchView;
import android.widget.TextView;
import android.widget.Toast;
@ -64,6 +66,7 @@ public class SelectFileActivity extends Activity implements SearchView.OnQueryTe
private boolean wantAFile = true;
private MenuItem mSearchViewMenuItem;
private SearchView mSearchView;
private Filter filter;
@Override
@ -148,10 +151,13 @@ public class SelectFileActivity extends Activity implements SearchView.OnQueryTe
}
public boolean onQueryTextChange(String newText) {
if(filter == null)
return true;
if (TextUtils.isEmpty(newText)) {
listView.clearTextFilter();
filter.filter(null);
} else {
listView.setFilterText(newText);
filter.filter(newText);
}
return true;
}
@ -206,7 +212,7 @@ public class SelectFileActivity extends Activity implements SearchView.OnQueryTe
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_select_file, menu);
mSearchViewMenuItem = menu.findItem(R.id.im_search);
mSearchView = (SearchView) mSearchViewMenuItem.getActionView();
mSearchView = (SearchView) MenuItemCompat.getActionView(mSearchViewMenuItem);
mSearchView.setIconifiedByDefault(true);
mSearchView.setOnQueryTextListener(this);
mSearchView.setSubmitButtonEnabled(false);
@ -243,6 +249,9 @@ public class SelectFileActivity extends Activity implements SearchView.OnQueryTe
PreferenceHelper.setWorkingFolder(SelectFileActivity.this, currentFolder);
invalidateOptionsMenu();
return true;
} else if (i == R.id.im_is_working_folder) {
Toast.makeText(getBaseContext(), R.string.is_the_working_folder, Toast.LENGTH_SHORT).show();
return true;
} else if (i == R.id.im_select_folder) {
returnData(currentFolder);
return true;
@ -276,7 +285,7 @@ public class SelectFileActivity extends Activity implements SearchView.OnQueryTe
super.onPreExecute();
if (mSearchView != null) {
mSearchView.setIconified(true);
mSearchViewMenuItem.collapseActionView();
MenuItemCompat.collapseActionView(mSearchViewMenuItem);
mSearchView.setQuery("", false);
}
@ -358,6 +367,7 @@ public class SelectFileActivity extends Activity implements SearchView.OnQueryTe
boolean isRoot = currentFolder.equals("/");
AdapterDetailedList mAdapter = new AdapterDetailedList(getBaseContext(), names, isRoot);
listView.setAdapter(mAdapter);
filter = mAdapter.getFilter();
} else if (exceptionMessage != null) {
Toast.makeText(SelectFileActivity.this, exceptionMessage, Toast.LENGTH_SHORT).show();
}

View File

@ -78,10 +78,18 @@ public class AdapterDrawer extends
}
});
if (TextUtils.equals(selectedPath, files.get(position).getAbsolutePath()))
if (TextUtils.equals(selectedPath, files.get(position).getAbsolutePath())) {
hold.nameLabel.setTypeface(hold.nameLabel.getTypeface(), Typeface.BOLD);
else
convertView.setBackgroundColor((convertView.getResources()
.getColor(R.color.item_selected)));
}
else {
hold.nameLabel.setTypeface(hold.nameLabel.getTypeface(), Typeface.NORMAL);
convertView.setBackgroundColor((convertView.getResources()
.getColor(android.R.color.transparent)));
}
} else {
final ViewHolder hold = ((ViewHolder) convertView.getTag());
final String fileName = files.get(position).getName();
@ -95,18 +103,23 @@ public class AdapterDrawer extends
selectedPath = "";
}
});
if (TextUtils.equals(selectedPath, files.get(position).getAbsolutePath())) {
hold.nameLabel.setTypeface(hold.nameLabel.getTypeface(), Typeface.BOLD);
hold.nameLabel.setTypeface(null, Typeface.BOLD);
convertView.setBackgroundColor((convertView.getResources()
.getColor(R.color.item_selected)));
}
else {
hold.nameLabel.setTypeface(hold.nameLabel.getTypeface(), Typeface.NORMAL);
hold.nameLabel.setTypeface(null, Typeface.NORMAL);
convertView.setBackgroundColor((convertView.getResources()
.getColor(android.R.color.transparent)));
}
}
return convertView;
}
public void selectView(String selectedPath) {
callbacks.ItemSelected(selectedPath);
//callbacks.ItemSelected(selectedPath);
this.selectedPath = selectedPath;
notifyDataSetChanged();
}
@ -114,7 +127,7 @@ public class AdapterDrawer extends
public interface Callbacks {
void CancelItem(int position, boolean andCloseOpenedFile);
void ItemSelected(String path);
//void ItemSelected(String path);
}
public static class ViewHolder {

View File

@ -0,0 +1,81 @@
/*
* Copyright (C) 2014 Vlad Mihalachi
*
* This file is part of Turbo Editor.
*
* Turbo Editor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Turbo Editor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package sharedcode.turboeditor.adapter;
import android.content.Context;
import android.graphics.Typeface;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.io.File;
import java.util.ArrayList;
import sharedcode.turboeditor.R;
public class AdapterTwoItem extends
ArrayAdapter<String> {
private final LayoutInflater inflater;
private final String[] lines1;
private final String[] lines2;
public AdapterTwoItem(Context context,
String[] lines1,
String[] lines2) {
super(context, R.layout.item_two_lines, lines1);
this.lines1 = lines1;
this.lines2 = lines2;
this.inflater = LayoutInflater.from(context);
}
@Override
public View getView(final int position,
View convertView, final ViewGroup parent) {
if (convertView == null) {
convertView = this.inflater
.inflate(R.layout.item_two_lines,
parent, false);
final ViewHolder hold = new ViewHolder();
hold.line1 = (TextView) convertView.findViewById(android.R.id.text1);
hold.line2 = (TextView) convertView.findViewById(android.R.id.text2);
convertView.setTag(hold);
hold.line1.setText(lines1[position]);
hold.line2.setText(lines2[position]);
} else {
final ViewHolder hold = ((ViewHolder) convertView.getTag());
hold.line1.setText(lines1[position]);
hold.line2.setText(lines2[position]);
}
return convertView;
}
public static class ViewHolder {
public TextView line1;
public TextView line2;
}
}

View File

@ -22,13 +22,13 @@ import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.view.LayoutInflater;
import it.gmariotti.changelibs.library.view.ChangeLogListView;

View File

@ -27,6 +27,7 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
@ -61,6 +62,7 @@ import com.faizmalkani.floatingactionbutton.FloatingActionButton;
import sharedcode.turboeditor.R;
import sharedcode.turboeditor.preferences.SettingsFragment;
import sharedcode.turboeditor.util.ApiHelper;
import sharedcode.turboeditor.util.EditorInterface;
import sharedcode.turboeditor.util.EdittextPadding;
import sharedcode.turboeditor.util.EventBusEvents;
@ -108,7 +110,7 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
private PageSystemButtons pageSystemButtons;
private String currentEncoding;
private static final int SYNTAX_DELAY_MILLIS_SHORT = 250;
private static final int SYNTAX_DELAY_MILLIS_SHORT = 350;
private static final int SYNTAX_DELAY_MILLIS_LONG = 1500;
static final int
ID_SELECT_ALL = android.R.id.selectAll;
@ -215,6 +217,7 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
@Override
public void onClick(View v) {
if(!PreferenceHelper.getReadOnly(getActivity())) {
getVerticalScrollView().tempDisableListener(1000);
((InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE))
.showSoftInput(mEditor, InputMethodManager.SHOW_IMPLICIT);
}
@ -225,6 +228,7 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(hasFocus && !PreferenceHelper.getReadOnly(getActivity())) {
getVerticalScrollView().tempDisableListener(1000);
((InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE))
.showSoftInput(mEditor, InputMethodManager.SHOW_IMPLICIT);
}
@ -243,6 +247,16 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
return rootView;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
String name = FilenameUtils.getName(sFilePath);
if (name.isEmpty())
getActivity().getActionBar().setTitle("*");
else
getActivity().getActionBar().setTitle(name);
}
@Override
public void onResume() {
super.onResume();
@ -384,8 +398,10 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)));
}
else {
else if (i == R.id.im_info) {
FileInfoDialogFragment dialogFrag = FileInfoDialogFragment.newInstance(sFilePath);
dialogFrag.setTargetFragment(EditorFragment.this, 0);
dialogFrag.show(getFragmentManager().beginTransaction(), "dialog");
}
return super.onOptionsItemSelected(item);
}
@ -740,7 +756,7 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
*/
private final EditTextChangeListener
mChangeListener;
private int lineCount, realLine;
private int lineCount, realLine, startingLine;
private LineUtils lineUtils;
private boolean modified = true;
/**
@ -770,6 +786,7 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
this.mPaintNumbers.setAntiAlias(true);
this.mPaintNumbers.setDither(false);
this.mPaintNumbers.setTextAlign(Paint.Align.RIGHT);
// Syntax editor
setFilters(new InputFilter[]{
@ -841,7 +858,7 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.isCtrlPressed()) {
if (ApiHelper.is11() && event.isCtrlPressed()) {
switch (keyCode) {
case KeyEvent.KEYCODE_A:
return onTextContextMenuItem(ID_SELECT_ALL);
@ -902,7 +919,8 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
public void onDraw(final Canvas canvas) {
if (PreferenceHelper.getLineNumbers(getContext())) {
if (lineCount != getLineCount()) {
if (lineCount != getLineCount() || startingLine != editorInterface.getPageSystem().getStartingLine()) {
startingLine = editorInterface.getPageSystem().getStartingLine();
lineCount = getLineCount();
lineUtils.updateHasNewLineArray(editorInterface.getPageSystem().getStartingLine(), lineCount, getLayout(), getText().toString());
@ -914,6 +932,8 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
boolean[] hasNewLineArray = lineUtils.getToCountLinesArray();
int[] realLines = lineUtils.getRealLines();
boolean wrapContent = PreferenceHelper.getWrapContent(getContext());
int numbersWidth = (int) (EdittextPadding.getPaddingWithLineNumbers(getContext(), PreferenceHelper.getFontSize(getContext())) * 0.8);
int paddingTop = EdittextPadding.getPaddingTop(getContext());
while (i < lastLine) {
// if last line we count it anyway
@ -926,8 +946,8 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
realLine = realLines[i];
canvas.drawText(String.valueOf(realLine),
5, // padding left
getLineHeight() * (i + 1),
numbersWidth, // they all center aligned
paddingTop + getLineHeight() * (i + 1),
mPaintNumbers);
}
i++;
@ -1096,6 +1116,9 @@ public class EditorFragment extends Fragment implements FindTextDialogFragment.S
firstColoredIndex = 0;
if (end > editable.length())
end = editable.length();
if(firstColoredIndex > end)
firstColoredIndex = end;
CharSequence textToHighlight = editable.subSequence(firstColoredIndex, end);

View File

@ -0,0 +1,96 @@
/*
* Copyright (C) 2014 Vlad Mihalachi
*
* This file is part of Turbo Editor.
*
* Turbo Editor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Turbo Editor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package sharedcode.turboeditor.fragment;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.NumberPicker;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import sharedcode.turboeditor.R;
import sharedcode.turboeditor.adapter.AdapterTwoItem;
// ...
public class FileInfoDialogFragment extends DialogFragment {
public static FileInfoDialogFragment newInstance(String filePath) {
final FileInfoDialogFragment f = new FileInfoDialogFragment();
final Bundle args = new Bundle();
args.putString("filePath", filePath);
f.setArguments(args);
return f;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final View view = getActivity().getLayoutInflater().inflate(R.layout.dialog_fragment_file_info, null);
ListView list = (ListView) view.findViewById(android.R.id.list);
File file = new File(getArguments().getString("filePath"));
// Get the last modification information.
Long lastModified = file.lastModified();
// Create a new date object and pass last modified information
// to the date object.
Date date = new Date(lastModified);
String[] lines1 = {
getString(R.string.name),
getString(R.string.folder),
getString(R.string.size),
getString(R.string.modification_date)
};
String[] lines2 = {
file.getName(),
file.getParent(),
FileUtils.byteCountToDisplaySize(file.length()),
date.toString()
};
list.setAdapter(new AdapterTwoItem(getActivity(), lines1, lines2));
return new AlertDialog.Builder(getActivity())
//.setTitle(title)
.setView(view)
.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}
)
.create();
}
}

View File

@ -90,32 +90,31 @@ public class NavigationDrawerListFragment extends Fragment implements AdapterVie
String filePath = savedPaths[position];
// Send the event that a file was selected
EventBus.getDefault().post(new EventBusEvents.NewFileToOpen(new File(filePath)));
arrayAdapter.selectView(filePath);
EventBus.getDefault().post(new EventBusEvents.AFileIsSelected(filePath));
}
public void onEvent(EventBusEvents.AFileIsSelected event) {
arrayAdapter.selectView(event.getPath());
EventBus.getDefault().removeStickyEvent(event);
}
/**
* When a new file is opened
* Invoked by the main activity which receive the intent
*
* @param event The event called
*/
public void onEvent(EventBusEvents.NewFileToOpen event) {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
String selectedPath = event.getFile().getAbsolutePath();
boolean pathAlreadyExist = false;
for (String savedPath : savedPaths) {
// We don't need to save the file path twice
if (savedPath.equals(selectedPath)) {
arrayAdapter.selectView(selectedPath);
return;
pathAlreadyExist = true;
}
}
// Add the path if it wasn't added before
if(!pathAlreadyExist)
addPath(selectedPath);
arrayAdapter.selectView(selectedPath);
EventBus.getDefault().removeStickyEvent(event);
}
@ -198,8 +197,8 @@ public class NavigationDrawerListFragment extends Fragment implements AdapterVie
EventBus.getDefault().post(new EventBusEvents.CannotOpenAFile());
}
@Override
/*@Override
public void ItemSelected(String path) {
EventBus.getDefault().post(new EventBusEvents.AFileIsSelected(path));
}
}*/
}

View File

@ -19,8 +19,8 @@
package sharedcode.turboeditor.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@ -73,10 +73,6 @@ public final class PreferenceHelper {
return getPrefs(context).getBoolean("send_error_reports", true);
}
public static int getLastDayAdShowed(Context context) {
return getPrefs(context).getInt("last_day_ad_showed", 0);
}
public static String getEncoding(Context context) {
return getPrefs(context).getString("editor_encoding", "UTF-8");
}
@ -113,10 +109,6 @@ public final class PreferenceHelper {
return getPrefs(context).getBoolean("page_system_active", true);
}
public static int getNumberOfAdsRequested(Context context) {
return getPrefs(context).getInt("number_of_ads_requested", 0);
}
// Setter methods
public static void setUseMonospace(Context context, boolean value) {
@ -139,10 +131,6 @@ public final class PreferenceHelper {
getEditor(context).putBoolean("autoencoding", value).commit();
}
public static void setLastDayAdShowed(Context context, int value) {
getEditor(context).putInt("last_day_ad_showed", value).commit();
}
public static void setFontSize(Context context, int value) {
getEditor(context).putInt("font_size", value).commit();
}
@ -163,8 +151,4 @@ public final class PreferenceHelper {
getEditor(context).putBoolean("read_only", value).commit();
}
public static void setNumberOfAdsRequested(Context context, int value) {
getEditor(context).putInt("number_of_ads_requested", value).commit();
}
}

View File

@ -0,0 +1,209 @@
/*
* Copyright (C) 2014 Vlad Mihalachi
*
* This file is part of Turbo Editor.
*
* Turbo Editor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Turbo Editor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package sharedcode.turboeditor.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
public class AccessStorageApi {
public static Bitmap loadPrescaledBitmap(String filename) throws IOException {
// Facebook image size
final int IMAGE_MAX_SIZE = 630;
File file = null;
FileInputStream fis;
BitmapFactory.Options opts;
int resizeScale;
Bitmap bmp;
file = new File(filename);
// This bit determines only the width/height of the bitmap without loading the contents
opts = new BitmapFactory.Options();
opts.inJustDecodeBounds = true;
fis = new FileInputStream(file);
BitmapFactory.decodeStream(fis, null, opts);
fis.close();
// Find the correct scale value. It should be a power of 2
resizeScale = 1;
if (opts.outHeight > IMAGE_MAX_SIZE || opts.outWidth > IMAGE_MAX_SIZE) {
resizeScale = (int)Math.pow(2, (int) Math.round(Math.log(IMAGE_MAX_SIZE / (double) Math.max(opts.outHeight, opts.outWidth)) / Math.log(0.5)));
}
// Load pre-scaled bitmap
opts = new BitmapFactory.Options();
opts.inSampleSize = resizeScale;
fis = new FileInputStream(file);
bmp = BitmapFactory.decodeStream(fis, null, opts);
fis.close();
return bmp;
}
/**
* Get a file path from a Uri. This will get the the path for Storage Access
* Framework Documents, as well as the _data field for the MediaStore and
* other file-based ContentProviders.
*
* @param context The context.
* @param uri The Uri to query.
* @author paulburke
*/
@SuppressLint("NewApi")
public static String getPath(final Context context, final Uri uri) {
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
// DocumentProvider
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + split[1];
}
// TODO handle non-primary volumes
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {
final String id = DocumentsContract.getDocumentId(uri);
final Uri contentUri = ContentUris.withAppendedId(
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
return getDataColumn(context, contentUri, null, null);
}
// MediaProvider
else if (isMediaDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
Uri contentUri = null;
if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
}
final String selection = "_id=?";
final String[] selectionArgs = new String[] {
split[1]
};
return getDataColumn(context, contentUri, selection, selectionArgs);
}
}
// MediaStore (and general)
else if ("content".equalsIgnoreCase(uri.getScheme())) {
return getDataColumn(context, uri, null, null);
}
// File
else if ("file".equalsIgnoreCase(uri.getScheme())) {
return uri.getPath();
}
return null;
}
/**
* Get the value of the data column for this Uri. This is useful for
* MediaStore Uris, and other file-based ContentProviders.
*
* @param context The context.
* @param uri The Uri to query.
* @param selection (Optional) Filter used in the query.
* @param selectionArgs (Optional) Selection arguments used in the query.
* @return The value of the _data column, which is typically a file path.
*/
public static String getDataColumn(Context context, Uri uri, String selection,
String[] selectionArgs) {
Cursor cursor = null;
final String column = "_data";
final String[] projection = {
column
};
try {
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,
null);
if (cursor != null && cursor.moveToFirst()) {
final int column_index = cursor.getColumnIndexOrThrow(column);
return cursor.getString(column_index);
}
} finally {
if (cursor != null)
cursor.close();
}
return null;
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is ExternalStorageProvider.
*/
public static boolean isExternalStorageDocument(Uri uri) {
return "com.android.externalstorage.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is DownloadsProvider.
*/
public static boolean isDownloadsDocument(Uri uri) {
return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is MediaProvider.
*/
public static boolean isMediaDocument(Uri uri) {
return "com.android.providers.media.documents".equals(uri.getAuthority());
}
}

View File

@ -0,0 +1,28 @@
/*
* Copyright (C) 2014 Vlad Mihalachi
*
* This file is part of Turbo Editor.
*
* Turbo Editor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Turbo Editor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package sharedcode.turboeditor.util;
import android.os.Build;
public class ApiHelper {
public static boolean is11(){
return Build.VERSION.SDK_INT >= 11;
}
}

View File

@ -28,7 +28,7 @@ public class EdittextPadding {
}
public static int getPaddingWithLineNumbers(Context context, float fontSize) {
return (int) PixelDipConverter.convertDpToPixel(fontSize * 1.85f, context);
return (int) PixelDipConverter.convertDpToPixel(fontSize * 2f, context);
}
public static int getPaddingTop(Context context) {

View File

@ -20,7 +20,9 @@
package sharedcode.turboeditor.views;
import android.content.Context;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ScrollView;
@ -28,6 +30,7 @@ public class GoodScrollView extends ScrollView {
public ScrollInterface scrollInterface;
int lastY;
boolean listenerEnabled = true;
public GoodScrollView(Context context) {
super(context);
@ -48,9 +51,8 @@ public class GoodScrollView extends ScrollView {
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (scrollInterface == null) return;
if (scrollInterface == null || !listenerEnabled) return;
if (Math.abs(lastY - t) > 100) {
lastY = t;
@ -66,6 +68,16 @@ public class GoodScrollView extends ScrollView {
return diff <= 0;
}
public void tempDisableListener(int mills) {
listenerEnabled = false;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
listenerEnabled = true;
}
}, mills);
}
public interface ScrollInterface {
public void onScrollChanged(int l, int t, int oldl, int oldt);

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:width="12dp" />
<solid android:color="@android:color/transparent" />
</shape>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:height="4dp" />
<gradient
android:angle="270"
android:endColor="@android:color/transparent"
android:startColor="@color/gradient_start" />
</shape>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:width="16dp" />
<gradient
android:endColor="@android:color/transparent"
android:startColor="@color/gradient_light_start" />
</shape>

View File

@ -62,7 +62,7 @@
android:layout_marginTop="20dp"
android:onClick="SendFeedback"
android:clickable="true"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:gravity="center"
android:minWidth="200dp" />
@ -78,7 +78,7 @@
android:textStyle="bold"
android:onClick="OpenTranslatePage"
android:clickable="true"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:gravity="center"
android:minWidth="200dp" />
@ -94,7 +94,7 @@
android:textStyle="bold"
android:onClick="GoToProVersion"
android:clickable="true"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:gravity="center"
android:minWidth="200dp" />
@ -112,7 +112,7 @@
android:id="@+id/imageView5"
android:src="@drawable/ic_action_mail"
android:onClick="SendMail"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:scaleType="centerCrop" />
<ImageView
@ -123,7 +123,7 @@
android:layout_marginEnd="15dp"
android:src="@drawable/ic_action_google_play"
android:onClick="OpenPlayStore"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:scaleType="centerCrop" />
<ImageView
@ -131,9 +131,10 @@
android:layout_height="45dp"
android:id="@+id/imageView4"
android:layout_marginEnd="15dp"
android:layout_marginRight="15dp"
android:src="@drawable/ic_action_gplus"
android:onClick="OpenGooglePlusCommunity"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:scaleType="centerCrop" />
<ImageView
@ -142,7 +143,7 @@
android:id="@+id/imageView6"
android:src="@drawable/ic_action_github"
android:onClick="OpenGithub"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/item_background_holo_dark"
android:scaleType="fitCenter" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2014 Vlad Mihalachi
~
~ This file is part of Turbo Editor.
~
~ Turbo Editor is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Turbo Editor is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

View File

@ -33,6 +33,9 @@
android:cacheColorHint="@android:color/transparent"
android:layout_above="@id/drawer_buttons"
android:divider="@color/divider"
android:listSelector="@android:color/transparent"
android:choiceMode="singleChoice"
android:background="@null"
/>
<TextView

View File

@ -22,7 +22,7 @@
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:gravity="center_vertical">
android:gravity="center_vertical" >
<TextView
android:id="@android:id/text1"
@ -35,9 +35,8 @@
android:paddingLeft="@dimen/item_drawer_list_padding"
android:paddingRight="@dimen/item_drawer_list_padding"
android:maxLines="1"
android:fontFamily="sans-serif-light"
android:background="?android:attr/activatedBackgroundIndicator"
android:textColor="@color/navigation_drawer_button_text_color_inverted"/>
android:textColor="@color/navigation_drawer_button_text_color_inverted"
android:ellipsize="end"/>
<ImageView
android:layout_width="0dp"

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2014 Vlad Mihalachi
~
~ This file is part of Turbo Editor.
~
~ Turbo Editor is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Turbo Editor is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
android:minHeight="72dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="15sp"
android:ellipsize="end"
android:paddingStart="16dp"
android:paddingLeft="16dp"
android:text="FILE NAME"/>
<TextView
android:id="@android:id/text2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:maxLines="2"
android:textSize="14sp"
android:enabled="false"
android:ellipsize="end"
android:paddingStart="16dp"
android:paddingLeft="16dp"
android:text="DETAIL 1"
android:layout_below="@android:id/text1"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>

View File

@ -18,7 +18,8 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@id/im_select_folder"
android:showAsAction="ifRoom"

View File

@ -18,7 +18,8 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@id/im_save"
android:showAsAction="ifRoom"
@ -56,38 +57,43 @@
android:showAsAction="never"
android:title="@string/share"
/>
<item
android:id="@id/im_info"
android:showAsAction="never"
android:title="@string/info"
/>
<!-- <item
android:id="@id/im_goto_line"
android:showAsAction="never"
app:showAsAction="never"
android:title="@string/goto_line"
/>-->
<!--<item
android:title="@string/preferenze"
android:showAsAction="ifRoom|withText">
app:showAsAction="ifRoom|withText">
<menu>
<item
android:id="@id/im_line_numbers"
android:showAsAction="ifRoom"
app:showAsAction="ifRoom"
android:title="@string/line_numbers"
android:checkable="true"/>
<item
android:id="@id/im_syntax_highlight"
android:showAsAction="ifRoom"
app:showAsAction="ifRoom"
android:title="@string/menu_syntax_highlight"
android:checkable="true"/>
<item
android:id="@id/im_use_monospace"
android:showAsAction="ifRoom"
app:showAsAction="ifRoom"
android:title="@string/use_monospace"
android:checkable="true"/>
<item
android:id="@id/im_editor_encoding"
android:showAsAction="ifRoom"
app:showAsAction="ifRoom"
android:title="@string/codifica"/>
<item
android:id="@id/im_text_size"
android:showAsAction="ifRoom"
app:showAsAction="ifRoom"
android:title="@string/font_size"/>
</menu>
</item>-->

View File

@ -18,11 +18,12 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!--<item
android:id="@+id/menu_search"
android:actionViewClass="android.widget.SearchView"
android:showAsAction="ifRoom"
app:showAsAction="ifRoom"
android:actionLayout="@layout/my_search_view"
android:icon="@drawable/ic_action_search"
android:title="@string/search">
@ -52,6 +53,6 @@
android:id="@id/im_cancel"
android:icon="@drawable/ic_action_close"
android:title="@android:string/cancel"
android:showAsAction="always">
app:showAsAction="always">
</item>-->
</menu>

View File

@ -19,7 +19,8 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@id/im_new_file"
android:title="@string/file"

View File

@ -20,6 +20,10 @@
<changelog bulletedList="true">
<changelogversion versionName="1.12" changeDate="Oct 9, 2014">
<changelogtext>Many enchantments and fixes</changelogtext>
</changelogversion>
<changelogversion versionName="1.11" changeDate="Sep 30, 2014">
<changelogtext>[b]New! [/b]Important improvements to the syntax highlight</changelogtext>
<changelogtext>[b]New! [/b]Donation option in the about screen. Help to make Turbo Editor a better software! :)</changelogtext>

View File

@ -54,11 +54,11 @@
<string name="pro_version">Verze PRO</string>
<string name="auto_save">Automatické ukládání</string>
<string name="read_only">Jen pro čtení</string>
<string name="send_error_reports">Send error reports</string>
<string name="extra_options">Extra options</string>
<string name="split_text_if_too_long">Split the text if too long</string>
<string name="ignore_back_button">Ignore back button</string>
<string name="donate">Donate</string>
<string name="send_error_reports">Odesílat zprávy o chybách</string>
<string name="extra_options">Další možnosti</string>
<string name="split_text_if_too_long">Rozdělit text, pokud je příliš dlouhý</string>
<string name="ignore_back_button">Ignorovat tlačítko zpět</string>
<string name="donate">Podpořit</string>
<string name="aggiungi_account">Nový účet</string>
<string name="attiva">Aktivní</string>
<string name="cancella">Odstranit</string>

View File

@ -54,11 +54,11 @@
<string name="pro_version">Pro-Version</string>
<string name="auto_save">Automatisches Speichern</string>
<string name="read_only">schreibgeschützt</string>
<string name="send_error_reports">Send error reports</string>
<string name="extra_options">Extra options</string>
<string name="split_text_if_too_long">Split the text if too long</string>
<string name="ignore_back_button">Ignore back button</string>
<string name="donate">Donate</string>
<string name="send_error_reports">Fehlerbericht senden</string>
<string name="extra_options">Extraeinstellungen</string>
<string name="split_text_if_too_long">Text teilen, wenn er zu lang ist</string>
<string name="ignore_back_button">Zurück-Knopf ignorieren</string>
<string name="donate">Spenden</string>
<string name="aggiungi_account">Neues Benutzerkonto</string>
<string name="attiva">Aktiv</string>
<string name="cancella">Löschen</string>

View File

@ -56,9 +56,9 @@
<string name="read_only">Sólo lectura</string>
<string name="send_error_reports">Envíar reporte de errores</string>
<string name="extra_options">Opciones extra</string>
<string name="split_text_if_too_long">Split the text if too long</string>
<string name="split_text_if_too_long">Partir el texto si es muy largo</string>
<string name="ignore_back_button">Ignorar el botón de regreso</string>
<string name="donate">Donate</string>
<string name="donate">Donar</string>
<string name="aggiungi_account">Nueva Cuenta</string>
<string name="attiva">Activo</string>
<string name="cancella">Borrar</string>

View File

@ -34,7 +34,7 @@
<string name="find">Löydä</string>
<string name="replace">Korvaa</string>
<string name="share">Jaa</string>
<string name="keyboard_suggestions_and_swipe">Näppäimistöehdotukset ja pyyhkäisy</string>
<string name="keyboard_suggestions_and_swipe">Näppäimistön ehdotukset ja pyyhkäisy</string>
<string name="enable_autoencoding">Automaattinen koodaus</string>
<string name="set_as_working_folder">Määritä työkansioksi</string>
<string name="is_the_working_folder">Tämä on työkansio</string>
@ -58,7 +58,7 @@
<string name="extra_options">Lisäasetukset</string>
<string name="split_text_if_too_long">Jaa liian pitkä teksti</string>
<string name="ignore_back_button">Ohita Takaisin-painike</string>
<string name="donate">Donate</string>
<string name="donate">Lahjoita</string>
<string name="aggiungi_account">Uusi tili</string>
<string name="attiva">Aktiivinen</string>
<string name="cancella">Poista</string>

View File

@ -45,7 +45,7 @@
<string name="next">Suivant</string>
<string name="previous">Précédent</string>
<string name="please_wait">Veuillez patienter&#8230;</string>
<string name="occurrences_found">occurrences de %s ont été trouvées</string>
<string name="occurrences_found">%s occurences ont été trouvées</string>
<string name="app_version">Version %s</string>
<string name="translate_the_app">Traduire</string>
<string name="changelog">Historique des changements</string>
@ -55,10 +55,10 @@
<string name="auto_save">Sauvegarde automatique</string>
<string name="read_only">Lecture seule</string>
<string name="send_error_reports">Envoyer les rapports d\'erreur</string>
<string name="extra_options">Extra options</string>
<string name="split_text_if_too_long">Split the text if too long</string>
<string name="ignore_back_button">Ignore back button</string>
<string name="donate">Donate</string>
<string name="extra_options">Autres options</string>
<string name="split_text_if_too_long">Scinder le texte si trop long</string>
<string name="ignore_back_button">Ignorer le bouton retour</string>
<string name="donate">Faire un don</string>
<string name="aggiungi_account">Nouveau compte</string>
<string name="attiva">Actif</string>
<string name="cancella">Supprimer</string>
@ -136,7 +136,7 @@
<string name="inapp_seconditem_description">J\'aime vraiment cette application !</string>
<string name="inapp_thirditem_description">J\'adore cette application !</string>
<string name="backup_accounts">Sauvegarder les comptes</string>
<string name="restore_accounts">Restaurer des comptes</string>
<string name="restore_accounts">Restaurer les comptes</string>
<string name="share_accounts">Sauvegarder et partager les comptes</string>
<string name="importing_accounts">Importation des comptes&#8230;</string>
<string name="exporting_accounts">Exportation des comptes...</string>

View File

@ -55,10 +55,10 @@
<string name="auto_save">Salvataggio automatico</string>
<string name="read_only">Solo lettura</string>
<string name="send_error_reports">Invia rapporti di errore</string>
<string name="extra_options">Extra options</string>
<string name="split_text_if_too_long">Split the text if too long</string>
<string name="ignore_back_button">Ignore back button</string>
<string name="donate">Donate</string>
<string name="extra_options">Altre opzioni</string>
<string name="split_text_if_too_long">Dividi il testo se troppo lungo</string>
<string name="ignore_back_button">Ignora il tasto indietro</string>
<string name="donate">Dona</string>
<string name="aggiungi_account">Nuovo account</string>
<string name="attiva">Attiva</string>
<string name="cancella">Cancella</string>

View File

@ -58,7 +58,7 @@
<string name="extra_options">追加のオプション</string>
<string name="split_text_if_too_long">長すぎる場合にテキストを分割</string>
<string name="ignore_back_button">戻るボタンを無視</string>
<string name="donate">Donate</string>
<string name="donate">寄付</string>
<string name="aggiungi_account">新しいアカウント</string>
<string name="attiva">アクティブ</string>
<string name="cancella">削除</string>

View File

@ -24,7 +24,7 @@
<string name="recent_files">Ficheiros recentes</string>
<string name="font_size">Tamanho da fonte</string>
<string name="connection_name">Nome da ligação</string>
<string name="line_numbers">Número das linha</string>
<string name="line_numbers">Número das linhas</string>
<string name="wrap_content">Ajustar ao ecrã</string>
<string name="view_it_on_the_web">Ver na web</string>
<string name="file">Ficheiro</string>
@ -58,7 +58,7 @@
<string name="extra_options">Opções extra</string>
<string name="split_text_if_too_long">Separar texto se muito longo</string>
<string name="ignore_back_button">Ignorar botão para voltar</string>
<string name="donate">Donate</string>
<string name="donate">Donativos</string>
<string name="aggiungi_account">Nova conta</string>
<string name="attiva">Ativo</string>
<string name="cancella">Eliminar</string>
@ -66,14 +66,14 @@
<string name="caricamento">A carregar&#8230;</string>
<string name="cartella_locale_corrente">Pasta local em utilização</string>
<string name="chiave_privata">Chave privada</string>
<string name="chiaro">\"Light\"</string>
<string name="chiaro">Claro</string>
<string name="codifica">Codificação</string>
<string name="condividi">Partilhar</string>
<string name="crea_cartella_locale">Nova pasta local</string>
<string name="crea_cartella_remota">Nova pasta remota</string>
<string name="crea_file_remoto">Novo ficheiro remoto</string>
<string name="new_local_file">Novo ficheiro local</string>
<string name="disconneti">Terminar sessão</string>
<string name="disconneti">Desligar</string>
<string name="default_local_folder">Pasta local padrão</string>
<string name="dove_scaricare">Transferir para onde?</string>
<string name="download">Transferir</string>
@ -81,16 +81,16 @@
<string name="duplicate">Duplicar</string>
<string name="fatto">Feito</string>
<string name="home">Início</string>
<string name="host">Anfitrião</string>
<string name="host">Servidor</string>
<string name="info">Informações</string>
<string name="locale">Local</string>
<string name="log_in">A iniciar sessão&#8230;</string>
<string name="modifica">Editar</string>
<string name="muovi">Mover</string>
<string name="nascondi">Esconder</string>
<string name="nascondi">Ocultar</string>
<string name="nome_app">Turbo Client</string>
<string name="nome_app_turbo_editor">Turbo Editor</string>
<string name="nome_utente">Nome de Utilizador</string>
<string name="nome_utente">Utilizador</string>
<string name="passiva">Passivo</string>
<string name="passphrase">Frase-chave</string>
<string name="password">Senha</string>
@ -99,16 +99,16 @@
<string name="preferenze">Preferências</string>
<string name="remoto">Remoto</string>
<string name="riavva_per_tema">Para mudar o tema, reinicie a aplicação</string>
<string name="rinomina">Mudar o nome</string>
<string name="rinomina">Mudar nome</string>
<string name="root">Pasta remota padrão</string>
<string name="salva">Guardar</string>
<string name="scuro">Escuro</string>
<string name="seleziona">Seleccionar</string>
<string name="seleziona">Selecionar</string>
<string name="seleziona_account">Escolha uma conta</string>
<string name="sicuro">Tem a certeza?</string>
<string name="something_failed">Algo falhou</string>
<string name="skip_same_file">Não transfira o mesmo ficheiro</string>
<string name="tema_app">Tema da Aplicação</string>
<string name="skip_same_file">Não transferir o mesmo ficheiro</string>
<string name="tema_app">Tema da aplicação</string>
<string name="tipo_connessione">Tipo de ligação</string>
<string name="tipo_protocollo">Tipo de protocolo</string>
<string name="un_altra_cartella">Outra pasta</string>
@ -129,10 +129,10 @@
<string name="upgrade_premium_summary">Adquira a versão Premium e apoie o desenvolvimento do Turbo Client!</string>
<string name="download_unlocked_version">Transfira a versão desbloqueada</string>
<string name="inapp_second_description">Quanto vale o Turbo Client para si? Diga o seu preço! </string>
<string name="inapp_first_description">Atualize para a versão Premium e obtenha:</string>
<string name="inapp_first_description">Atualize para a versão Pro e tenha:</string>
<string name="inapp_item_openandeditfiles">Possibilidade de abrir e modificar qualquer tipo de ficheiro.</string>
<string name="inapp_item_backup_service">Serviço de backup para guardar e restaurar os seus dados de forma segura. </string>
<string name="inapp_unlock_features">Desbloqueie as funcionalidades Premium</string>
<string name="inapp_unlock_features">Desbloqueie as funcionalidades Pro</string>
<string name="inapp_seconditem_description">Eu gosto mesmo desta aplicação!</string>
<string name="inapp_thirditem_description">Eu amo esta aplicação!</string>
<string name="backup_accounts">Fazer backup das contas</string>
@ -144,7 +144,7 @@
<string name="err_cant_open_the_file">Não é possível abrir o ficheiro</string>
<string name="err_temp_folder_doesnt_exist">Pasta temporária não existe</string>
<string name="err_occured">Ocorreu um erro</string>
<string name="ui_ux">Interface do utilizador</string>
<string name="ui_ux">UI</string>
<string name="remove">Remover</string>
<string name="modification_date">Data de modificação</string>
<string name="name">Nome</string>

View File

@ -58,7 +58,7 @@
<string name="extra_options">Ekstra seçenekler</string>
<string name="split_text_if_too_long">Çok uzunsa metni böl</string>
<string name="ignore_back_button">Geri düğmesini yoksay</string>
<string name="donate">Donate</string>
<string name="donate">Bağış yap</string>
<string name="aggiungi_account">Yeni hesap</string>
<string name="attiva">Aktif</string>
<string name="cancella">Sil</string>

View File

@ -25,40 +25,40 @@
<string name="font_size">字体大小</string>
<string name="connection_name">连接名称</string>
<string name="line_numbers">行号</string>
<string name="wrap_content">Wrap content</string>
<string name="wrap_content">自动换行</string>
<string name="view_it_on_the_web">在网络上查看</string>
<string name="file">文件</string>
<string name="folder">文件夹</string>
<string name="light_theme">亮色主题</string>
<string name="goto_line">Go to Line</string>
<string name="goto_line">转到行</string>
<string name="find">查找</string>
<string name="replace">Replace</string>
<string name="replace">替换</string>
<string name="share">分享</string>
<string name="keyboard_suggestions_and_swipe">Keyboard suggestions and Swipe</string>
<string name="enable_autoencoding">自动编码</string>
<string name="set_as_working_folder">Set as the working folder</string>
<string name="is_the_working_folder">This is the working folder</string>
<string name="save_changes">Do you want to save the changes to the file %s?</string>
<string name="regular_expression">Regular Expression</string>
<string name="text_to_find">Text to find</string>
<string name="text_to_replace">Text to replace</string>
<string name="next">Next</string>
<string name="previous">Previous</string>
<string name="please_wait">Please wait&#8230;</string>
<string name="set_as_working_folder">设为工作目录</string>
<string name="is_the_working_folder">当前为工作目录</string>
<string name="save_changes">你想要将所做的更改保存到文件 %s 吗?</string>
<string name="regular_expression">正则表达式</string>
<string name="text_to_find">要查找的文本</string>
<string name="text_to_replace">要替换文本</string>
<string name="next">下一个</string>
<string name="previous">上一个</string>
<string name="please_wait">请稍候...</string>
<string name="occurrences_found">%s occurrences was found</string>
<string name="app_version">Version %s</string>
<string name="translate_the_app">Translate</string>
<string name="changelog">Changelog</string>
<string name="match_case">Match case</string>
<string name="long_click_for_more_options">Long click for more options</string>
<string name="pro_version">Pro version</string>
<string name="auto_save">Auto save</string>
<string name="read_only">Read only</string>
<string name="send_error_reports">Send error reports</string>
<string name="extra_options">Extra options</string>
<string name="split_text_if_too_long">Split the text if too long</string>
<string name="ignore_back_button">Ignore back button</string>
<string name="donate">Donate</string>
<string name="app_version">版本 %s</string>
<string name="translate_the_app">翻译</string>
<string name="changelog">更新日志</string>
<string name="match_case">匹配大小写</string>
<string name="long_click_for_more_options">长按查看更多选项</string>
<string name="pro_version">专业版</string>
<string name="auto_save">自动保存</string>
<string name="read_only">只读</string>
<string name="send_error_reports">发送错误报告</string>
<string name="extra_options">附加选项</string>
<string name="split_text_if_too_long">长文本拆分</string>
<string name="ignore_back_button">忽略返回按钮</string>
<string name="donate">捐赠</string>
<string name="aggiungi_account">新帐户</string>
<string name="attiva">活跃</string>
<string name="cancella">删除</string>

View File

@ -57,4 +57,8 @@
<color name="syntax_string">#ffd44950</color>
<color name="syntax_variable">#ff009688</color>
<color name="syntax_comment">#ff999999</color>
<color name="item_selected">#40969696</color>
<color name="gradient_start">#50000000</color>
<color name="gradient_light_start">#30000000</color>
</resources>

View File

@ -37,4 +37,6 @@
<dimen name="text_size_mega_title">25sp</dimen>
<dimen name="text_size_title">16sp</dimen>
<dimen name="text_size_subtitle">14sp</dimen>
<dimen name="action_bar_height">56dp</dimen>
</resources>

View File

@ -29,49 +29,62 @@
<item name="android:windowBackground">@null</item>
<item name="android:actionBarStyle">@style/ActionBar.Dark</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
<item name="android:actionBarSize">@dimen/action_bar_height</item>
<item name="android:windowContentOverlay">@drawable/actionbar_shadow</item>
<item name="android:homeAsUpIndicator">@drawable/ic_ab_up_compat</item>
</style>
<style name="AppTheme.Light" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@color/window_background_light</item>
<item name="android:actionBarStyle">@style/ActionBar.Dark</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
<item name="android:actionBarSize">@dimen/action_bar_height</item>
<item name="android:windowContentOverlay">@drawable/actionbar_shadow</item>
<item name="android:homeAsUpIndicator">@drawable/ic_ab_up_compat</item>
</style>
<style name="AppTheme.Dark" parent="android:Theme.Holo">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@color/window_background</item>
<item name="android:actionBarStyle">@style/ActionBar.Dark</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
<item name="android:actionBarSize">@dimen/action_bar_height</item>
<item name="android:windowContentOverlay">@drawable/actionbar_shadow</item>
<item name="android:homeAsUpIndicator">@drawable/ic_ab_up_compat</item>
</style>
<style name="ActionBar.Light" parent="android:Widget.Holo.Light.ActionBar.Solid">
<style name="ActionBar.Light" parent="android:Widget.Holo.Light.ActionBar">
<item name="android:background">@color/window_background_light</item>
<item name="android:icon">@android:color/transparent</item>
<item name="android:icon">@drawable/actionbar_icon_placeholder_compat</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
<item name="android:titleTextStyle">
@style/ActionBar.TitleLight
</item>
<item name="android:subtitleTextStyle">
@style/ActionBar.SubtitleLight
</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
</style>
<style name="ActionBar.Dark" parent="android:Widget.Holo.ActionBar.Solid">
<style name="ActionBar.Dark" parent="android:Widget.Holo.ActionBar">
<item name="android:background">@color/window_background</item>
<item name="android:icon">@android:color/transparent</item>
<item name="android:icon">@drawable/actionbar_icon_placeholder_compat</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
<item name="android:titleTextStyle">
@style/ActionBar.TitleDark
</item>
<item name="android:subtitleTextStyle">
@style/ActionBar.SubtitleDark
</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
</style>
<style name="ActionBar.TitleDark" parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">
@color/textColor
</item>
<item name="android:textStyle">bold</item>
</style>
<style name="ActionBar.SubtitleDark" parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle">
@ -80,20 +93,21 @@
</item>
</style>
<style name="ActionBar.TitleLight" parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
<style name="ActionBar.TitleLight" parent="android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse">
<item name="android:textColor">
@color/textColorInverted
</item>
<item name="android:textStyle">bold</item>
</style>
<style name="ActionBar.SubtitleLight" parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse">
<item name="android:textColor">
@color/textColorInverted
</item>
</style>
<style name="ActionBar.SubtitleLight" parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle">
<item name="android:textColor">
@color/textColorInverted
</item>
</style>
<style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:src">@drawable/ic_action_overflow</item>
<style name="OverFlow" parent="android:Widget.ActionButton.Overflow">
<item name="android:src">@drawable/ic_ab_overflow_compat</item>
</style>
</resources>