66 Commits

Author SHA1 Message Date
46ad99aa46 when shift key is pressed delegate to super implementation so shift key is handled correctly, for certain hardware keyboards this is required so the editor is not stuck in shift mode 2016-09-25 02:09:17 -05:00
9408fba5dd Merge remote-tracking branch 'mitchellgordon95/patch-1' 2016-09-25 01:18:04 -05:00
ebce0bd69b Merge remote-tracking branch 'ldemianiuk/replace-fix' 2016-09-25 01:17:02 -05:00
ce2c2d8b0f Removing generated build stuff 2016-09-25 01:13:45 -05:00
0de5a82cdf Merge remote-tracking branch 'Zerglrisk/master' 2016-09-25 01:12:36 -05:00
69f8f2b0c7 Update gradle wrapper to gradle 2.14 2016-09-25 01:00:52 -05:00
245b9f4230 Pin android gradle plugin to 2.1.2 2016-09-25 00:41:06 -05:00
3db0519ec6 File open Bug Fix & Add Page System's Split By Line Mode 2016-06-21 09:56:29 +09:00
9b7de55f55 Fix Folder open if no file 2016-06-20 22:03:12 +09:00
66a86dc513 Add Folder Open 2016-06-20 18:28:39 +09:00
38123fd510 Support opening .org files
Org (organization) files are common among emacs developers. If you're not familiar with it, it's kind of like markdown. It would be nice to be able to automatically open these.
2016-04-19 11:01:56 -07:00
lde
481fe94eb9 fix replace all 2016-02-01 23:25:59 +01:00
6a965ca560 Update README.md 2015-06-25 15:42:20 +02:00
a1e82b65d4 Version 1.19 2015-03-26 21:26:24 +01:00
e399a217e5 Version 1.18.4 2015-03-25 14:47:22 +01:00
68ad318388 Version 1.18.3 2015-03-23 15:31:39 +01:00
1f3ad1ab12 Version 1.17
Added a markdown viewer and fixed a bug with Copy/Paste/Cut actions
2015-03-15 18:45:18 +01:00
2414192638 Merge remote-tracking branch 'origin/master'
Conflicts:
	build/intermediates/dex-cache/cache.xml
2015-03-15 17:38:46 +01:00
1cd94a5310 Small changes 2015-03-15 17:38:03 +01:00
ce4d1756fb Merge pull request #70 from DF1E/master
remove generated files from repo
2015-03-15 17:36:08 +01:00
3234597537 remove old generated files 2015-03-15 14:07:20 +01:00
5f77e6d7b5 remove generated files from git repo 2015-03-15 14:01:29 +01:00
60395106e5 Version 1.16: Accessory View and Black theme
Accessory View and Black theme
2015-03-15 09:26:28 +01:00
3ee11e0bfb Updated support library 2015-03-14 13:21:11 +01:00
b71d27aeaa Commit 2015-03-14 13:12:23 +01:00
05e4157bed Version 1.15
∙ It is a "beta" release, feel free to send you feedback on github.com!
∙ Added Save As! (and rename option)
∙ Added Replace All!
∙ The default encoding now is UTF-16
∙ Removed donations items, if you want to donate please buy the pro
version!
∙ Minor bug fixes
2015-03-14 13:11:56 +01:00
89673216e8 Small changes 2014-12-11 18:58:22 +01:00
7a86540c60 First mac commit 2014-12-11 18:28:54 +01:00
b359950e34 Fixes 2014-10-31 16:42:35 +01:00
614274c7d6 Happy Halloween! 2014-10-30 20:17:33 +01:00
78407c292a New material things 2014-10-25 14:35:31 +02:00
4d26fa7f3d Updated translations from crowdin 2014-10-18 15:47:54 +02:00
4b16119b53 Version 1.13 2014-10-18 15:20:23 +02:00
bf4dcd51b8 Merge pull request #41 from RyDroid/gitignore
Adding some rules to .gitignore
2014-10-18 15:02:54 +02:00
e52a3cb9f5 Merge pull request #42 from RyDroid/mime-types
Adding and reorganizing a little mime types
2014-10-18 15:02:27 +02:00
5702a6c24f Adding and reorganizing a little mime types 2014-10-18 01:29:07 +02:00
ffcd50616e Adding some rules to .gitignore 2014-10-18 01:25:09 +02:00
46842a5343 Version 1.12 2014-10-12 18:11:19 +02:00
df5a302129 Some fixes 2014-10-07 18:55:18 +02:00
04faa104ed Merge pull request #30 from DF1E/master
update LinuxShell from SimpleExplorer
2014-10-02 19:03:37 +02:00
a20f93f0f6 remove old info from LinuxShell 2014-10-02 18:33:44 +02:00
564e55385f update LinuxShell from SimpleExplorer
https://github.com/DF1E/SimpleExplorer/blob/master/src/com/dnielfe/manager/commands/RootCommands.java
2014-10-02 18:25:12 +02:00
2c62965a02 Version 1.11 2014-09-30 20:01:43 +02:00
eaab21069b Some minor but major changes
New advance settings screen, new setting to ignore the back button, new
behaviour of the left and right panels, now the app highlightes all the
visible text
2014-09-28 10:55:13 +02:00
2dbab5220a fixed a visual issue 2014-09-27 17:48:57 +02:00
520c4c53c0 Readded the jar, and fixed a keyboard issue 2014-09-27 15:20:05 +02:00
2fefb3963c Update README.md 2014-09-27 14:49:52 +02:00
e0eb01168e Update README.md 2014-09-26 12:53:13 +02:00
30294f72b5 Update README.md 2014-09-26 12:07:42 +02:00
ed621d369e Update README.md 2014-09-26 12:06:32 +02:00
6507331360 Update README.md 2014-09-26 11:40:00 +02:00
ec4742149b Update README.md 2014-09-26 11:36:05 +02:00
97dd211dc2 Removed the jar "juniversalchardet" 2014-09-26 11:24:19 +02:00
fc67e5930e Added the "pro" module
The pro version doesn't have ads so it doesn't require crashlytics and
play-services
2014-09-25 20:00:25 +02:00
44d4a2828b Small change 2014-09-25 14:31:27 +02:00
276b831ceb Great Update to the source 2014-09-25 14:19:23 +02:00
ec5645c2a4 Update README.md 2014-09-02 09:41:32 +02:00
9ca7d62a8e Merge pull request #18 from DF1E/master
update gradle, gitignore and manifest
2014-08-14 12:26:28 +02:00
28353fea8f update gradle and manifest 2014-08-14 11:57:19 +02:00
ed285afadb Update README.md
New link to the Play Store
2014-07-28 14:24:15 +02:00
3697dd51a4 Eventbus now is build with gradle
Various optimization
2013-10-31 14:46:59 +01:00
ba0fb4ebaa Version 1.2: font size
font size
2013-10-11 15:18:06 +02:00
d7a5d513c7 Version 1.1 2013-10-07 15:10:07 +02:00
e540b8fda7 Version 1.1 monospace, create new file
monospace, create new file
2013-10-07 15:09:32 +02:00
49f890adeb Delete build.gradle 2013-10-06 11:18:38 +02:00
446a6da1fb Update README.md 2013-09-28 10:01:55 +02:00
457 changed files with 32173 additions and 6115 deletions

98
.gitignore vendored
View File

@ -1,35 +1,63 @@
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
# Android Studio
.gradle
/local.properties
/.idea/workspace.xml
.DS_Store
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
doc/
/build
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
crashlytics-build.properties
crashlytics.properties
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
.gradle/
# Signing files
.signing/
# User-specific configurations
.idea/libraries/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
*.iml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
*~
#*#

23
.idea/gradle.xml generated Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="C:\Android\android-studio\gradle\gradle-2.10" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/app-pro" />
<option value="$PROJECT_DIR$/libraries" />
<option value="$PROJECT_DIR$/libraries/FloatingActionButton" />
<option value="$PROJECT_DIR$/libraries/sharedCode" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

1354
LICENSE

File diff suppressed because it is too large Load Diff

126
README.md
View File

@ -1,64 +1,62 @@
# Turbo Editor
Simple, powerful and Open Source file editor for Android.
### Contribute
You can contribute to this project in many ways:
* Browse our issues, comment on proposals, report bugs.
* Clone the balanced-dashboard repo, make some changes according to our
development guidelines and issue a pull-request with your changes.
* Help to translate the application on [Crowdin][crowdin]
* [Donate][donate]
------
### Development guidelines
1. Fork it (`git clone git://github.com/vmihalachi/turbo-editor.git`)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write your code
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new [pull request](https://help.github.com/articles/using-pull-requests)
------
###Donate
* Make a [Paypal][donate paypal] donation
* Flattr this project [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=vmihalachi&url=https://raw.github.com/vmihalachi/turbo-editor&title=Turbo Editor&language=&tags=github&category=software)
------
###Download
* From the [Play Store][download playstore]
* Want to try beta releases? Be a part of the Google Plus [Community][community googleplus]!
------
### Developer
[Vlad Mihalachi][developer site]
------
### A special thanks to..
* [Dumitru Grubii][contributor dumitru grubii] for the icon
* All the translators
* You?
------
### License
Turbo Client is made available under the terms of the [GPLv3][gplv3].
See the [LICENSE][license] file that accompanies this distribution for the full text of the license.
[gplv3]: http://www.gnu.org/licenses/gpl.html
[license]: https://github.com/vmihalachi/turbo-editor/LICENSE
[donate]: https://github.com/vmihalachi/turbo-editor#donate
[donate paypal]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PUQXSX6MTXHZ2
[community googleplus]: https://plus.google.com/u/0/communities/111974095419108178946
[download playstore]: https://play.google.com/store/apps/details?id=com.vmihalachi.turboeditor
[crowdin]: https://crowdin.net/project/turbo-client
[developer site]: http://vmihalachi.com/
[crowdin]: https://crowdin.net/project/turbo-client
[contributor dumitru grubii]: https://twitter.com/DumitruGrubii
[project issues]: https://github.com/vmihalachi/turbo-editor/issues
[project wiki]: https://github.com/vmihalachi/turbo-editor/wiki
# Turbo Editor
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/turbo-client/localized.png)](https://crowdin.com/project/turbo-client)
Simple, powerful and Open Source text editor for Android licensed under the GPLv3 license.
### Download
[![Play Store](http://developer.android.com/images/brand/en_generic_rgb_wo_60.png)](http://play.google.com/store/apps/details?id=com.maskyn.fileeditorpro)
[![F-Droid](https://lh5.googleusercontent.com/-zezQqsBye0c/VCUpPVjcKEI/AAAAAAAAAIQ/HbcG5f1qMIw/w129-h45-no/getitonfdroid.png)](https://f-droid.org/repository/browse/?fdid=com.maskyn.fileeditorpro)
### Contribute
You can contribute to this project in many ways:
* Browse our issues, comment on proposals, report bugs.
* Help to translate the application on [Crowdin][crowdin]
* Be a part of the Google Plus [Community][community googleplus]
* Discuss with us on [XDA thread][xda thread]
* Help to maintain this project active and [Donate][donate]
------
###Donate
[![Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=26VWS2TSAMUJA)
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=vmihalachi&url=https://github.com/vmihalachi/turbo-editor&title=Turbo Editor&language=java&tags=github&category=software)
------
###Images
![](https://lh3.googleusercontent.com/-0GHukwGQPW4/VCUpEhKnZCI/AAAAAAAAAH4/cclI70K79_Q/w347-h520-no/PhoneCustom_7.png)![](https://lh3.googleusercontent.com/-OvazluFl_QQ/VCUo9DAje9I/AAAAAAAAAHQ/i7n1uCpU1hE/w347-h520-no/PhoneCustom_1.png)![](https://lh4.googleusercontent.com/-zh4CYdQPecg/VCUpD3QXpAI/AAAAAAAAAHw/ulL5-V0iJUw/w347-h520-no/PhoneCustom_6.png)![](https://lh4.googleusercontent.com/-LT3k4z9JHo8/VCUo_0jnZRI/AAAAAAAAAHg/Npk9UlkXIV8/w347-h520-no/PhoneCustom_4.png)![](https://lh5.googleusercontent.com/-hXvsf-WYvBs/VCUo9sYfR-I/AAAAAAAAAHY/TTfAgiV_7ko/w347-h520-no/PhoneCustom_3.png)![](https://lh6.googleusercontent.com/-Qib82pK6mZU/VCUpAgYmUdI/AAAAAAAAAHo/zoPVmwcatbQ/w347-h520-no/PhoneCustom_5.png)![](https://lh5.googleusercontent.com/-SERL7X-JHuc/VCax0QSlCGI/AAAAAAAAAJA/hu8dvbvJGBM/w375-h563-no/PhoneCustom_2.png)
------
### Developer
[Vlad Mihalachi][developer site]
------
### A special thanks to..
* [Dumitru Grubii][contributor dumitru grubii] for the icon
* All the translators
* [Howard C. Shaw III][contributor howard] for the Word count feature
* You?
------
### License
Turbo Client is made available under the terms of the [GPLv3][gplv3].
See the [LICENSE][license] file that accompanies this distribution for the full text of the license.
[gplv3]: http://www.gnu.org/licenses/gpl.html
[license]: https://github.com/vmihalachi/turbo-editor/LICENSE
[donate]: https://github.com/vmihalachi/turbo-editor#donate
[donate paypal]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PUQXSX6MTXHZ2
[xda thread]: http://forum.xda-developers.com/android/apps-games/app-turbo-editor-text-editor-t2832016
[community googleplus]: https://plus.google.com/u/0/communities/111974095419108178946
[crowdin]: https://crowdin.net/project/turbo-client
[developer site]: http://vmihalachi.com/
[crowdin]: https://crowdin.net/project/turbo-client
[contributor dumitru grubii]: https://twitter.com/DumitruGrubii
[contributor howard]: https://plus.google.com/+HowardCShawIII
[project issues]: https://github.com/vmihalachi/turbo-editor/issues
[project wiki]: https://github.com/vmihalachi/turbo-editor/wiki

View File

@ -1,30 +0,0 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 18
buildToolsVersion "18.1.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 18
}
}
dependencies {
compile 'com.github.gabrielemariotti.changeloglib:library:1.2.0'
compile 'com.android.support:support-v13:18.0.0'
compile "commons-io:commons-io:2.4"
compile fileTree(dir: 'libs', include: '*.jar')
}

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.vmihalachi.turboeditor"
android:versionCode="2"
android:versionName="0.3"
android:installLocation="auto">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/nome_app_turbo_editor"
android:theme="@style/AppStyle">
<activity
android:name=".activity.HomeActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden|adjustResize"
android:hardwareAccelerated="false"
android:launchMode="singleTop"
android:alwaysRetainTaskState="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.EDIT"/>
<action android:name="android.intent.action.PICK"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="file"/>
<data android:mimeType="text/*"/>
<data android:pathPattern="*.txt"/>
<data android:pathPattern="*.html"/>
<data android:pathPattern="*.css"/>
<data android:pathPattern="*.js"/>
<data android:pathPattern="*.php"/>
</intent-filter>
</activity>
<activity
android:name=".activity.PreferenceAbout"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/aboutactivity_info_category"/>
<activity
android:name=".activity.LicensesActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/open_source_license"/>
<activity
android:name=".activity.SelectFileActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/open_a_file"/>
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true"/>
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
android:value="632.0dip"/>
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
android:value="598.0dip"/>
<meta-data
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
android:value="632.0dip"/>
<meta-data
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
android:value="598.0dip"/>
</application>
</manifest>

View File

@ -1,362 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.activity;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import com.vmihalachi.turboeditor.R;
import com.vmihalachi.turboeditor.event.ErrorOpeningFileEvent;
import com.vmihalachi.turboeditor.event.FileSavedEvent;
import com.vmihalachi.turboeditor.event.FileSelectedEvent;
import com.vmihalachi.turboeditor.event.NewFileOpened;
import com.vmihalachi.turboeditor.fragment.ChangelogDialogFragment;
import com.vmihalachi.turboeditor.fragment.EditorFragment;
import com.vmihalachi.turboeditor.fragment.NoFileOpenedFragment;
import com.vmihalachi.turboeditor.helper.AppInfoHelper;
import de.greenrobot.event.EventBus;
public class HomeActivity extends Activity {
private String TAG = "A0A";
public static final int SELECT_FILE_CODE = 121;
/*
* This class provides a handy way to tie together the functionality of
* {@link DrawerLayout} and the framework <code>ActionBar</code> to implement the recommended
* design for navigation drawers.
*/
protected ActionBarDrawerToggle mDrawerToggle;
/*
* The Drawer Layout
*/
protected DrawerLayout mDrawerLayout;
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
// setup the navigation drawer
setupNavigationDrawer();
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.commit();
/* First Time we open this activity */
if (savedInstanceState == null) {
// Open
mDrawerLayout.openDrawer(Gravity.START);
// Set the default title
getActionBar().setTitle(getString(R.string.nome_app_turbo_editor));
}
// parse the intent
parseIntent(getIntent());
// show a dialog with the changelog
showChangeLog();
}
/**
* {@inheritDoc}
*/
@Override
protected final void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
mDrawerToggle.syncState();
}
/**
* {@inheritDoc}
*/
@Override
public void onResume() {
super.onResume();
// Register the Event Bus for events
EventBus.getDefault().register(this);
}
/**
* {@inheritDoc}
*/
@Override
public void onPause() {
super.onPause();
// Unregister the Event Bus
EventBus.getDefault().unregister(this);
}
/**
* {@inheritDoc}
*/
@Override
protected void onDestroy() {
try {
closeKeyBoard();
} catch (NullPointerException e) {
Log.e(TAG, e.getMessage(), e);
}
super.onDestroy();
}
/**
* {@inheritDoc}
*/
@Override
public final void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mDrawerToggle.onConfigurationChanged(newConfig);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_home, menu);
return super.onCreateOptionsMenu(menu);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
/* If we clicked on the Navigation Drawer Menu item */
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
} else switch (item.getItemId()) {
case R.id.im_open:
startActivityForResult(new Intent(HomeActivity.this, SelectFileActivity.class)
.putExtra("path", "")
.putExtra("action", SelectFileActivity.Actions.SelectFile),
SELECT_FILE_CODE);
return true;
case R.id.im_info:
startActivity(new Intent(this, PreferenceAbout.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
/**
* {@inheritDoc}
*/
@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 (!TextUtils.isEmpty(path)) {
EventBus.getDefault().postSticky(new NewFileOpened(path));
}
}
}
/**
* {@inheritDoc}
*/
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
parseIntent(intent);
}
/**
* @param event
*/
public void onEvent(FileSelectedEvent event) {
// Close the drawer
mDrawerLayout.closeDrawer(Gravity.LEFT);
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, EditorFragment.newInstance(event.getPath()))
.commit();
}
/**
* When a file is saved
* Invoked by the EditorFragment
*
* @param event The event called
*/
public void onEvent(FileSavedEvent event) {
try {
closeKeyBoard();
} catch (NullPointerException e) {
Log.e(TAG, e.getMessage(), e);
}
// Get intent, action and MIME type
final Intent intent = getIntent();
final String action = intent.getAction();
final String type = intent.getType();
if (Intent.ACTION_VIEW.equals(action)
|| Intent.ACTION_EDIT.equals(action)
|| Intent.ACTION_PICK.equals(action)
&& type != null) {
//This Activity was called by startActivityForResult
final Intent returnIntent = new Intent();
setResult(Activity.RESULT_OK, returnIntent);
// finish the activity
finish();
} else {
//This Activity was called by startActivity
//
mDrawerLayout.openDrawer(Gravity.LEFT);
//
getActionBar().setTitle(getString(R.string.nome_app_turbo_editor));
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.commit();
}
}
/**
* When a file can't be opened
* Invoked by the EditorFragment
*
* @param event The event called
*/
public void onEvent(ErrorOpeningFileEvent event) {
//
mDrawerLayout.openDrawer(Gravity.LEFT);
//
getActionBar().setTitle(getString(R.string.nome_app_turbo_editor));
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.commit();
}
private void closeKeyBoard() throws NullPointerException {
// Central system API to the overall input method framework (IMF) architecture
InputMethodManager inputManager =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
// Base interface for a remotable object
IBinder windowToken = getCurrentFocus().getWindowToken();
// Hide type
int hideType = InputMethodManager.HIDE_NOT_ALWAYS;
// Hide the KeyBoard
inputManager.hideSoftInputFromWindow(windowToken, hideType);
}
/**
* Setup the navigation drawer
*/
private void setupNavigationDrawer() {
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
/* Action Bar */
final ActionBar ab = getActionBar();
ab.setDisplayHomeAsUpEnabled(true);
ab.setHomeButtonEnabled(true);
/* Navigation drawer */
mDrawerToggle =
new ActionBarDrawerToggle(
this,
mDrawerLayout,
R.drawable.ic_drawer,
R.string.nome_app_turbo_editor,
R.string.nome_app_turbo_editor) {
/**
* {@inheritDoc}
*/
@Override
public void onDrawerClosed(View view) {
invalidateOptionsMenu();
}
/**
* {@inheritDoc}
*/
@Override
public void onDrawerOpened(View drawerView) {
invalidateOptionsMenu();
}
};
/* link the mDrawerToggle to the Drawer Layout */
mDrawerLayout.setDrawerListener(mDrawerToggle);
}
/**
* Show a dialog with the changelog
*/
private void showChangeLog() {
final String currentVersion = AppInfoHelper.getCurrentVersion(this);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
final String lastVersion = preferences.getString("last_version", currentVersion);
preferences.edit().putString("last_version", currentVersion).commit();
if (!lastVersion.equals(currentVersion)) {
ChangelogDialogFragment.showChangeLogDialog(getFragmentManager());
}
}
/**
* Parses the intent
*/
private void parseIntent(Intent intent) {
final String action = intent.getAction();
final String type = intent.getType();
if (Intent.ACTION_VIEW.equals(action)
|| Intent.ACTION_EDIT.equals(action)
|| Intent.ACTION_PICK.equals(action)
&& type != null) {
// Post the NewFileOpened Event
EventBus.getDefault().postSticky(new NewFileOpened(intent.getData().getPath()));
}
}
}

View File

@ -1,50 +0,0 @@
package com.vmihalachi.turboeditor.activity;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.vmihalachi.turboeditor.R;
public class LicensesActivity extends Activity implements AdapterView.OnItemClickListener {
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_licenses);
ListView listView = (ListView) findViewById(android.R.id.list);
listView.setOnItemClickListener(this);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.open_source_libs));
listView.setAdapter(adapter);
}
/**
* {@inheritDoc}
*/
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String openSourceLib = ((TextView) view.findViewById(android.R.id.text1)).getText().toString();
Intent browserIntent = null;
if (openSourceLib.equals("ChangeLog Library")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/gabrielemariotti/changeloglib?source=c#license"));
} else if (openSourceLib.equals("EventBus")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/greenrobot/EventBus?source=c#license"));
} else if (openSourceLib.equals("commons-io")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://commons.apache.org/proper/commons-io/"));
}
if (browserIntent != null) {
startActivity(browserIntent);
}
}
}

View File

@ -1,109 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import com.vmihalachi.turboeditor.R;
import com.vmihalachi.turboeditor.fragment.ChangelogDialogFragment;
import com.vmihalachi.turboeditor.helper.AppInfoHelper;
public class PreferenceAbout extends PreferenceActivity {
/**
* {@inheritDoc}
*/
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.about);
setupClickablePreferences();
}
public void setupClickablePreferences() {
final Preference email = findPreference("aboutactivity_authoremail"),
changelog = findPreference("aboutactivity_changelog"),
open_source_licenses = findPreference("aboutactivity_open_source_licenses"),
market = findPreference("aboutactivity_authormarket");
if (email != null) {
email.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL, new String[]{"app.feedback.mail@gmail.com"});
i.putExtra(Intent.EXTRA_SUBJECT, AppInfoHelper.getApplicationName(getBaseContext()) + " " + AppInfoHelper.getCurrentVersion(getBaseContext()));
i.putExtra(Intent.EXTRA_TEXT, "");
try {
startActivity(Intent.createChooser(i, getString(R.string.aboutactivity_authoremail_summary)));
} catch (android.content.ActivityNotFoundException ex) {
}
return false;
}
});
}
if (changelog != null) {
changelog.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
ChangelogDialogFragment.showChangeLogDialog(getFragmentManager());
return false;
}
});
}
if (open_source_licenses != null) {
open_source_licenses.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
startActivity(new Intent(PreferenceAbout.this, LicensesActivity.class));
return false;
}
});
}
if (market != null) {
market.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pub:Vlad+Mihalachi"))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
} catch (Exception e) {
}
return false;
}
});
}
}
}

View File

@ -1,243 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.activity;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import com.vmihalachi.turboeditor.R;
import com.vmihalachi.turboeditor.adapter.AdapterDetailedList;
import com.vmihalachi.turboeditor.util.AlphanumComparator;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.AbstractMap;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedList;
public class SelectFileActivity extends Activity implements AdapterView.OnItemClickListener {
private String currentFolder;
private ListView listView;
private boolean wantAFile, wantAFolder;
// The android SD card root path
public static final String SD_CARD_ROOT =
Environment.getExternalStorageDirectory()
.getAbsolutePath();
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_file);
final Actions action = (Actions) getIntent().getExtras().getSerializable("action");
wantAFile = action == Actions.SelectFile;
wantAFolder = action == Actions.SelectFolder;
this.listView = (ListView) findViewById(android.R.id.list);
this.listView.setOnItemClickListener(this);
String path = getIntent().getExtras().getString("path");
if (TextUtils.isEmpty(path)) {
new UpdateList().execute(SD_CARD_ROOT);
} else {
new UpdateList().execute(path);
}
}
void returnData(String path) {
final Intent returnIntent = new Intent();
returnIntent.putExtra("path", path);
setResult(RESULT_OK, returnIntent);
// finish the activity
finish();
}
/**
* {@inheritDoc}
*/
@Override
public void onItemClick(AdapterView<?> parent,
View view, int position, long id) {
final String name = ((TextView) view.findViewById(android.R.id.title)).getText().toString();
if (name.equals("..")) {
vaiIndietro();
return;
} else if (name.equals(getString(R.string.home))) {
new UpdateList().execute(SD_CARD_ROOT);
return;
}
final File selectedFile = new File(currentFolder, name);
if (selectedFile.isFile() && wantAFile) {
returnData(selectedFile.getAbsolutePath());
} else if (selectedFile.isDirectory()) {
new UpdateList().execute(selectedFile.getAbsolutePath());
}
}
/**
* {@inheritDoc}
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_select_file, menu);
menu.findItem(R.id.im_button).setTitle(getString(wantAFolder ? R.string.seleziona
: android.R.string.cancel));
return super.onCreateOptionsMenu(menu);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int i = item.getItemId();
if (i == R.id.im_button) {
if (wantAFolder) {
returnData(currentFolder);
} else if (wantAFile) {
returnData("");
}
}
return super.onOptionsItemSelected(item);
}
void vaiIndietro() {
if (currentFolder.equals("/")) {
new UpdateList().execute(SD_CARD_ROOT);
} else {
File tempFile = new File(currentFolder);
if (tempFile.isFile()) {
tempFile = tempFile.getParentFile()
.getParentFile();
} else {
tempFile = tempFile.getParentFile();
}
new UpdateList().execute(tempFile.getAbsolutePath());
}
}
private class UpdateList extends
AsyncTask<String, Void, LinkedList<AdapterDetailedList.FileDetail>> {
/**
* {@inheritDoc}
*/
@Override
protected LinkedList<AdapterDetailedList.FileDetail> doInBackground(final String... params) {
try {
final String path = params[0];
if (TextUtils.isEmpty(path)) {
return null;
}
File tempFile = new File(path);
if (tempFile.isFile()) {
tempFile = tempFile.getParentFile();
}
final File[] files = tempFile.listFiles();
Arrays.sort(files,
getFileNameComparator());
final LinkedList<AdapterDetailedList.FileDetail> fileDetails = new LinkedList<AdapterDetailedList.FileDetail>();
final LinkedList<AdapterDetailedList.FileDetail>
folderDetails = new LinkedList<AdapterDetailedList.FileDetail>();
final AbstractMap<String, File> tempList = new HashMap<String, File>();
currentFolder = tempFile.getAbsolutePath();
if (files != null) {
for (final File f : files) {
if (f.isHidden()) {
continue;
} else if (f.isDirectory()
&& f.canRead()) {
folderDetails.add(new AdapterDetailedList.FileDetail(f.getName(),
getString(R.string.folder),
""));
} else if (f.isFile()) {
final long fileSize = f.length();
SimpleDateFormat format = new SimpleDateFormat("MMM dd, yyyy hh:mm a");
String date = format.format(f.lastModified());
fileDetails.add(new AdapterDetailedList.FileDetail(f.getName(),
FileUtils.byteCountToDisplaySize(fileSize), date));
}
tempList.put(f.getName(), f);
}
}
folderDetails.addAll(fileDetails);
return folderDetails;
} catch (Exception e) {
return null;
}
}
/**
* {@inheritDoc}
*/
@Override
protected void onPostExecute(final LinkedList<AdapterDetailedList.FileDetail> names) {
boolean isRoot = currentFolder.equals("/");
if (names != null) {
listView.setAdapter(new AdapterDetailedList(getBaseContext(), names, isRoot));
}
super.onPostExecute(names);
}
public final Comparator<File> getFileNameComparator() {
return new AlphanumComparator() {
/**
* {@inheritDoc}
*/
@Override
public String getTheString(Object obj) {
return ((File) obj).getName()
.toLowerCase();
}
};
}
}
public enum Actions {
SelectFile, SelectFolder
}
}

View File

@ -1,23 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.event;
public class OpenDrawerEvent {
}

View File

@ -1,112 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.fragment;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.vmihalachi.turboeditor.R;
// ...
public class EncodingDialogFragment extends DialogFragment implements TextView.OnEditorActionListener {
private EditText mEditText;
public static EncodingDialogFragment newInstance(final String hint) {
final EncodingDialogFragment f = new EncodingDialogFragment();
// Supply num input as an argument.
final Bundle args = new Bundle();
args.putString("hint", hint);
f.setArguments(args);
return f;
}
/**
* {@inheritDoc}
*/
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
final Dialog dialog = getDialog();
final String title = getString(R.string.codifica);
dialog.setTitle(title);
final View view = inflater.inflate(R.layout.dialog_fragment_edittext, container);
this.mEditText = (EditText) view.findViewById(android.R.id.edit);
// Show soft keyboard automatically
this.mEditText.setText(getArguments().getString("hint"));
this.mEditText.requestFocus();
dialog.getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
this.mEditText.setOnEditorActionListener(this);
final Button button = (Button) view.findViewById(android.R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
/**
* {@inheritDoc}
*/
@Override
public void onClick(final View v) {
returnData();
}
});
return view;
}
void returnData() {
EditDialogListener target = (EditDialogListener) getTargetFragment();
if (target == null) {
target = (EditDialogListener) getActivity();
}
target.onFinishEditDialog(this.mEditText.getText().toString(), getArguments().getString("hint"));
this.dismiss();
}
/**
* {@inheritDoc}
*/
@Override
public boolean onEditorAction(final TextView v, final int actionId, final KeyEvent event) {
if (EditorInfo.IME_ACTION_DONE == actionId) {
returnData();
return true;
}
return false;
}
public interface EditDialogListener {
void onFinishEditDialog(String inputText, String hint);
}
}

View File

@ -1,278 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.fragment;
import android.app.ListFragment;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.view.ActionMode;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.vmihalachi.turboeditor.R;
import com.vmihalachi.turboeditor.event.FileSelectedEvent;
import com.vmihalachi.turboeditor.event.NewFileOpened;
import com.vmihalachi.turboeditor.helper.PreferenceHelper;
import org.apache.commons.io.FilenameUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import de.greenrobot.event.EventBus;
public class NavigationDrawerListFragment extends ListFragment implements AbsListView.MultiChoiceModeListener {
private List<String> fileNames;
private ArrayAdapter<String> arrayAdapter;
/**
* {@inheritDoc}
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Our custom layout
View rootView = inflater.inflate(R.layout.fragment_navigation_drawer, container, false);
return rootView;
}
/**
* {@inheritDoc}
*/
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
getListView().setMultiChoiceModeListener(this);
}
/**
* {@inheritDoc}
*/
@Override
public void onResume() {
super.onResume();
// Register the Event Bus for events
EventBus.getDefault().registerSticky(this);
// Refresh the list view
refreshList();
}
/**
* {@inheritDoc}
*/
@Override
public void onPause() {
super.onPause();
// Unregister the Event Bus
EventBus.getDefault().unregister(this);
}
/**
* {@inheritDoc}
*/
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// Path of the file selected
String filePath = savedPaths[position];
// Send the event that a file was selected
EventBus.getDefault().post(new FileSelectedEvent(filePath));
}
/**
* {@inheritDoc}
*/
@Override
public void onItemCheckedStateChanged(ActionMode actionMode, int position, long l, boolean isChecked) {
}
/**
* {@inheritDoc}
*/
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
MenuInflater inflater = actionMode.getMenuInflater();
inflater.inflate(R.menu.action_mode_navigation_drawer, menu);
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
return false;
}
/**
* {@inheritDoc}
*/
@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
switch (menuItem.getItemId()) {
case R.id.im_remove:
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// We get the checked positions
SparseBooleanArray checkedItems = getListView().getCheckedItemPositions();
// If we have some checked positions
if (checkedItems != null) {
for (int i = 0; i < checkedItems.size(); i++) {
// check if the value is checked
if (checkedItems.valueAt(i)) {
// remove the checked path, but don't refresh the list
removePath(savedPaths[checkedItems.keyAt(i)], false);
}
}
// In the end refresh the list
refreshList();
}
// Close the action mode
actionMode.finish();
return true;
default:
return false;
}
}
/**
* {@inheritDoc}
*/
@Override
public void onDestroyActionMode(ActionMode actionMode) {
}
/**
* When a new file is opened
* Invoked by the main activity which receive the intent
*
* @param event The event called
*/
public void onEvent(NewFileOpened event) {
EventBus.getDefault().removeStickyEvent(event);
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
for (int i = 0; i < savedPaths.length; i++) {
// We don't need to save the file path twice
if (savedPaths[i].equals(event.getFilePath())) {
// Send the event that a file was selected
EventBus.getDefault().post(new FileSelectedEvent(event.getFilePath()));
return;
}
}
// Add the path if it wasn't added before
addPath(event.getFilePath());
// Send the event that a file was selected
EventBus.getDefault().post(new FileSelectedEvent(event.getFilePath()));
}
private void addPath(String path) {
// Add a path and refresh the list
addPath(path, true);
}
private void addPath(String path, boolean refreshTheList) {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// StringBuilder
StringBuilder sb = new StringBuilder();
for (int count = 0; count < savedPaths.length; count++) {
// Append the file path and a comma
sb.append(savedPaths[count]).append(",");
}
// Append new path
sb.append(path);
// Put the string and commit
PreferenceHelper.setSavedPaths(getActivity(), sb);
// Update list
if (refreshTheList) {
refreshList();
}
}
private void removePath(String path) {
// Remove the path and refresh the list
removePath(path, true);
}
private void removePath(String path, boolean refresh) {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// StringBuilder
StringBuilder sb = new StringBuilder();
// for cycle
for (int count = 0; count < savedPaths.length; count++) {
if (path.equals(savedPaths[count])) continue;
sb.append(savedPaths[count]).append(",");
}
// Put the string and commit
PreferenceHelper.setSavedPaths(getActivity(), sb);
// Update list
if (refresh) {
refreshList();
}
}
private void refreshList() {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// File names for the list
fileNames = new ArrayList<String>(savedPaths.length);
// StringBuilder that will contain the file paths
StringBuilder sb = new StringBuilder();
// for cycle to convert paths to names
for (String path : savedPaths) {
File file = new File(path);
// Check that the file exist
if (file.exists()) {
fileNames.add(FilenameUtils.getName(path));
sb.append(path).append(",");
}
}
// save list without empty or non existed files
PreferenceHelper.setSavedPaths(getActivity(), sb);
// Adapter
arrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.item_drawer_list, fileNames);
// Set adapter
setListAdapter(arrayAdapter);
}
}

View File

@ -1,23 +0,0 @@
package com.vmihalachi.turboeditor.helper;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
public class AppInfoHelper {
public static String getApplicationName(final Context context) {
final ApplicationInfo applicationInfo = context.getApplicationInfo();
return context.getString(applicationInfo.labelRes);
}
public static String getCurrentVersion(final Context context) {
try {
final PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(),
0);
return packageInfo.versionName;
} catch (PackageManager.NameNotFoundException e) {
return "";
}
}
}

View File

@ -1,74 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.helper;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
public final class PreferenceHelper {
private PreferenceHelper() {
}
// Getter Methods
public static SharedPreferences getPrefs(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context);
}
public static SharedPreferences.Editor getEditor(Context context) {
return getPrefs(context).edit();
}
public static boolean getWrapText(Context context) {
return getPrefs(context).getBoolean("editor_wrap_text", true);
}
public static boolean getSyntaxHiglight(Context context) {
return getPrefs(context).getBoolean("editor_syntax_highlight", true);
}
public static String getEncoding(Context context) {
return getPrefs(context).getString("editor_encoding", "UTF-8");
}
public static String[] getSavedPaths(Context context) {
return getPrefs(context).getString("savedPaths", "").split(",");
}
// Setter methods
public static void setWrapText(Context context, boolean value) {
getEditor(context).putBoolean("editor_wrap_text", value).commit();
}
public static void setSyntaxHiglight(Context context, boolean value) {
getEditor(context).putBoolean("editor_syntax_highlight", value).commit();
}
public static void setEncoding(Context context, String value) {
getEditor(context).putString("editor_encoding", value).commit();
}
public static void setSavedPaths(Context context, StringBuilder stringBuilder) {
getEditor(context).putString("savedPaths", stringBuilder.toString()).commit();
}
}

View File

@ -1,41 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.helper;
public final class StringHelper {
private StringHelper() {
}
public static String join(final String... strings) {
final StringBuffer buffer = new StringBuffer();
for (String string : strings) {
if (!string.endsWith("/")) {
string += "/";
}
buffer.append(string);
}
String result = buffer.toString();
if (result.endsWith("/")) {
result = result.substring(0, result.length() - 1);
}
return result;
}
}

View File

@ -1,44 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.util;
public class MimeTypes {
public static final String[] MIME_TEXT = {
"ajx", "am", "asa", "asc", "asp", "aspx", "awk", "bat", "c", "cdf", "cf", "cfg", "cfm", "cgi", "cnf", "conf", "cpp", "css", "csv", "ctl", "dat", "dhtml", "diz", "file", "forward", "grp", "h", "hpp", "hqx", "hta", "htaccess", "htc", "htm", "html", "htpasswd", "htt", "htx", "in", "inc", "info", "ini", "ink", "java", "js", "jsp", "key", "log", "logfile", "m3u", "m4", "m4a", "mak", "map", "model", "msg", "nfo", "nsi", "info", "old", "pas", "patch", "perl", "php", "php2", "php3", "php4", "php5", "php6", "phtml", "pix", "pl", "pm", "po", "pwd", "py", "qmail", "rb", "rbl", "rbw", "readme", "reg", "rss", "rtf", "ruby", "session", "setup", "sh", "shtm", "shtml", "sql", "ssh", "stm", "style", "svg", "tcl", "text", "threads", "tmpl", "tpl", "txt", "ubb", "vbs", "xhtml", "xml", "xrc", "xsl"
};
public static final String[] MIME_CODE = {
"xml", "php", "asp", "json", "wiki"
};
public static final String[] MIME_HTML = {
"htm"
};
public static final String[] MIME_PICTURE = {
"png", "jpeg", "jpg", "ico", "gif", "bmp", "tiff"
};
public static final String[] MIME_MUSIC = {
"mp3", "avi", "flac", "mpga"
};
public static final String[] MIME_VIDEO = {
"mp4", "mkv", "wmw"
};
public static final String[] MIME_ARCHIVE = {
"zip", "tar", "gz", "bz2", "rar", "7z"
};
}

View File

@ -1,66 +0,0 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.util;
import java.util.regex.Pattern;
public class Patterns {
public static final int COLOR_NUMBER = 0xffff6600;
public static final int COLOR_KEYWORD = 0xff2f6f9f;
public static final int COLOR_ATTR = 0xff4f9fcf;
public static final int COLOR_ATTR_VALUE = 0xffd44950;
public static final int COLOR_STRING = 0xffd44950;
public static final int COLOR_COMMENT = 0xff999999;
// Strings
public static final Pattern GENERAL_STRINGS = Pattern.compile("\"(.*?)\"|'(.*?)'");
public static final Pattern HTML_OPEN_TAGS = Pattern.compile(
"<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>");
public static final Pattern HTML_CLOSE_TAGS = Pattern.compile(
"</([A-Za-z][A-Za-z0-9]*)\\b[^>]*>");
public static final Pattern HTML_ATTRS = Pattern.compile(
"(\\S+)=[\"']?((?:.(?![\"']?\\s+(?:\\S+)=|[>\"']))+.)[\"']?");
//static final Pattern CSS_STYLE_NAME= Pattern.compile(
// "[ \\t\\n\\r\\f](.+?)\\{([^\\)]+)\\}");
public static final Pattern CSS_ATTRS = Pattern.compile(
"(.+?):(.+?);");
public static final Pattern CSS_ATTR_VALUE = Pattern.compile(
":[ \t](.+?);");
public static final Pattern NUMBERS = Pattern.compile(
"\\b(\\d*[.]?\\d+)\\b");
public static final Pattern CSS_NUMBERS = Pattern.compile(
"/^auto$|^[+-]?[0-9]+\\.?([0-9]+)?(px|em|ex|%|in|cm|mm|pt|pc)?$/ig");
public static final Pattern GENERAL_KEYWORDS = Pattern.compile(
"\\b(alignas|alignof|and|and_eq|asm|auto|bitand|bitorbool|break|case|catch|char|"
+ "char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype"
+ "|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|"
+ "false|float|for|friend|function|goto|if|inline|int|mutable|namespace|new|noexcept|"
+ "not|not_eq|nullptr|operator|or|or_eq|private|protected|public|register|"
+ "reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast"
+ "|struct|switch|template|this|thread_local|throw|true|try|typedef|typeid|typename"
+ "|union|unsigned|using|var|virtual|void|volatile|wchar_t|while|xor|xor_eq)\\b");
// Comments
public static final Pattern XML_COMMENTS = Pattern.compile("(?s)<!--.*?-->");
public static final Pattern GENERAL_COMMENTS = Pattern.compile(
"/\\*(?:.|[\\n\\r])*?\\*/|//.*");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@id/fragment_editor"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<fragment android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:name="com.vmihalachi.turboeditor.fragment.NavigationDrawerListFragment"
android:id="@id/drawer_list"
android:layout_gravity="left"/>
</android.support.v4.widget.DrawerLayout>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<view xmlns:android="http://schemas.oiandroid.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="it.gmariotti.changelibs.library.view.ChangeLogListView"
android:id="@+id/view"
android:layout_gravity="center" />

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:fillViewport="true">
<view
class="com.vmihalachi.turboeditor.fragment.EditorFragment$Editor"
android:id="@id/editor"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:bufferType="normal"
android:gravity="top|left"
android:imeOptions="actionDone|flagNoFullscreen"
android:inputType="textMultiLine|textImeMultiLine|textNoSuggestions"
android:maxLength="@integer/editor_max_file_size"
android:singleLine="false"
android:text="@null"
android:textSize="@dimen/text_size_editor" />
</ScrollView>

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. 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"
android:minHeight="@dimen/item_file_list_height">
<ImageView
android:id="@android:id/icon"
android:layout_width="@dimen/icon_dimension"
android:layout_height="@dimen/icon_dimension"
android:padding="@dimen/icon_padding"
android:layout_alignParentLeft="true" />
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@android:id/icon"
android:maxLines="1"
android:textSize="@dimen/text_size_title"
android:ellipsize="end"
android:padding="@dimen/minimum_padding" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_toRightOf="@android:id/icon"
android:layout_below="@android:id/title"
android:padding="@dimen/minimum_padding">
<TextView
android:id="@android:id/text1"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="@dimen/text_size_subtitle"
android:enabled="false"
android:ellipsize="end"/>
<TextView
android:id="@android:id/text2"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="@dimen/text_size_subtitle"
android:enabled="false"
android:ellipsize="end"/>
</LinearLayout>
</RelativeLayout>

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@id/im_save"
android:showAsAction="always"
android:icon="@drawable/ic_action_tick"
android:title="@string/salva"/>
<item
android:id="@id/im_undo"
android:showAsAction="always"
android:icon="@drawable/ic_action_undo"
android:title="@string/testo_indietro"
/>
<item
android:id="@id/im_redo"
android:showAsAction="always"
android:icon="@drawable/ic_action_redo"
android:title="@string/testo_rifai"
/>
<item
android:title="@string/preferenze"
android:showAsAction="ifRoom|withText">
<menu>
<item
android:id="@id/im_editor_encoding"
android:showAsAction="ifRoom"
android:title="@string/codifica"/>
<item
android:id="@id/im_wrap_text"
android:showAsAction="ifRoom"
android:title="@string/wrap_the_text"
android:checkable="true"/>
<item
android:id="@id/im_syntax_highlight"
android:showAsAction="ifRoom"
android:title="@string/menu_syntax_highlight"
android:checkable="true"/>
</menu>
</item>
</menu>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<changelog bulletedList="true">
<changelogversion versionName="0.3" changeDate="Sep 27, 2013">
<changelogtext>Improved the about page</changelogtext>
</changelogversion>
<changelogversion versionName="0.2" changeDate="Sep 25, 2013">
<changelogtext>Keyboard now closes when you save a file</changelogtext>
<changelogtext>Fixed some issues when launching the app</changelogtext>
</changelogversion>
<changelogversion versionName="0.1" changeDate="Sep 24, 2013">
<changelogtext>First release</changelogtext>
</changelogversion>
</changelog>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Informationen</string>
<string name="aboutactivity_app_category">App-Informationen</string>
<string name="aboutactivity_miscellaneous_category">Sonstiges</string>
<string name="aboutactivity_version">v %1$s</string>
<string name="aboutactivity_author">Autor</string>
<string name="aboutactivity_authorsite">Website</string>
<string name="aboutactivity_authorsite_summary">Die Website des Autors anzeigen</string>
<string name="aboutactivity_authoremail">E-Mail</string>
<string name="aboutactivity_authoremail_summary">Dem Autor eine E-Mail senden</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Twitter Profil anzeigen</string>
<string name="aboutactivity_authorgoogleplus">Google\u002B</string>
<string name="aboutactivity_authorgoogleplus_summary">Google\u002B Profil anzeigen</string>
<string name="aboutactivity_betatester">Werde Betatester</string>
<string name="aboutactivity_betatester_summary">Sei Teil der Community um Beta-Updates zu erhalten</string>
<string name="aboutactivity_helptranslate">Übersetze diese Anwendung</string>
<string name="aboutactivity_helptranslate_summary">Korrigiere Fehler oder füge eine neue Übersetzung hinzu</string>
<string name="aboutactivity_readme">Readme</string>
<string name="aboutactivity_readme_summary">Readme-Datei anzeigen</string>
<string name="aboutactivity_faq">Häufige Fragen / FAQ</string>
<string name="aboutactivity_faq_summary">App-FAQ anzeigen</string>
<string name="aboutactivity_changelog">Changelog</string>
<string name="aboutactivity_changelog_summary">Changelog anzeigen</string>
<string name="aboutactivity_license">Nutzungsbedingungen</string>
<string name="aboutactivity_license_summary">Nutzungsbedingungen anzeigen</string>
<string name="aboutactivity_license_accept">Akzeptieren</string>
<string name="aboutactivity_license_refuse">Ablehnen</string>
<string name="aboutactivity_privacy">Datenschutzrichtlinien</string>
<string name="aboutactivity_privacy_summary">Datenschutzrichtlinien anzeigen</string>
<string name="aboutactivity_todo">ToDo-Liste</string>
<string name="aboutactivity_todo_summary">ToDo-Liste anzeigen</string>
<string name="aboutactivity_donate">Spenden</string>
<string name="aboutactivity_donate_summary">Danke, dass du mich unterstützst</string>
<string name="aboutactivity_market">Play Store</string>
<string name="aboutactivity_market_summary">Feedback abgeben</string>
<string name="aboutactivity_authormarket">Weitere App</string>
<string name="aboutactivity_authormarket_summary">Weitere Apps des Autors anzeigen</string>
</resources>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Πληροφορίες</string>
<string name="aboutactivity_app_category">Πληροφορίες εφαρμογής</string>
<string name="aboutactivity_miscellaneous_category">Διάφορα</string>
<string name="aboutactivity_version">Έκδοση %1$s</string>
<string name="aboutactivity_author">Δημιουργός</string>
<string name="aboutactivity_authorsite">Ιστότοπος δημιουργού</string>
<string name="aboutactivity_authorsite_summary">Προβολή ιστότοπου δημιουργού</string>
<string name="aboutactivity_authoremail">Email δημιουργού</string>
<string name="aboutactivity_authoremail_summary">Αποστολή email στον δημιουργό</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Προβολή σελίδας στο Twitter</string>
<string name="aboutactivity_authorgoogleplus">Google Plus</string>
<string name="aboutactivity_authorgoogleplus_summary">Προβολή σελίδας στο Google Plus</string>
<string name="aboutactivity_betatester">Γίνετε beta tester</string>
<string name="aboutactivity_betatester_summary">Γίνετε μέρος της κοινότητας για να λαμβάνετε ενημερώσεις beta εκδόσεων</string>
<string name="aboutactivity_helptranslate">Μεταφράστε την εφαρμογή</string>
<string name="aboutactivity_helptranslate_summary">Διορθώσει κάποια λάθη ή προσθέσετε μια νέα μετάφραση</string>
<string name="aboutactivity_readme">Αρχείο πληροφοριών</string>
<string name="aboutactivity_readme_summary">Διαβάστε την αναφορά</string>
<string name="aboutactivity_faq">ΣΥΧΝΈΣ ΕΡΩΤΉΣΕΙΣ</string>
<string name="aboutactivity_faq_summary">Προβολή ΣΕΑ εφαρμογής</string>
<string name="aboutactivity_changelog">Αρχείο καταγραφής αλλαγών</string>
<string name="aboutactivity_changelog_summary">Προβολή αρχείου καταγραφής αλλαγών</string>
<string name="aboutactivity_license">Όροι παροχής υπηρεσιών</string>
<string name="aboutactivity_license_summary">Διαβάστε τους όρους παροχής υπηρεσιών</string>
<string name="aboutactivity_license_accept">Αποδοχή</string>
<string name="aboutactivity_license_refuse">Άρνηση</string>
<string name="aboutactivity_privacy">Πολιτική απορρήτου</string>
<string name="aboutactivity_privacy_summary">Διαβάζετε την πολιτική απορρήτου</string>
<string name="aboutactivity_todo">Λίστα ToDo</string>
<string name="aboutactivity_todo_summary">Διαβάστε τη λίστα todo</string>
<string name="aboutactivity_donate">Κάντε μια δωρεά</string>
<string name="aboutactivity_donate_summary">Σας ευχαριστούμε για την υποστήριξη!</string>
<string name="aboutactivity_market">Play Store</string>
<string name="aboutactivity_market_summary">Αποστολή σχολίων και βαθμολογίας!</string>
<string name="aboutactivity_authormarket">Κατάστημα του δημιουργού</string>
<string name="aboutactivity_authormarket_summary">Προβολή άλλων εφαρμογών του δημιουργού!</string>
</resources>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Informazioni</string>
<string name="aboutactivity_app_category">Informazioni applicazione</string>
<string name="aboutactivity_miscellaneous_category">Varie</string>
<string name="aboutactivity_version">Versione %1$s</string>
<string name="aboutactivity_author">Autore</string>
<string name="aboutactivity_authorsite">Sito Web Autore</string>
<string name="aboutactivity_authorsite_summary">Visualizza il sito dell\'autore</string>
<string name="aboutactivity_authoremail">Email Autore</string>
<string name="aboutactivity_authoremail_summary">Manda una mail all\'autore</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Visualizza la pagina twitter</string>
<string name="aboutactivity_authorgoogleplus">Google Plus</string>
<string name="aboutactivity_authorgoogleplus_summary">Visualizza pagina Google Plus</string>
<string name="aboutactivity_betatester">Diventa un beta tester</string>
<string name="aboutactivity_betatester_summary">Diventa una parte della gruppo per ricevere gli aggiornamenti beta</string>
<string name="aboutactivity_helptranslate">Traduci l\'applicazione</string>
<string name="aboutactivity_helptranslate_summary">Correggi alcuni errori o aggiunggi una nuova traduzione</string>
<string name="aboutactivity_readme">Leggimi</string>
<string name="aboutactivity_readme_summary">Leggi la guida</string>
<string name="aboutactivity_faq">Domande frequenti</string>
<string name="aboutactivity_faq_summary">Visualizza le FAQ</string>
<string name="aboutactivity_changelog">ChangeLog</string>
<string name="aboutactivity_changelog_summary">Visualizza i cambiamenti</string>
<string name="aboutactivity_license">Termini di servizio</string>
<string name="aboutactivity_license_summary">Leggi i termini di servizio</string>
<string name="aboutactivity_license_accept">Accetta</string>
<string name="aboutactivity_license_refuse">Rifiuta</string>
<string name="aboutactivity_privacy">Norme sulla privacy</string>
<string name="aboutactivity_privacy_summary">Leggi le norme sulla privacy</string>
<string name="aboutactivity_todo">Da Fare</string>
<string name="aboutactivity_todo_summary">Leggi la lista delle cosa da fare</string>
<string name="aboutactivity_donate">Fai una donazione</string>
<string name="aboutactivity_donate_summary">Grazie per il tuo supporto!</string>
<string name="aboutactivity_market">Android Market</string>
<string name="aboutactivity_market_summary">Visualizza l\'app nel market!</string>
<string name="aboutactivity_authormarket">Market Autore</string>
<string name="aboutactivity_authormarket_summary">Visualizza altre app!</string>
</resources>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Maklumat</string>
<string name="aboutactivity_app_category">Maklumat Aplikasi</string>
<string name="aboutactivity_miscellaneous_category">Lain-lain</string>
<string name="aboutactivity_version">Versi %1$s</string>
<string name="aboutactivity_author">Pencipta</string>
<string name="aboutactivity_authorsite">Laman Pencipta</string>
<string name="aboutactivity_authorsite_summary">Buka laman pencipta</string>
<string name="aboutactivity_authoremail">Hubungi pencipta</string>
<string name="aboutactivity_authoremail_summary">Hantar e-mail kepada pencipta</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Buka laman Twitter</string>
<string name="aboutactivity_authorgoogleplus">Google Plus</string>
<string name="aboutactivity_authorgoogleplus_summary">Buka laman Google Plus</string>
<string name="aboutactivity_betatester">Menjadi penguji versi beta</string>
<string name="aboutactivity_betatester_summary">Jadi sebahagian daripada komuniti untuk menerima versi beta terkini</string>
<string name="aboutactivity_helptranslate">Menterjemahkan aplikasi</string>
<string name="aboutactivity_helptranslate_summary">Membetulkan kesalahan atau menambah terjemahan baru</string>
<string name="aboutactivity_readme">Read Me</string>
<string name="aboutactivity_readme_summary">Baca rujukan</string>
<string name="aboutactivity_faq">FAQ</string>
<string name="aboutactivity_faq_summary">Tunjukkan FAQ aplikasi</string>
<string name="aboutactivity_changelog">ChangeLog</string>
<string name="aboutactivity_changelog_summary">Tunjukkan changelog aplikasi</string>
<string name="aboutactivity_license">Syarat-syarat Penggunaan</string>
<string name="aboutactivity_license_summary">Baca syarat-syarat Penggunaan</string>
<string name="aboutactivity_license_accept">Terima</string>
<string name="aboutactivity_license_refuse">Menolak</string>
<string name="aboutactivity_privacy">Dasar privasi</string>
<string name="aboutactivity_privacy_summary">Baca dasar privasi</string>
<string name="aboutactivity_todo">Senarai cadangan penambahbaikan</string>
<string name="aboutactivity_todo_summary">Baca cadangan penambahbaikan</string>
<string name="aboutactivity_donate">Beri sumbangan</string>
<string name="aboutactivity_donate_summary">Terima kasih kerana menyokong saya!</string>
<string name="aboutactivity_market">Play Store</string>
<string name="aboutactivity_market_summary">Hantar maklum balas dan menilai aplikasi!</string>
<string name="aboutactivity_authormarket">Lebih banyak berkenaan pencipta</string>
<string name="aboutactivity_authormarket_summary">Tunjukkan semua aplikasi pencipta!</string>
</resources>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Info</string>
<string name="aboutactivity_app_category">Applicatie informatie</string>
<string name="aboutactivity_miscellaneous_category">Diversen</string>
<string name="aboutactivity_version">Versie %1$s</string>
<string name="aboutactivity_author">Auteur</string>
<string name="aboutactivity_authorsite">Website auteur</string>
<string name="aboutactivity_authorsite_summary">Toon de website van de auteur</string>
<string name="aboutactivity_authoremail">E-mailadres auteur</string>
<string name="aboutactivity_authoremail_summary">Stuur een e-mail naar de auteur</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Toon de Twitter pagina</string>
<string name="aboutactivity_authorgoogleplus">Google+</string>
<string name="aboutactivity_authorgoogleplus_summary">Toon de Google+ pagina</string>
<string name="aboutactivity_betatester">Een betatester worden</string>
<string name="aboutactivity_betatester_summary">Word lid van de community om beta updates te ontvangen</string>
<string name="aboutactivity_helptranslate">Vertaal de applicatie</string>
<string name="aboutactivity_helptranslate_summary">Verbeter de vertalingen of voeg nieuwe onderdelen toe</string>
<string name="aboutactivity_readme">Lees mij</string>
<string name="aboutactivity_readme_summary">Lees meer over de app</string>
<string name="aboutactivity_faq">Veelgestelde vragen</string>
<string name="aboutactivity_faq_summary">Toon de veelgestelde vragen</string>
<string name="aboutactivity_changelog">Aanpassingslogboek</string>
<string name="aboutactivity_changelog_summary">Toon het logboek</string>
<string name="aboutactivity_license">Algemene gebruikersvoorwaarden</string>
<string name="aboutactivity_license_summary">Lees de algemene gebruiksvoorwaarden</string>
<string name="aboutactivity_license_accept">Accepteren</string>
<string name="aboutactivity_license_refuse">Weigeren</string>
<string name="aboutactivity_privacy">Privacybeleid</string>
<string name="aboutactivity_privacy_summary">Lees het privacybeleid</string>
<string name="aboutactivity_todo">TODO lijst</string>
<string name="aboutactivity_todo_summary">Lees de todolijst</string>
<string name="aboutactivity_donate">Maak een donatie</string>
<string name="aboutactivity_donate_summary">Bedankt voor uw ondersteuning!</string>
<string name="aboutactivity_market">Play Store</string>
<string name="aboutactivity_market_summary">Geef je reactie en een waardering!</string>
<string name="aboutactivity_authormarket">Meer applicaties</string>
<string name="aboutactivity_authormarket_summary">Toon alle apps van dezelfde ontwikkelaar!</string>
</resources>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Informacje</string>
<string name="aboutactivity_app_category">Informacje o aplikacji</string>
<string name="aboutactivity_miscellaneous_category">Różne</string>
<string name="aboutactivity_version">Wersja %1$ s</string>
<string name="aboutactivity_author">Autor</string>
<string name="aboutactivity_authorsite">Strona autora</string>
<string name="aboutactivity_authorsite_summary">Pokaż stronę autora</string>
<string name="aboutactivity_authoremail">Adres mail\'owy autora</string>
<string name="aboutactivity_authoremail_summary">Wyślij e-mail do autora</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Pokaż stronę na twitter\'ze</string>
<string name="aboutactivity_authorgoogleplus">Google Plus</string>
<string name="aboutactivity_authorgoogleplus_summary">Pokaż stronę na Google Plus</string>
<string name="aboutactivity_betatester">Zostań beta testerem</string>
<string name="aboutactivity_betatester_summary">Zostań częścią społeczności, aby otrzymywać aktualizacje beta</string>
<string name="aboutactivity_helptranslate">Tłumaczenie aplikacji</string>
<string name="aboutactivity_helptranslate_summary">Popraw pewne błędy lub dodaj nowe tłumaczenie</string>
<string name="aboutactivity_readme">Read Me</string>
<string name="aboutactivity_readme_summary">Read the reference</string>
<string name="aboutactivity_faq">FAQ</string>
<string name="aboutactivity_faq_summary">Pokaż FAQ aplikacji</string>
<string name="aboutactivity_changelog">Lista zmian</string>
<string name="aboutactivity_changelog_summary">Pokaż listę zmian aplikacji</string>
<string name="aboutactivity_license">Regulamin</string>
<string name="aboutactivity_license_summary">Przeczytaj regulamin</string>
<string name="aboutactivity_license_accept">Akceptuj</string>
<string name="aboutactivity_license_refuse">Odmów</string>
<string name="aboutactivity_privacy">Polityka prywatności</string>
<string name="aboutactivity_privacy_summary">Przeczytaj o polityce prywatności</string>
<string name="aboutactivity_todo">Lista rzeczy do zrobienia</string>
<string name="aboutactivity_todo_summary">Przeczytaj listy rzeczy do zrobienia</string>
<string name="aboutactivity_donate">Przekaż darowiznę</string>
<string name="aboutactivity_donate_summary">Dziękuję za wspieranie mnie!</string>
<string name="aboutactivity_market">Sklep Play</string>
<string name="aboutactivity_market_summary">Wyślij opinię i Oceń go!</string>
<string name="aboutactivity_authormarket">Sklep autora</string>
<string name="aboutactivity_authormarket_summary">Pokaż inne aplikcje autora!</string>
</resources>

View File

@ -1,23 +0,0 @@
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!-- Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
</resources>

View File

@ -1,24 +0,0 @@
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!-- Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. -->
<dimen name="activity_horizontal_margin">128dp</dimen>
</resources>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="open_source_libs">
<item>ChangeLog Library</item>
<item>EventBus</item>
<item>commons-io</item>
</string-array>
</resources>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!-- action bar background color -->
<color name="actionbar_background">#111111</color>
<!-- activity background color -->
<color name="activity_background">#202020</color>
<!-- activity text color -->
<color name="activity_text_color">#fff7f7f9</color>
<!-- navigation drawer background color -->
<color name="navigation_drawer_background">#1d1d1d</color>
<!-- colors used as file icons -->
<color name="file_folder">#ffbb33</color>
<color name="file_code">#00a569</color>
<color name="file_html">#00a569</color>
<color name="file_text">#717171</color>
<color name="file_archive">#aa66cc</color>
<color name="file_media_music">#ff4444</color>
<color name="file_media_picture">#33b5e5</color>
<color name="file_media_video">#ff00607d</color>
</resources>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!-- menu item ids -->
<item type="id" name="im_undo"/>
<item type="id" name="im_redo"/>
<item type="id" name="im_editor"/>
<item type="id" name="im_remove"/>
<item type="id" name="im_open"/>
<item type="id" name="im_info"/>
<item type="id" name="im_button"/>
<item type="id" name="im_save"/>
<item type="id" name="im_editor_encoding"/>
<item type="id" name="im_wrap_text"/>
<item type="id" name="im_syntax_highlight"/>
<!-- layout item ids -->
<item type="id" name="drawer_layout"/>
<item type="id" name="fragment_editor"/>
<item type="id" name="drawer_list"/>
<item type="id" name="editor"/>
</resources>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.net-->
<resources>
<string name="aboutactivity_info_category">Info</string>
<string name="aboutactivity_app_category">Application Info</string>
<string name="aboutactivity_miscellaneous_category">Miscellaneous</string>
<string name="aboutactivity_version">Version %1$s</string>
<string name="aboutactivity_author">Author</string>
<string name="aboutactivity_authorsite">Author site</string>
<string name="aboutactivity_authorsite_summary">Show author site</string>
<string name="aboutactivity_authoremail">Author mail</string>
<string name="aboutactivity_authoremail_summary">Send mail to author</string>
<string name="aboutactivity_authortwitter">Twitter</string>
<string name="aboutactivity_authortwitter_summary">Show twitter page</string>
<string name="aboutactivity_authorgoogleplus">Google Plus</string>
<string name="aboutactivity_authorgoogleplus_summary">Show Google Plus page</string>
<string name="aboutactivity_betatester">Become a beta tester</string>
<string name="aboutactivity_betatester_summary">Be a part of the community to receive beta updates</string>
<string name="aboutactivity_helptranslate">Translate the Application</string>
<string name="aboutactivity_helptranslate_summary">Correct some mistakes or add a new translation</string>
<string name="aboutactivity_readme">Read Me</string>
<string name="aboutactivity_readme_summary">Read the reference</string>
<string name="aboutactivity_faq">FAQ</string>
<string name="aboutactivity_faq_summary">Show app faq</string>
<string name="aboutactivity_changelog">ChangeLog</string>
<string name="aboutactivity_changelog_summary">Show app changelog</string>
<string name="aboutactivity_license">Terms of service</string>
<string name="aboutactivity_license_summary">Read the Terms of service</string>
<string name="aboutactivity_license_accept">Accept</string>
<string name="aboutactivity_license_refuse">Refuse</string>
<string name="aboutactivity_privacy">Privacy policy</string>
<string name="aboutactivity_privacy_summary">Read the Privacy policy</string>
<string name="aboutactivity_todo">ToDo List</string>
<string name="aboutactivity_todo_summary">Read the todo list</string>
<string name="aboutactivity_donate">Make a donation</string>
<string name="aboutactivity_donate_summary">Thank you for supporting me!</string>
<string name="aboutactivity_market">Play Store</string>
<string name="aboutactivity_market_summary">Send feedback and rate it!</string>
<string name="aboutactivity_authormarket">Author Store</string>
<string name="aboutactivity_authormarket_summary">Show author applications!</string>
</resources>

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<style name="AppStyle"
parent="android:Theme.Holo">
<item name="android:windowBackground">@color/activity_background</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="android:textColor">@color/activity_text_color</item>
</style>
<style name="ActionBarStyle"
parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/actionbar_background</item>
<item name="android:backgroundStacked">@color/actionbar_background</item>
<item name="android:backgroundSplit">@color/actionbar_background</item>
<item name="android:titleTextStyle">@style/ActionBarStyle.Title.Inverse</item>
<item name="android:subtitleTextStyle">@style/ActionBarStyle.Subtitle</item>
</style>
<style name="ActionBarStyle.Title.Inverse"
parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@android:color/primary_text_dark_nodisable</item>
</style>
<style name="ActionBarStyle.Subtitle"
parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle">
<item name="android:textColor">@android:color/primary_text_dark_nodisable</item>
</style>
</resources>

View File

@ -1,100 +0,0 @@
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/aboutactivity_info_category">
<Preference
android:key="aboutactivity_author"
android:title="@string/aboutactivity_author"
android:summary="Vlad Mihalachi" />
<Preference
android:key="aboutactivity_authorsite"
android:title="@string/aboutactivity_authorsite"
android:summary="@string/aboutactivity_authorsite_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="http://vmihalachi.com" />
</Preference>
<Preference
android:key="aboutactivity_authoremail"
android:title="@string/aboutactivity_authoremail"
android:summary="@string/aboutactivity_authoremail_summary" />
<Preference
android:key="aboutactivity_authorgoogleplus"
android:title="@string/aboutactivity_authorgoogleplus"
android:summary="@string/aboutactivity_authorgoogleplus_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="https://plus.google.com/u/0/116753921964371818338" />
</Preference>
<Preference
android:key="aboutactivity_authortwitter"
android:title="@string/aboutactivity_authortwitter"
android:summary="@string/aboutactivity_authortwitter_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="https://twitter.com/vmihalachi" />
</Preference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/aboutactivity_app_category">
<Preference
android:key="aboutactivity_betatester"
android:title="@string/aboutactivity_betatester"
android:summary="@string/aboutactivity_betatester_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="https://plus.google.com/u/0/communities/111974095419108178946" />
</Preference>
<Preference
android:key="aboutactivity_helptranslate"
android:title="@string/aboutactivity_helptranslate"
android:summary="@string/aboutactivity_helptranslate_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="http://crowdin.net/project/turbo-client" />
</Preference>
<Preference
android:key="aboutactivity_changelog"
android:title="@string/aboutactivity_changelog"
android:summary="@string/aboutactivity_changelog_summary" />
<Preference
android:key="aboutactivity_faq"
android:title="@string/aboutactivity_faq"
android:summary="@string/aboutactivity_faq_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/vmihalachi/TurboEditor/wiki/Faq" />
</Preference>
<Preference
android:key="aboutactivity_open_source_licenses"
android:title="@string/open_source_license"
android:summary="@string/open_source_license_summary" />
<Preference
android:key="aboutactivity_authormarket"
android:title="@string/aboutactivity_authormarket"
android:summary="@string/aboutactivity_authormarket_summary" />
</PreferenceCategory>
</PreferenceScreen>

2
app-pro/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build
manifest-merger-release-report.txt

73
app-pro/build.gradle Normal file
View File

@ -0,0 +1,73 @@
/*
* 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/>.
*/
import java.util.regex.Pattern
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.maskyn.fileeditorpro"
minSdkVersion 11
targetSdkVersion 22
versionCode 47
versionName "1.19"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:sharedCode')
}
task incrementVersionCode << {
println(":incrementVersionCode - Incrementing Version Code...")
def buildGradleFile = file("build.gradle")
def patternVersionCode = Pattern.compile("versionCode (\\d+)")
def buildGradleFileText = buildGradleFile.getText()
def matcherVersionCode = patternVersionCode.matcher(buildGradleFileText)
matcherVersionCode.find()
def mVersionCode = Integer.parseInt(matcherVersionCode.group(1))
def mNextVersionCode = mVersionCode + 1
def manifestContent = matcherVersionCode.replaceAll("versionCode " + mNextVersionCode)
println(":incrementVersionCode - current versionCode=" + mVersionCode);
println(":incrementVersionCode - next versionCode=" + mNextVersionCode);
buildGradleFile.write(manifestContent)
}

17
app-pro/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:/Users/Vlad/AppData/Local/Android/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -0,0 +1,32 @@
/*
* 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 com.maskyn.fileeditorpro;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}

View File

@ -0,0 +1,160 @@
<!--
~ 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/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.maskyn.fileeditorpro"
android:installLocation="auto">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/nome_app_turbo_editor"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:supportsRtl="true"
android:name="sharedcode.turboeditor.application.MyApp"
>
<!-- android:alwaysRetainTaskState="true" -->
<activity
android:name=".HomeActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:launchMode="singleTop"
android:windowSoftInputMode="stateUnspecified|adjustResize"
android:theme="@style/AppThemeEditorDark">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:host="*" />
<data android:pathPattern=".*\\.txt" />
<data android:pathPattern=".*\\.html" />
<data android:pathPattern=".*\\.xml" />
<data android:pathPattern=".*\\.css" />
<data android:pathPattern=".*\\.js" />
<data android:pathPattern=".*\\.md"/>
<data android:pathPattern=".*\\.markdown"/>
<data android:pathPattern=".*\\.php" />
<data android:pathPattern=".*\\.py" />
<data android:pathPattern=".*\\.script" />
<data android:pathPattern=".*\\.cs" />
<data android:pathPattern=".*\\.java" />
<data android:pathPattern=".*\\.rb" />
<data android:pathPattern=".*\\.aspx" />
<data android:pathPattern=".*\\.cshtml" />
<data android:pathPattern=".*\\.vbhtml" />
<data android:pathPattern=".*\\.go" />
<data android:pathPattern=".*\\.c" />
<data android:pathPattern=".*\\.h" />
<data android:pathPattern=".*\\.cc" />
<data android:pathPattern=".*\\.cpp" />
<data android:pathPattern=".*\\.hh" />
<data android:pathPattern=".*\\.hpp" />
<data android:pathPattern=".*\\.pl" />
<data android:pathPattern=".*\\.pm" />
<data android:pathPattern=".*\\.t" />
<data android:pathPattern=".*\\.pod" />
<data android:pathPattern=".*\\.m" />
<data android:pathPattern=".*\\.f" />
<data android:pathPattern=".*\\.for" />
<data android:pathPattern=".*\\.f90" />
<data android:pathPattern=".*\\.f95" />
<data android:pathPattern=".*\\.asp" />
<data android:pathPattern=".*\\.json" />
<data android:pathPattern=".*\\.wiki" />
<data android:pathPattern=".*\\.lua" />
<data android:pathPattern=".*\\.r" />
<data android:pathPattern=".*\\.key" />
<data android:pathPattern=".*\\.log" />
</intent-filter>
<intent-filter >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="text/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name="sharedcode.turboeditor.activity.SelectFileActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/open_a_file"
android:exported="true"
android:parentActivityName=".HomeActivity"
android:theme="@style/AppThemeBaseLight">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity" />
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
android:value="632.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
android:value="598.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
android:value="632.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
android:value="598.0dip" />
<activity android:name="sharedcode.turboeditor.activity.MarkdownActivity" />
</application>
</manifest>

View File

@ -1,32 +1,31 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.event;
public class FileSavedEvent {
private String filePath;
public FileSavedEvent(String filePath) {
this.filePath = filePath;
}
public String getFilePath() {
return filePath;
}
}
/*
* 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 com.maskyn.fileeditorpro;
import sharedcode.turboeditor.activity.MainActivity;
public class HomeActivity extends MainActivity {
@Override
public boolean showInterstitial() {
// nothing to do here
return false;
}
}

2
app/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build
manifest-merger-release-report.txt

95
app/build.gradle Normal file
View File

@ -0,0 +1,95 @@
/*
* 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/>.
*/
import java.util.regex.Pattern
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/repo' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/repo' }
}
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.maskyn.fileeditor"
minSdkVersion 11
targetSdkVersion 22
versionCode 47
versionName "1.19"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':libraries:sharedCode')
//compile 'com.google.android.gms:play-services-ads:6.5.+'
compile('com.crashlytics.sdk.android:crashlytics:2.+@aar') {
transitive = true;
}
}
task incrementVersionCode << {
println(":incrementVersionCode - Incrementing Version Code...")
def buildGradleFile = file("build.gradle")
def patternVersionCode = Pattern.compile("versionCode (\\d+)")
def buildGradleFileText = buildGradleFile.getText()
def matcherVersionCode = patternVersionCode.matcher(buildGradleFileText)
matcherVersionCode.find()
def mVersionCode = Integer.parseInt(matcherVersionCode.group(1))
def mNextVersionCode = mVersionCode + 1
def manifestContent = matcherVersionCode.replaceAll("versionCode " + mNextVersionCode)
println(":incrementVersionCode - current versionCode=" + mVersionCode);
println(":incrementVersionCode - next versionCode=" + mNextVersionCode);
buildGradleFile.write(manifestContent)
}

17
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Vlad\AppData\Local\Android\android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -1,33 +1,32 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.event;
public class FileSelectedEvent {
private String path;
public FileSelectedEvent(String path) {
this.path = path;
}
public String getPath() {
return path;
}
}
/*
* 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 com.maskyn.fileeditor;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}

View File

@ -0,0 +1,125 @@
<?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/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.maskyn.fileeditor"
android:installLocation="auto">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/nome_app_turbo_editor"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:supportsRtl="true"
android:name="sharedcode.turboeditor.application.MyApp"
>
<!-- android:alwaysRetainTaskState="true" -->
<!--<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>-->
<activity
android:name=".HomeActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:launchMode="singleTop"
android:windowSoftInputMode="stateUnspecified|adjustResize"
android:theme="@style/AppThemeEditorDark">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:host="*" />
<data android:pathPattern=".*\\.txt" />
<data android:pathPattern=".*\\.html" />
<data android:pathPattern=".*\\.css" />
<data android:pathPattern=".*\\.js" />
<data android:pathPattern=".*\\.md"/>
<data android:pathPattern=".*\\.php" />
<data android:pathPattern=".*\\.py" />
<data android:pathPattern=".*\\.org" />
</intent-filter>
<intent-filter >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name="sharedcode.turboeditor.activity.SelectFileActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/open_a_file"
android:parentActivityName=".HomeActivity"
android:theme="@style/AppThemeBaseLight">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity" />
</activity>
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
android:value="632.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
android:value="598.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
android:value="632.0dip" />
<meta-data
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
android:value="598.0dip" />
<activity android:name="sharedcode.turboeditor.activity.MarkdownActivity" />
<!--<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>-->
<meta-data android:name="com.crashlytics.ApiKey" android:value="672ab7531ce1e2e83c2ec6d84e8e94f2fa692c2a"/>
</application>
</manifest>

View File

@ -0,0 +1,45 @@
/*
* 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 com.maskyn.fileeditor;
import android.app.Activity;
/*import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;*/
public class AdsHelper {
//private InterstitialAd interstitial;
public AdsHelper(Activity activity) {
/*interstitial = new InterstitialAd(activity);
interstitial.setAdUnitId("ca-app-pub-5679083452234719/7178038180");
// Create ad request.
AdRequest adRequest = new AdRequest.Builder().build();
// Begin loading your interstitial.
interstitial.loadAd(adRequest);*/
}
public void displayInterstitial() {
//interstitial.show();
}
}

View File

@ -0,0 +1,56 @@
/*
* 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 com.maskyn.fileeditor;
import android.os.Bundle;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;
import sharedcode.turboeditor.activity.MainActivity;
public class HomeActivity extends MainActivity {
private AdsHelper adsHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(sharedcode.turboeditor.preferences.PreferenceHelper.getSendErrorReports(this))
Fabric.with(this, new Crashlytics());
// setup the ads
if(!sharedcode.turboeditor.util.ProCheckUtils.isPro(this))
adsHelper = new AdsHelper(this);
}
@Override
public boolean showInterstitial() {
if(adsHelper != null && !sharedcode.turboeditor.util.ProCheckUtils.isPro(this)) {
adsHelper.displayInterstitial();
return true;
}
else {
return false;
}
}
}

View File

@ -1 +1,38 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
/*
* 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/>.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}

37
gradle.properties Normal file
View File

@ -0,0 +1,37 @@
#
# 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/>.
#
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Thu Sep 26 13:46:28 CEST 2013
#Thu Dec 11 18:32:51 CET 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip

328
gradlew vendored
View File

@ -1,164 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

180
gradlew.bat vendored
View File

@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>FloatingActionButton</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6

View File

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

View File

@ -0,0 +1,32 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
minSdkVersion 7
targetSdkVersion 22
versionName "1.0"
versionCode 1
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.nineoldandroids:library:2.4.0'
}

View File

@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
android.library=true

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="FloatingActionButton">
<attr name="drawable" format="integer"/>
<attr name="colour" format="color"/>
<attr name="shadowRadius" format="float"/>
<attr name="shadowDx" format="float"/>
<attr name="shadowDy" format="float"/>
<attr name="shadowColor" format="integer"/>
</declare-styleable>
</resources>

View File

@ -0,0 +1,64 @@
/*
* 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;
private final FloatingActionButton mFloatingActionButton;
private int mPrevPosition;
private int mPrevTop;
private boolean mUpdated;
DirectionScrollListener(FloatingActionButton floatingActionButton) {
mFloatingActionButton = floatingActionButton;
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
final View topChild = view.getChildAt(0);
int firstViewTop = 0;
if (topChild != null) {
firstViewTop = topChild.getTop();
}
boolean goingDown;
boolean changed = true;
if (mPrevPosition == firstVisibleItem) {
final int topDelta = mPrevTop - firstViewTop;
goingDown = firstViewTop < mPrevTop;
changed = Math.abs(topDelta) > DIRECTION_CHANGE_THRESHOLD;
} else {
goingDown = firstVisibleItem > mPrevPosition;
}
if (changed && mUpdated) {
mFloatingActionButton.hide(goingDown);
}
mPrevPosition = firstVisibleItem;
mPrevTop = firstViewTop;
mUpdated = true;
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
}

View File

@ -0,0 +1,154 @@
package com.faizmalkani.floatingactionbutton;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
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.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.AbsListView;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.view.ViewHelper;
public class FloatingActionButton extends View {
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);
}
public FloatingActionButton(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
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_colour, Color.WHITE);
mButtonPaint.setStyle(Paint.Style.FILL);
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);
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);
mYHidden = size.y;
} else mYHidden = display.getHeight();
}
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) {
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
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);
}
}
@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 void hide(boolean hide) {
// If the hidden state is being updated
if (mHidden != hide) {
// Store the new hidden state
mHidden = hide;
// 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 void listenTo(AbsListView listView) {
if (null != listView) {
listView.setOnScrollListener(new DirectionScrollListener(this));
}
}
}

1
libraries/sharedCode/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -0,0 +1,74 @@
/*
* 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/>.
*/
apply plugin: 'com.android.library'
android {
lintOptions {
disable 'MissingTranslation', 'ExtraTranslation'
}
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:FloatingActionButton')
// compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
compile 'org.apache.commons:commons-lang3:+'
compile files('libs/juniversalchardet-1.0.3.jar')
compile('com.android.support:appcompat-v7:22.+') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.android.support:support-v4:22.+'
compile 'com.github.gabrielemariotti.changeloglib:library:+'
compile 'commons-io:commons-io:2.4'
compile 'com.android.support:support-annotations:+'
compile files('libs/markdownview-1.2.jar')
}

Binary file not shown.

Binary file not shown.

17
libraries/sharedCode/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:/Users/Vlad/AppData/Local/Android/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -1,32 +1,32 @@
/*
* Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
*/
package com.vmihalachi.turboeditor.event;
public class NewFileOpened {
private String filePath;
public NewFileOpened(String filePath) {
this.filePath = filePath;
}
public String getFilePath() {
return filePath;
}
}
/*
* 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;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}

View File

@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013 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 Turbo Editor. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<integer name="editor_max_file_size">4194304</integer>
</resources>
<?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/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sharedcode.turboeditor" >
</manifest>

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

@ -0,0 +1,112 @@
@charset "utf-8";
/**
* markdown.css
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This program 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 Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see http://gnu.org/licenses/lgpl.txt.
*
* @project Weblog and Open Source Projects of Florian Wolters
* @version GIT: $Id$
* @package xhtml-css
* @author Florian Wolters <florian.wolters.85@googlemail.com>
* @copyright 2012 Florian Wolters
* @cssdoc version 1.0-pre
* @license http://gnu.org/licenses/lgpl.txt GNU Lesser General Public License
* @link http://github.com/FlorianWolters/jekyll-bootstrap-theme
* @media all
* @valid true
*/
body {
font-family: Helvetica, Arial, Freesans, clean, sans-serif;
padding:1em;
margin:auto;
max-width:42em;
background:#fefefe;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}
h1 {
color: #000000;
font-size: 28px;
}
h2 {
border-bottom: 1px solid #CCCCCC;
color: #000000;
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777777;
background-color: inherit;
font-size: 14px;
}
hr {
height: 0.2em;
border: 0;
color: #CCCCCC;
background-color: #CCCCCC;
}
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0;
}
code, pre {
border-radius: 3px;
background-color: #F8F8F8;
color: inherit;
}
code {
border: 1px solid #EAEAEA;
margin: 0 2px;
padding: 0 5px;
}
pre {
border: 1px solid #CCCCCC;
line-height: 1.25em;
overflow: auto;
padding: 6px 10px;
}
pre > code {
border: 0;
margin: 0;
padding: 0;
}
a, a:visited {
color: #4183C4;
background-color: inherit;
text-decoration: none;
}

View File

@ -0,0 +1,119 @@
/*
* This file is part of the RootFW Project: https://github.com/spazedog/rootfw
*
* Copyright (c) 2015 Daniel Bergløv
*
* RootFW is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* RootFW 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 Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with RootFW. If not, see <http://www.gnu.org/licenses/>
*/
package com.spazedog.lib.rootfw4;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import android.os.Build;
import android.os.Process;
public class Common {
private static Boolean oEmulator = false;
public static final String TAG = Common.class.getPackage().getName();
public static Boolean DEBUG = true;
public static String[] BINARIES = new String[]{null, "busybox", "toolbox"};
public static Map<String, Integer> UIDS = new HashMap<String, Integer>();
public static Map<Integer, String> UNAMES = new HashMap<Integer, String>();
static {
UIDS.put("root", 0);
UIDS.put("system", 1000);
UIDS.put("radio", 1001);
UIDS.put("bluetooth", 1002);
UIDS.put("graphics", 1003);
UIDS.put("input", 1004);
UIDS.put("audio", 1005);
UIDS.put("camera", 1006);
UIDS.put("log", 1007);
UIDS.put("compass", 1008);
UIDS.put("mount", 1009);
UIDS.put("wifi", 1010);
UIDS.put("adb", 1011);
UIDS.put("install", 1012);
UIDS.put("media", 1013);
UIDS.put("dhcp", 1014);
UIDS.put("shell", 2000);
UIDS.put("cache", 2001);
UIDS.put("diag", 2002);
UIDS.put("net_bt_admin", 3001);
UIDS.put("net_bt", 3002);
UIDS.put("inet", 3003);
UIDS.put("net_raw", 3004);
UIDS.put("misc", 9998);
UIDS.put("nobody", 9999);
for (Entry<String, Integer> entry : UIDS.entrySet()) {
UNAMES.put(entry.getValue(), entry.getKey());
}
oEmulator = Build.BRAND.equalsIgnoreCase("generic") ||
Build.MODEL.contains("google_sdk") ||
Build.MODEL.contains("Emulator") ||
Build.MODEL.contains("Android SDK");
}
/**
* Check if the current device is an emulator
*/
public static Boolean isEmulator() {
return oEmulator;
}
public static Integer getUID(String name) {
if (name != null) {
if (name.matches("^[0-9]+$")) {
return Integer.parseInt(name);
}
if (UIDS.containsKey(name)) {
return UIDS.get(name);
} else if (name.startsWith("u")) {
Integer sep = name.indexOf("_");
if (sep > 0) {
Integer uid = Integer.parseInt( name.substring(1, sep) );
Integer gid = Integer.parseInt( name.substring(sep+2) );
return uid * 100000 + ((Process.FIRST_APPLICATION_UID + gid) % 100000);
}
}
}
return -10000;
}
public static String getUIDName(Integer id) {
if (UNAMES.containsKey(id)) {
return UNAMES.get(id);
} else if (id >= 10000) {
Integer uid = id / 100000;
Integer gid = id % Process.FIRST_APPLICATION_UID;
return "u" + uid + "_a" + gid + "";
}
return null;
}
}

Some files were not shown because too many files have changed in this diff Show More