Switched from Android Studio to Intellij
1
Turbo Editor/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
@@ -1,29 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 18
|
||||
buildToolsVersion "18.0.1"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 18
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':Strings')
|
||||
compile 'com.android.support:appcompat-v7:18.0.0'
|
||||
compile group: 'commons-io', name: 'commons-io', version: '2.0.1'
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.vmihalachi.turboeditor"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="18" />
|
||||
|
||||
<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">
|
||||
<activity
|
||||
android:name="com.vmihalachi.turboeditor.MainActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize"
|
||||
android:hardwareAccelerated="false"
|
||||
android:uiOptions="splitActionBarWhenNarrow"
|
||||
android:theme="@style/FileEditorTheme">
|
||||
|
||||
<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>
|
||||
</application>
|
||||
|
||||
</manifest>
|
Before Width: | Height: | Size: 66 KiB |
@@ -1,107 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
* 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.vmihalachi.turboeditor;
|
||||
|
||||
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.example.strings.R;
|
||||
|
||||
// ...
|
||||
public class EditTextDialog extends DialogFragment implements TextView.OnEditorActionListener {
|
||||
|
||||
private EditText mEditText;
|
||||
|
||||
public static EditTextDialog newInstance(final String hint) {
|
||||
final EditTextDialog f = new EditTextDialog();
|
||||
|
||||
// Supply num input as an argument.
|
||||
final Bundle args = new Bundle();
|
||||
args.putString("hint", hint);
|
||||
f.setArguments(args);
|
||||
return f;
|
||||
}
|
||||
|
||||
@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.edittext_dialog, container);
|
||||
this.mEditText = (EditText) view.findViewById(R.id.editText);
|
||||
|
||||
// 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(R.id.ok_button);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
@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(),
|
||||
(Actions) getArguments().getSerializable("action"), getArguments().getString("hint"));
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
@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 enum Actions {
|
||||
NewRemoteFolder, NewRemoteFile, NewLocalFolder, Rename, Move, EditEncoding
|
||||
}
|
||||
|
||||
public interface EditDialogListener {
|
||||
void onFinishEditDialog(String inputText, Actions action, String hint);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,67 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
* 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.vmihalachi.turboeditor;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* User: Vlad Date: 29/07/13 Time: 14.33
|
||||
*/
|
||||
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])*?\\*/|//.*");
|
||||
}
|
@@ -1,59 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
* 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.vmihalachi.turboeditor.helper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
/**
|
||||
* User: Vlad Date: 30/04/13 Time: 18.49
|
||||
*/
|
||||
public final class PixelDipConverter {
|
||||
|
||||
private PixelDipConverter() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method convets dp unit to equivalent device specific value in pixels.
|
||||
*
|
||||
* @param dp A value in dp(Device independent pixels) unit. Which we need to convert into pixels
|
||||
* @param context Context to get resources and device specific display metrics
|
||||
* @return A float value to represent Pixels equivalent to dp according to device
|
||||
*/
|
||||
public static float convertDpToPixel(final float dp, final Context context) {
|
||||
final Resources resources = context.getResources();
|
||||
final DisplayMetrics metrics = resources.getDisplayMetrics();
|
||||
final float px = dp * metrics.densityDpi / 160f;
|
||||
return px;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method converts device specific pixels to device independent pixels.
|
||||
*
|
||||
* @param px A value in px (pixels) unit. Which we need to convert into db
|
||||
* @param context Context to get resources and device specific display metrics
|
||||
* @return A float value to represent db equivalent to px value
|
||||
*/
|
||||
public static float convertPixelsToDp(final float px, final Context context) {
|
||||
final Resources resources = context.getResources();
|
||||
final DisplayMetrics metrics = resources.getDisplayMetrics();
|
||||
final float dp = px / (metrics.densityDpi / 160f);
|
||||
return dp;
|
||||
}
|
||||
}
|
@@ -1,69 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
* 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.vmihalachi.turboeditor.helper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
/**
|
||||
* User: Vlad Date: 21/07/13 Time: 14.09
|
||||
*/
|
||||
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");
|
||||
}
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
* 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.vmihalachi.turboeditor.helper;
|
||||
|
||||
/**
|
||||
* User: Vlad Date: 06/06/13 Time: 20.39
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
static final Pattern NO_html_tags = Pattern.compile(
|
||||
"\\b(a|address|article|aside|audio|b|big|body|blink|canvas|cite|div|em|fieldset|figcaption|figure|footer|frame|"
|
||||
+ "frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|img|keygen|label|link|mark|marquee|menu|meta|meter|"
|
||||
+ "nav|noframes|output|p|popcorn|progress|rp|rt|ruby|script|section|small|source|span|strike|strong|"
|
||||
+ "subtitle|svg|time|title|u|video)\\b");
|
||||
static final Pattern NO_html_attributes = Pattern.compile(
|
||||
"\\b(accept|accept-charset|accesskey|action|align|alt|async|autocomplete|autofocus|autoplay|bgcolor|border|"
|
||||
+ "buffered|challenge|charset|checked|cite|class|code|codebase|color|cols|colspan|content|contenteditable|"
|
||||
+ "contextmenu|controls|coords|data|data-custom|datetime|default|defer|dir|dirname|disabled|download|draggable|"
|
||||
+ "dropzone|enctype|for|form|headers|height|hidden|high|href|hreflang|http-equiv|icon|id|ismap|itemprop|"
|
||||
+ "keytype|kind|label|lang|language|list|loop|low|manifest|max|maxlenght|media|method|min|multiple|name|"
|
||||
+ "novalidate|open|optimum|pattern|ping|placeholder|poster|preload|pubdate|radiogrup|readonly|rel|required|"
|
||||
+ "reverser|rown|rowspan|sandbox|spellcheck|scope|scoped|seamless|selected|shape|size|sizes|span|src|srcdoc|"
|
||||
+ "srclang|start|step|style|summary|tabindex|target|title|type|usemap|value|width|wrap)\\b");
|
Before Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 485 B |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 14 KiB |
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 The CyanogenMod 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.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:exitFadeDuration="@android:integer/config_shortAnimTime">
|
||||
|
||||
<item
|
||||
android:drawable="@color/holo_blue_light"
|
||||
android:state_pressed="true"/>
|
||||
<item
|
||||
android:drawable="@color/holo_blue_light"
|
||||
android:state_enabled="true"
|
||||
android:state_focused="true"/>
|
||||
<item
|
||||
android:drawable="@android:color/transparent"/>
|
||||
|
||||
</selector>
|
@@ -1,49 +0,0 @@
|
||||
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
~ 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.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
||||
|
||||
<!-- no word wrap layout -->
|
||||
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/editor_background_light"
|
||||
android:fillViewport="true">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:fillViewport="true">
|
||||
|
||||
<view
|
||||
android:id="@id/editor"
|
||||
class="com.vmihalachi.turboeditor.MainActivity$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"
|
||||
android:maxLength="@integer/editor_max_file_size"
|
||||
android:paddingLeft="25dp"
|
||||
android:singleLine="false"
|
||||
android:text="@null"
|
||||
android:textColor="@color/editor_textcolor_light"
|
||||
android:textSize="16sp" />
|
||||
</ScrollView>
|
||||
</HorizontalScrollView>
|
||||
|
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
~ 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.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/edit_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionDone"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
<View
|
||||
android:background="?android:attr/listDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"/>
|
||||
|
||||
<Button
|
||||
android:background="@drawable/holo_selector"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:id="@+id/ok_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:maxLines="1"
|
||||
android:text="@android:string/ok"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
</LinearLayout>
|
@@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
~ 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.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<item
|
||||
android:id="@+id/im_save"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:icon="@drawable/ic_action_tick"
|
||||
android:title="@string/salva"/>
|
||||
<item
|
||||
android:id="@+id/im_undo"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:icon="@drawable/ic_action_undo"
|
||||
android:title="@string/testo_indietro"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/im_redo"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:icon="@drawable/ic_action_redo"
|
||||
android:title="@string/testo_rifai"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/more"
|
||||
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_editor_wrap"
|
||||
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>
|
@@ -1,24 +0,0 @@
|
||||
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Copyright (c) 2012, 2013 Vlad Mihalachi
|
||||
~ 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.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
||||
<resources>
|
||||
|
||||
<color name="ab_bg">#111111</color>
|
||||
<color name="editor_background_light">#fff7f7f9</color>
|
||||
<color name="editor_textcolor_light">#ff333333</color>
|
||||
<!-- A light Holo shade of blue -->
|
||||
<color name="holo_blue_light">#ff33b5e5</color>
|
||||
</resources>
|
@@ -1,5 +0,0 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item type="id" name="undo"/>
|
||||
<item type="id" name="redo"/>
|
||||
<item type="id" name="editor"/>
|
||||
</resources>
|
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="editor_max_file_size">4194304</integer>
|
||||
</resources>
|
@@ -1,47 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<style name="FileEditorTheme"
|
||||
parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<!--<item name="android:windowBackground">@color/Nero</item>-->
|
||||
<item name="android:windowBackground">@null
|
||||
</item>
|
||||
<item name="android:actionBarStyle">
|
||||
@style/ActionBar.Solid.Premium
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<!--<item name="background">@drawable/ab_solid_premium</item>
|
||||
<item name="android:background">@drawable/ab_solid_premium</item>-->
|
||||
<style name="ActionBar.Solid.Premium"
|
||||
parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
|
||||
<item name="android:background">@color/ab_bg
|
||||
</item>
|
||||
<item name="android:backgroundStacked">
|
||||
@color/ab_bg
|
||||
</item>
|
||||
<item name="android:backgroundSplit">
|
||||
@color/ab_bg
|
||||
</item>
|
||||
<item name="android:titleTextStyle">
|
||||
@style/Premium.ActionBar.Title.Inverse
|
||||
</item>
|
||||
<item name="android:subtitleTextStyle">
|
||||
@style/Premium.ActionBar.Subtitle
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="Premium.ActionBar.Title.Inverse"
|
||||
parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
|
||||
<item name="android:textColor">
|
||||
@android:color/primary_text_dark
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="Premium.ActionBar.Subtitle"
|
||||
parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle">
|
||||
<item name="android:textColor">
|
||||
@android:color/primary_text_dark
|
||||
</item>
|
||||
</style>
|
||||
|
||||
</resources>
|