Skip to content

Commit

Permalink
Version 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Mihalachi committed Sep 30, 2014
1 parent eaab210 commit 2c62965
Show file tree
Hide file tree
Showing 111 changed files with 2,125 additions and 5,155 deletions.
4 changes: 2 additions & 2 deletions app-pro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ android {
applicationId "com.maskyn.fileeditorpro"
minSdkVersion 14
targetSdkVersion 19
versionCode 26
versionName "1.10"
versionCode 27
versionName "1.11"
}

compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ android {
applicationId "com.maskyn.fileeditor"
minSdkVersion 14
targetSdkVersion 19
versionCode 26
versionName "1.10"
versionCode 27
versionName "1.11"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
Expand Down
26 changes: 14 additions & 12 deletions app/src/main/java/com/maskyn/fileeditor/AdsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
package com.maskyn.fileeditor;

import android.app.Activity;
import android.preference.PreferenceManager;

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;

Expand All @@ -33,24 +35,24 @@ public class AdsHelper {

public AdsHelper(Activity activity) {
this.activity = activity;
int today = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
int lastDayAdShowed = PreferenceHelper.getLastDayAdShowed(activity);
boolean showAd = today != lastDayAdShowed;
if (showAd) {

interstitial = new InterstitialAd(activity);
interstitial.setAdUnitId("ca-app-pub-5679083452234719/7178038180");
interstitial = new InterstitialAd(activity);
interstitial.setAdUnitId("ca-app-pub-5679083452234719/7178038180");

// Create ad request.
AdRequest adRequest = new AdRequest.Builder().build();
// Create ad request.
AdRequest adRequest = new AdRequest.Builder().build();

// Begin loading your interstitial.
interstitial.loadAd(adRequest);
}
// Begin loading your interstitial.
interstitial.loadAd(adRequest);
}

public void displayInterstitial() {
if (interstitial != null && interstitial.isLoaded()) {

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);
Expand Down
154 changes: 92 additions & 62 deletions build/intermediates/dex-cache/cache.xml

Large diffs are not rendered by default.

Binary file modified build/intermediates/model_data.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void onCreate(final Bundle savedInstanceState) {
e.printStackTrace();
}

proVersionText.setVisibility(ProCheckUtils.isPro(getBaseContext()) ? View.GONE : View.VISIBLE);
proVersionText.setText(ProCheckUtils.isPro(getBaseContext()) ? getString(R.string.donate) : getString(R.string.pro_version));

}

Expand All @@ -75,8 +75,14 @@ public void OpenPlayStore(View view) {

public void GoToProVersion(View view) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.maskyn.fileeditorpro"))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
if(ProCheckUtils.isPro(getBaseContext())) {
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));
}

} catch (Exception e) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Typeface;
import android.net.Uri;
Expand Down Expand Up @@ -152,7 +153,7 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
sFilePath = getArguments().getString("filePath");
pageSystem = new PageSystem(this, getArguments().getString("fileText"));
pageSystem = new PageSystem(getActivity(), this, getArguments().getString("fileText"));
currentEncoding = getArguments().getString("encoding");
getArguments().remove("fileText");
}
Expand Down Expand Up @@ -736,6 +737,7 @@ public Editor(final Context context, AttributeSet attrs) {
mEditHistory = new EditHistory();
mChangeListener = new EditTextChangeListener();
lineUtils = new LineUtils();

deviceHeight = getResources().getDisplayMetrics().heightPixels;

this.mPaintNumbers.setAntiAlias(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ public static boolean getIgnoreBackButton(Context context) {
return getPrefs(context).getBoolean("ignore_back_button", false);
}

public static boolean getPageSystemEnabled(Context context) {
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) {
Expand Down Expand Up @@ -155,4 +163,8 @@ public static void setReadOnly(Context context, boolean value) {
getEditor(context).putBoolean("read_only", value).commit();
}

public static void setNumberOfAdsRequested(Context context, int value) {
getEditor(context).putInt("number_of_ads_requested", value).commit();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@

package sharedcode.turboeditor.util;

import android.content.Context;

import java.util.LinkedList;
import java.util.List;

import sharedcode.turboeditor.preferences.PreferenceHelper;

public class PageSystem {

private List<String> pages;
private int[] startingLines;
private int currentPage = 0;
private PageSystemInterface pageSystemInterface;

public PageSystem(PageSystemInterface pageSystemInterface, String text) {
public PageSystem(Context context, PageSystemInterface pageSystemInterface, String text) {
this.pageSystemInterface = pageSystemInterface;
pages = new LinkedList<>();

Expand All @@ -39,8 +43,9 @@ public PageSystem(PageSystemInterface pageSystemInterface, String text) {
int to;
int indexOfReturn;
int textLenght = text.length();
if (textLenght > maxLenghtInOnePage) {
while (i < textLenght) {
boolean pageSystemEnabled = PreferenceHelper.getPageSystemEnabled(context);
if (pageSystemEnabled && textLenght > maxLenghtInOnePage) {
while (i < textLenght && pageSystemEnabled) {
to = i + charForPage;
indexOfReturn = text.indexOf("\n", to);
if (indexOfReturn > to) to = indexOfReturn;
Expand Down
9 changes: 9 additions & 0 deletions libraries/sharedCode/src/main/res/raw/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@

<changelog bulletedList="true">

<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>
<changelogtext>[b]New! [/b]Setting to disable the "page system"</changelogtext>
<changelogtext>[b]New! [/b]Setting to ignore the back button</changelogtext>
<changelogtext>Fixed an issue related to cut/copy/past buttons</changelogtext>
<changelogtext>Other enchantments and fixes</changelogtext>
</changelogversion>

<changelogversion versionName="1.10" changeDate="Sep 17, 2014">
<changelogtext>[b]New! [/b]Go To Line feature</changelogtext>
<changelogtext>Now the syntax highlight updates when scrolling</changelogtext>
Expand Down
78 changes: 40 additions & 38 deletions libraries/sharedCode/src/main/res/values-af-rZA/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<!--
~ Copyright (C) 2014 Vlad Mihalachi
~
Expand All @@ -17,10 +18,47 @@
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<!--Generated by crowdin.com-->
<!--Generated by crowdin.net-->
<resources>
<string name="use_monospace">Use monospace</string>
<string name="recent_files">Recent files</string>
<string name="font_size">Font size</string>
<string name="connection_name">Connection Name</string>
<string name="line_numbers">Line Numbers</string>
<string name="wrap_content">Wrap content</string>
<string name="view_it_on_the_web">View it on the web</string>
<string name="file">File</string>
<string name="folder">Folder</string>
<string name="light_theme">Light Theme</string>
<string name="goto_line">Go to Line</string>
<string name="find">Find</string>
<string name="replace">Replace</string>
<string name="share">Share</string>
<string name="keyboard_suggestions_and_swipe">Keyboard suggestions and Swipe</string>
<string name="enable_autoencoding">Auto-Encoding</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="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="aggiungi_account">New account</string>
<string name="attiva">Active</string>
<string name="cancella">Delete</string>
Expand Down Expand Up @@ -131,40 +169,4 @@
<string name="open_a_file">Open a file</string>
<string name="open_this_time_only">Open this time only</string>
<string name="change_list_type">Change the list type</string>
<string name="use_monospace">Use monospace</string>
<string name="recent_files">Recent files</string>
<string name="font_size">Font size</string>
<string name="connection_name">Connection Name</string>
<string name="line_numbers">Line Numbers</string>
<string name="wrap_content">Wrap content</string>
<string name="view_it_on_the_web">View it on the web</string>
<string name="add">Add</string>
<string name="file">File</string>
<string name="folder">Folder</string>
<string name="light_theme">Light Theme</string>
<string name="goto_line">Goto Line</string>
<string name="find">Find</string>
<string name="replace">Replace</string>
<string name="root_permission">Root Permission</string>
<string name="share">Share</string>
<string name="keyboard_suggestions_and_swipe">Keyboard suggestions and Swipe</string>
<string name="enable_autoencoding">Auto-Encoding</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="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>
</resources>

This file was deleted.

Loading

0 comments on commit 2c62965

Please sign in to comment.