1
0
Fork 0
mirror of https://github.com/rfc2822/GfxTablet synced 2025-10-03 09:39:16 +02:00

Change template image logic

This commit is contained in:
Ricki Hirner 2015-07-01 23:03:53 +02:00
parent fb20c3f5d2
commit f64df0412c
18 changed files with 188 additions and 89 deletions

View file

@ -19,5 +19,5 @@ android {
} }
dependencies { dependencies {
compile "com.android.support:appcompat-v7:21.0.+" compile "com.android.support:appcompat-v7:22.+"
} }

View file

@ -4,9 +4,7 @@
android:versionCode="4" android:versionCode="4"
android:versionName="1.3" > android:versionName="1.3" >
<uses-sdk <uses-sdk />
android:minSdkVersion="14"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@ -18,7 +16,8 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:label="@string/app_name" > android:label="@string/app_name"
android:largeHeap="true">
<activity <activity
android:name="at.bitfire.gfxtablet.CanvasActivity" android:name="at.bitfire.gfxtablet.CanvasActivity"
android:label="@string/app_name" android:label="@string/app_name"

View file

@ -9,21 +9,26 @@ import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.PopupMenu; import android.support.v7.widget.PopupMenu;
import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.Toast; import android.widget.Toast;
public class CanvasActivity extends ActionBarActivity implements View.OnSystemUiVisibilityChangeListener { public class CanvasActivity extends AppCompatActivity implements View.OnSystemUiVisibilityChangeListener, SharedPreferences.OnSharedPreferenceChangeListener {
private static int RESULT_LOAD_IMAGE = 1; private static final int RESULT_LOAD_IMAGE = 1;
private static final String TAG = "GfxTablet.Canvas";
final Uri homepageUri = Uri.parse(("https://rfc2822.github.io/GfxTablet/"));
NetworkClient netClient; NetworkClient netClient;
CanvasView canvas;
SharedPreferences preferences; SharedPreferences preferences;
boolean fullScreen = false; boolean fullScreen = false;
@ -34,18 +39,18 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
preferences = PreferenceManager.getDefaultSharedPreferences(this); preferences = PreferenceManager.getDefaultSharedPreferences(this);
preferences.registerOnSharedPreferenceChangeListener(this);
setContentView(R.layout.activity_canvas);
// create network client in a separate thread
netClient = new NetworkClient(PreferenceManager.getDefaultSharedPreferences(this)); netClient = new NetworkClient(PreferenceManager.getDefaultSharedPreferences(this));
new Thread(netClient).start(); new Thread(netClient).start();
canvas = new CanvasView(CanvasActivity.this, netClient);
}
@Override
protected void onStart() {
super.onStart();
new ConfigureNetworkingTask().execute(); new ConfigureNetworkingTask().execute();
// notify CanvasView of the network client
CanvasView canvas = (CanvasView)findViewById(R.id.canvas);
canvas.setNetworkClient(netClient);
} }
@Override @Override
@ -61,9 +66,9 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
} }
@Override @Override
protected void onStop() { protected void onDestroy() {
super.onDestroy();
netClient.getQueue().add(new NetEvent(NetEvent.Type.TYPE_DISCONNECT)); netClient.getQueue().add(new NetEvent(NetEvent.Type.TYPE_DISCONNECT));
super.onStop();
} }
@Override @Override
@ -81,7 +86,11 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
} }
public void showAbout(MenuItem item) { public void showAbout(MenuItem item) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(("https://rfc2822.github.io/GfxTablet/")))); startActivity(new Intent(Intent.ACTION_VIEW, homepageUri));
}
public void showDonate(MenuItem item) {
startActivity(new Intent(Intent.ACTION_VIEW, homepageUri.buildUpon().fragment("donate").build()));
} }
public void showSettings(MenuItem item) { public void showSettings(MenuItem item) {
@ -89,6 +98,21 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
} }
// preferences were changed
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
switch (key) {
case SettingsActivity.KEY_PREF_HOST:
Log.i(TAG, "Recipient host changed, reconfiguring network client");
new ConfigureNetworkingTask().execute();
break;
}
}
// full-screen methods
public void switchFullScreen(MenuItem item) { public void switchFullScreen(MenuItem item) {
final View decorView = getWindow().getDecorView(); final View decorView = getWindow().getDecorView();
int uiFlags = decorView.getSystemUiVisibility(); int uiFlags = decorView.getSystemUiVisibility();
@ -97,7 +121,7 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
uiFlags ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; uiFlags ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
if (Build.VERSION.SDK_INT >= 16) if (Build.VERSION.SDK_INT >= 16)
uiFlags ^= View.SYSTEM_UI_FLAG_FULLSCREEN; uiFlags ^= View.SYSTEM_UI_FLAG_FULLSCREEN;
if (Build.VERSION.SDK_INT >= 18) if (Build.VERSION.SDK_INT >= 19)
uiFlags ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; uiFlags ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setOnSystemUiVisibilityChangeListener(this); decorView.setOnSystemUiVisibilityChangeListener(this);
@ -106,16 +130,21 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
@Override @Override
public void onSystemUiVisibilityChange(int visibility) { public void onSystemUiVisibilityChange(int visibility) {
Log.i("GfxTablet", "System UI changed " + visibility);
fullScreen = (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0;
// show/hide action bar according to full-screen mode // show/hide action bar according to full-screen mode
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0) { if (fullScreen) {
CanvasActivity.this.getSupportActionBar().hide(); CanvasActivity.this.getSupportActionBar().hide();
fullScreen = true;
Toast.makeText(CanvasActivity.this, "Press Back button to leave full-screen mode.", Toast.LENGTH_LONG).show(); Toast.makeText(CanvasActivity.this, "Press Back button to leave full-screen mode.", Toast.LENGTH_LONG).show();
} else } else
CanvasActivity.this.getSupportActionBar().show(); CanvasActivity.this.getSupportActionBar().show();
} }
// template image logic
private String getTemplateImagePath() { private String getTemplateImagePath() {
return preferences.getString(SettingsActivity.KEY_TEMPLATE_IMAGE, null); return preferences.getString(SettingsActivity.KEY_TEMPLATE_IMAGE, null);
} }
@ -143,6 +172,7 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && data != null) { if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && data != null) {
Uri selectedImage = data.getData(); Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA }; String[] filePathColumn = { MediaStore.Images.Media.DATA };
@ -159,32 +189,41 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
} finally { } finally {
cursor.close(); cursor.close();
} }
} else }
super.onActivityResult(requestCode, resultCode, data);
} }
public void showTemplateImage() { public void showTemplateImage() {
ImageView template = (ImageView)findViewById(R.id.canvas_template);
template.setImageDrawable(null);
if (template.getVisibility() == View.VISIBLE) {
String picturePath = preferences.getString(SettingsActivity.KEY_TEMPLATE_IMAGE, null); String picturePath = preferences.getString(SettingsActivity.KEY_TEMPLATE_IMAGE, null);
if (picturePath != null) { if (picturePath != null)
Drawable drawable = BitmapDrawable.createFromPath(picturePath); try {
getWindow().setBackgroundDrawable(drawable); // TODO load bitmap efficiently, for intended view size and display resolution
} else // https://developer.android.com/training/displaying-bitmaps/load-bitmap.html
getWindow().setBackgroundDrawableResource(android.R.drawable.screen_background_light); final Drawable drawable = new BitmapDrawable(getResources(), picturePath);
template.setImageDrawable(drawable);
} catch (Exception e) {
Toast.makeText(this, e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
}
}
} }
private class ConfigureNetworkingTask extends AsyncTask<Void, Void, Boolean> { private class ConfigureNetworkingTask extends AsyncTask<Void, Void, Boolean> {
@Override @Override
protected Boolean doInBackground(Void... params) { protected Boolean doInBackground(Void... params) {
return netClient.configureNetworking(); return netClient.reconfigureNetworking();
} }
protected void onPostExecute(Boolean success) { protected void onPostExecute(Boolean success) {
if (success) { if (success)
setContentView(canvas);
Toast.makeText(CanvasActivity.this, "Touch events will be sent to " + netClient.destAddress.getHostAddress() + ":" + NetworkClient.GFXTABLET_PORT, Toast.LENGTH_LONG).show(); Toast.makeText(CanvasActivity.this, "Touch events will be sent to " + netClient.destAddress.getHostAddress() + ":" + NetworkClient.GFXTABLET_PORT, Toast.LENGTH_LONG).show();
} else
setContentView(R.layout.activity_no_host); findViewById(R.id.canvas_template).setVisibility(success ? View.VISIBLE : View.GONE);
findViewById(R.id.canvas).setVisibility(success ? View.VISIBLE : View.GONE);
findViewById(R.id.canvas_message).setVisibility(success ? View.GONE : View.VISIBLE);
} }
} }

View file

@ -5,6 +5,7 @@ import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.graphics.Color; import android.graphics.Color;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;
import android.view.MotionEvent; import android.view.MotionEvent;
@ -13,32 +14,63 @@ import android.view.View;
import at.bitfire.gfxtablet.NetEvent.Type; import at.bitfire.gfxtablet.NetEvent.Type;
@SuppressLint("ViewConstructor") @SuppressLint("ViewConstructor")
public class CanvasView extends View { public class CanvasView extends View implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = "GfxTablet.CanvasView"; private static final String TAG = "GfxTablet.CanvasView";
final SharedPreferences settings; final SharedPreferences settings;
final NetworkClient netClient; NetworkClient netClient;
boolean acceptStylusOnly; boolean acceptStylusOnly;
int maxX, maxY; int maxX, maxY;
public CanvasView(Context context, NetworkClient networkClient) {
super(context);
this.netClient = networkClient;
// process preferences // setup
public CanvasView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
// view is disabled until a network client is set
setEnabled(false);
settings = PreferenceManager.getDefaultSharedPreferences(context); settings = PreferenceManager.getDefaultSharedPreferences(context);
acceptStylusOnly = settings.getBoolean(SettingsActivity.KEY_PREF_STYLUS_ONLY, false); settings.registerOnSharedPreferenceChangeListener(this);
setBackground();
setInputMethods();
} }
@Override public void setNetworkClient(NetworkClient networkClient) {
protected void onAttachedToWindow() { netClient = networkClient;
super.onAttachedToWindow(); setEnabled(true);
}
// settings
protected void setBackground() {
if (settings.getBoolean(SettingsActivity.KEY_DARK_CANVAS, false)) if (settings.getBoolean(SettingsActivity.KEY_DARK_CANVAS, false))
setBackgroundColor(Color.BLACK); setBackgroundColor(Color.BLACK);
else else
setBackgroundResource(R.drawable.bg_grid_pattern); setBackgroundResource(R.drawable.bg_grid_pattern);
} }
protected void setInputMethods() {
acceptStylusOnly = settings.getBoolean(SettingsActivity.KEY_PREF_STYLUS_ONLY, false);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
switch (key) {
case SettingsActivity.KEY_PREF_STYLUS_ONLY:
setInputMethods();
break;
case SettingsActivity.KEY_DARK_CANVAS:
setBackground();
break;
}
}
// drawing
@Override @Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) { protected void onSizeChanged(int w, int h, int oldw, int oldh) {
Log.i(TAG, "Canvas size changed: " + w + "x" + h + " (before: " + oldw + "x" + oldh + ")"); Log.i(TAG, "Canvas size changed: " + w + "x" + h + " (before: " + oldw + "x" + oldh + ")");
@ -65,7 +97,7 @@ public class CanvasView extends View {
} }
@Override @Override
public boolean onTouchEvent(MotionEvent event) { public boolean onTouchEvent(@NonNull MotionEvent event) {
if (isEnabled()) { if (isEnabled()) {
for (int ptr = 0; ptr < event.getPointerCount(); ptr++) for (int ptr = 0; ptr < event.getPointerCount(); ptr++)
if (!acceptStylusOnly || (event.getToolType(ptr) == MotionEvent.TOOL_TYPE_STYLUS)) { if (!acceptStylusOnly || (event.getToolType(ptr) == MotionEvent.TOOL_TYPE_STYLUS)) {
@ -104,4 +136,5 @@ public class CanvasView extends View {
short normalizePressure(float x) { short normalizePressure(float x) {
return (short)(Math.min(Math.max(0, x), 2.0) * Short.MAX_VALUE/2.0); return (short)(Math.min(Math.max(0, x), 2.0) * Short.MAX_VALUE/2.0);
} }
} }

View file

@ -13,19 +13,19 @@ import at.bitfire.gfxtablet.NetEvent.Type;
public class NetworkClient implements Runnable { public class NetworkClient implements Runnable {
static int GFXTABLET_PORT = 40118; static final int GFXTABLET_PORT = 40118;
LinkedBlockingQueue<NetEvent> motionQueue = new LinkedBlockingQueue<>(); final LinkedBlockingQueue<NetEvent> motionQueue = new LinkedBlockingQueue<>();
LinkedBlockingQueue<NetEvent> getQueue() { return motionQueue; } LinkedBlockingQueue<NetEvent> getQueue() { return motionQueue; }
InetAddress destAddress; InetAddress destAddress;
SharedPreferences preferences; final SharedPreferences preferences;
NetworkClient(SharedPreferences preferences) { NetworkClient(SharedPreferences preferences) {
this.preferences = preferences; this.preferences = preferences;
} }
boolean configureNetworking() { boolean reconfigureNetworking() {
try { try {
String hostName = preferences.getString(SettingsActivity.KEY_PREF_HOST, "unknown.invalid"); String hostName = preferences.getString(SettingsActivity.KEY_PREF_HOST, "unknown.invalid");
destAddress = InetAddress.getByName(hostName); destAddress = InetAddress.getByName(hostName);

View file

@ -1,10 +1,10 @@
package at.bitfire.gfxtablet; package at.bitfire.gfxtablet;
import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
public class SettingsActivity extends ActionBarActivity { public class SettingsActivity extends AppCompatActivity {
public static final String public static final String
KEY_PREF_HOST = "host_preference", KEY_PREF_HOST = "host_preference",
KEY_PREF_STYLUS_ONLY = "stylus_only_preference", KEY_PREF_STYLUS_ONLY = "stylus_only_preference",

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 558 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 947 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/canvas_template"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"/>
<view
android:id="@+id/canvas"
class="at.bitfire.gfxtablet.CanvasView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/canvas_message"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center"
android:text="@string/no_host_defined"
android:textAppearance="?android:attr/textAppearanceLarge"/>
</FrameLayout>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/no_host_defined" />
</LinearLayout>

View file

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <merge xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"> android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment <fragment
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:name="at.bitfire.gfxtablet.SettingsFragment"
android:id="@+id/fragment" android:id="@+id/fragment"
android:layout_gravity="center_horizontal|top" /> android:name="at.bitfire.gfxtablet.SettingsFragment"
</FrameLayout> android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|top"
tools:layout="@layout/activity_settings"/>
</merge>

View file

@ -1,4 +1,4 @@
<menu xmlns:tools="http://schemas.android.com/tools" <menu
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
@ -6,15 +6,15 @@
android:id="@+id/menu_set_template_image" android:id="@+id/menu_set_template_image"
android:icon="@drawable/ic_action_picture" android:icon="@drawable/ic_action_picture"
android:onClick="setTemplateImage" android:onClick="setTemplateImage"
app:showAsAction="always" app:showAsAction="ifRoom"
android:title="Set template image"/> android:title="@string/menu_set_template_image"/>
<item <item
android:id="@+id/menu_fullscreen" android:id="@+id/menu_fullscreen"
android:icon="@drawable/ic_arrow_expand_white_48dp" android:icon="@drawable/ic_arrow_expand_white_48dp"
android:onClick="switchFullScreen" android:onClick="switchFullScreen"
app:showAsAction="always" app:showAsAction="ifRoom"
android:title="Fullscreen"/> android:title="@string/fullscreen"/>
<item <item
android:icon="@drawable/ic_settings_white_48dp" android:icon="@drawable/ic_settings_white_48dp"
@ -27,4 +27,9 @@
app:showAsAction="never" app:showAsAction="never"
android:title="@string/menu_about"/> android:title="@string/menu_about"/>
<item
android:onClick="showDonate"
app:showAsAction="never"
android:title="@string/menu_donate"/>
</menu> </menu>

View file

@ -4,11 +4,11 @@
<item <item
android:id="@+id/menu_clear_template_image" android:id="@+id/menu_clear_template_image"
android:onClick="clearTemplateImage" android:onClick="clearTemplateImage"
android:title="Clear template image"/> android:title="@string/menu_clear_template_image"/>
<item <item
android:id="@+id/menu_select_template_image" android:id="@+id/menu_select_template_image"
android:onClick="selectTemplateImage" android:onClick="selectTemplateImage"
android:title="Select another image"/> android:title="@string/menu_select_another_template_image"/>
</menu> </menu>

View file

@ -4,6 +4,12 @@
<string name="app_name">GfxTablet</string> <string name="app_name">GfxTablet</string>
<string name="menu_settings">Settings</string> <string name="menu_settings">Settings</string>
<string name="menu_about">About / Help</string> <string name="menu_about">About / Help</string>
<string name="menu_donate">Donate</string>
<string name="fullscreen">Full-screen mode</string>
<string name="menu_set_template_image">Set template image</string>
<string name="menu_clear_template_image">Clear template image</string>
<string name="menu_select_another_template_image">Select another image</string>
<string name="no_host_defined">No valid recipient host defined. Please configure in \"Settings / Recipient host\".</string> <string name="no_host_defined">No valid recipient host defined. Please configure in \"Settings / Recipient host\".</string>
@ -13,8 +19,8 @@
<string name="preferences_stylus_only_on">Only stylus input will be processed</string> <string name="preferences_stylus_only_on">Only stylus input will be processed</string>
<string name="preferences_stylus_only_off">Finger and stylus input will be processed</string> <string name="preferences_stylus_only_off">Finger and stylus input will be processed</string>
<string name="preferences_dark_canvas">Use dark canvas</string> <string name="preferences_dark_canvas">Use dark canvas</string>
<string name="preferences_dark_canvas_on">Black canvas will be used</string> <string name="preferences_dark_canvas_on">Black canvas will be used (covers template image)</string>
<string name="preferences_dark_canvas_off">White canvas will be used</string> <string name="preferences_dark_canvas_off">White/transparent gridded canvas will be used</string>
<string name="preferences_keep_display_active">Keep display active</string> <string name="preferences_keep_display_active">Keep display active</string>
<string name="preferences_keep_display_active_on">Display won\'t turn off while GfxTablet is active</string> <string name="preferences_keep_display_active_on">Display won\'t turn off while GfxTablet is active</string>
<string name="preferences_keep_display_active_off">Display will turn off according to system settings</string> <string name="preferences_keep_display_active_off">Display will turn off according to system settings</string>

View file

@ -1,7 +1,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Network preferences"> <PreferenceCategory android:title="Network preferences">
<EditTextPreference <EditTextPreference
android:defaultValue="0.0.0.0" android:defaultValue="host.example.com"
android:key="host_preference" android:key="host_preference"
android:singleLine="true" android:singleLine="true"
android:inputType="textUri" android:inputType="textUri"

View file

@ -4,7 +4,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.1.0' classpath 'com.android.tools.build:gradle:1.2.3'
} }
} }
allprojects { allprojects {