Change template image logic
|
@ -19,5 +19,5 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.android.support:appcompat-v7:21.0.+"
|
||||
compile "com.android.support:appcompat-v7:22.+"
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
android:versionCode="4"
|
||||
android:versionName="1.3" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="22" />
|
||||
<uses-sdk />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
@ -18,7 +16,8 @@
|
|||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:theme="@style/AppTheme"
|
||||
android:label="@string/app_name" >
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true">
|
||||
<activity
|
||||
android:name="at.bitfire.gfxtablet.CanvasActivity"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -9,21 +9,26 @@ import android.net.Uri;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class CanvasActivity extends ActionBarActivity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static int RESULT_LOAD_IMAGE = 1;
|
||||
public class CanvasActivity extends AppCompatActivity implements View.OnSystemUiVisibilityChangeListener, SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
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;
|
||||
CanvasView canvas;
|
||||
|
||||
SharedPreferences preferences;
|
||||
boolean fullScreen = false;
|
||||
|
@ -34,18 +39,18 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
super.onCreate(savedInstanceState);
|
||||
|
||||
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));
|
||||
new Thread(netClient).start();
|
||||
|
||||
canvas = new CanvasView(CanvasActivity.this, netClient);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
new ConfigureNetworkingTask().execute();
|
||||
|
||||
// notify CanvasView of the network client
|
||||
CanvasView canvas = (CanvasView)findViewById(R.id.canvas);
|
||||
canvas.setNetworkClient(netClient);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,9 +66,9 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
netClient.getQueue().add(new NetEvent(NetEvent.Type.TYPE_DISCONNECT));
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,7 +86,11 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
}
|
||||
|
||||
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) {
|
||||
|
@ -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) {
|
||||
final View decorView = getWindow().getDecorView();
|
||||
int uiFlags = decorView.getSystemUiVisibility();
|
||||
|
@ -97,7 +121,7 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
uiFlags ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
||||
if (Build.VERSION.SDK_INT >= 16)
|
||||
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;
|
||||
|
||||
decorView.setOnSystemUiVisibilityChangeListener(this);
|
||||
|
@ -106,16 +130,21 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
|
||||
@Override
|
||||
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
|
||||
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0) {
|
||||
if (fullScreen) {
|
||||
CanvasActivity.this.getSupportActionBar().hide();
|
||||
fullScreen = true;
|
||||
Toast.makeText(CanvasActivity.this, "Press Back button to leave full-screen mode.", Toast.LENGTH_LONG).show();
|
||||
} else
|
||||
CanvasActivity.this.getSupportActionBar().show();
|
||||
}
|
||||
|
||||
|
||||
// template image logic
|
||||
|
||||
private String getTemplateImagePath() {
|
||||
return preferences.getString(SettingsActivity.KEY_TEMPLATE_IMAGE, null);
|
||||
}
|
||||
|
@ -143,6 +172,7 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && data != null) {
|
||||
Uri selectedImage = data.getData();
|
||||
String[] filePathColumn = { MediaStore.Images.Media.DATA };
|
||||
|
@ -159,32 +189,41 @@ public class CanvasActivity extends ActionBarActivity implements View.OnSystemUi
|
|||
} finally {
|
||||
cursor.close();
|
||||
}
|
||||
} else
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
if (picturePath != null) {
|
||||
Drawable drawable = BitmapDrawable.createFromPath(picturePath);
|
||||
getWindow().setBackgroundDrawable(drawable);
|
||||
} else
|
||||
getWindow().setBackgroundDrawableResource(android.R.drawable.screen_background_light);
|
||||
if (picturePath != null)
|
||||
try {
|
||||
// TODO load bitmap efficiently, for intended view size and display resolution
|
||||
// https://developer.android.com/training/displaying-bitmaps/load-bitmap.html
|
||||
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> {
|
||||
@Override
|
||||
protected Boolean doInBackground(Void... params) {
|
||||
return netClient.configureNetworking();
|
||||
return netClient.reconfigureNetworking();
|
||||
}
|
||||
|
||||
protected void onPostExecute(Boolean success) {
|
||||
if (success) {
|
||||
setContentView(canvas);
|
||||
if (success)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
@ -13,32 +14,63 @@ import android.view.View;
|
|||
import at.bitfire.gfxtablet.NetEvent.Type;
|
||||
|
||||
@SuppressLint("ViewConstructor")
|
||||
public class CanvasView extends View {
|
||||
public class CanvasView extends View implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private static final String TAG = "GfxTablet.CanvasView";
|
||||
|
||||
final SharedPreferences settings;
|
||||
final NetworkClient netClient;
|
||||
NetworkClient netClient;
|
||||
boolean acceptStylusOnly;
|
||||
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);
|
||||
acceptStylusOnly = settings.getBoolean(SettingsActivity.KEY_PREF_STYLUS_ONLY, false);
|
||||
settings.registerOnSharedPreferenceChangeListener(this);
|
||||
setBackground();
|
||||
setInputMethods();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
public void setNetworkClient(NetworkClient networkClient) {
|
||||
netClient = networkClient;
|
||||
setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
// settings
|
||||
|
||||
protected void setBackground() {
|
||||
if (settings.getBoolean(SettingsActivity.KEY_DARK_CANVAS, false))
|
||||
setBackgroundColor(Color.BLACK);
|
||||
else
|
||||
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
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
Log.i(TAG, "Canvas size changed: " + w + "x" + h + " (before: " + oldw + "x" + oldh + ")");
|
||||
|
@ -65,7 +97,7 @@ public class CanvasView extends View {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
public boolean onTouchEvent(@NonNull MotionEvent event) {
|
||||
if (isEnabled()) {
|
||||
for (int ptr = 0; ptr < event.getPointerCount(); ptr++)
|
||||
if (!acceptStylusOnly || (event.getToolType(ptr) == MotionEvent.TOOL_TYPE_STYLUS)) {
|
||||
|
@ -104,4 +136,5 @@ public class CanvasView extends View {
|
|||
short normalizePressure(float x) {
|
||||
return (short)(Math.min(Math.max(0, x), 2.0) * Short.MAX_VALUE/2.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,19 +13,19 @@ import at.bitfire.gfxtablet.NetEvent.Type;
|
|||
|
||||
|
||||
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; }
|
||||
|
||||
InetAddress destAddress;
|
||||
SharedPreferences preferences;
|
||||
final SharedPreferences preferences;
|
||||
|
||||
NetworkClient(SharedPreferences preferences) {
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
boolean configureNetworking() {
|
||||
boolean reconfigureNetworking() {
|
||||
try {
|
||||
String hostName = preferences.getString(SettingsActivity.KEY_PREF_HOST, "unknown.invalid");
|
||||
destAddress = InetAddress.getByName(hostName);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package at.bitfire.gfxtablet;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
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
|
||||
KEY_PREF_HOST = "host_preference",
|
||||
KEY_PREF_STYLUS_ONLY = "stylus_only_preference",
|
||||
|
|
BIN
app-android/app/src/main/res/drawable-hdpi/ic_action_picture.png
Normal file
After Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 558 B |
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 947 B |
Before Width: | Height: | Size: 929 B After Width: | Height: | Size: 1.3 KiB |
29
app-android/app/src/main/res/layout/activity_canvas.xml
Normal 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>
|
|
@ -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>
|
|
@ -1,12 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<fragment
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:name="at.bitfire.gfxtablet.SettingsFragment"
|
||||
android:id="@+id/fragment"
|
||||
android:layout_gravity="center_horizontal|top" />
|
||||
</FrameLayout>
|
||||
android:name="at.bitfire.gfxtablet.SettingsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal|top"
|
||||
tools:layout="@layout/activity_settings"/>
|
||||
</merge>
|
|
@ -1,4 +1,4 @@
|
|||
<menu xmlns:tools="http://schemas.android.com/tools"
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
@ -6,15 +6,15 @@
|
|||
android:id="@+id/menu_set_template_image"
|
||||
android:icon="@drawable/ic_action_picture"
|
||||
android:onClick="setTemplateImage"
|
||||
app:showAsAction="always"
|
||||
android:title="Set template image"/>
|
||||
app:showAsAction="ifRoom"
|
||||
android:title="@string/menu_set_template_image"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_fullscreen"
|
||||
android:icon="@drawable/ic_arrow_expand_white_48dp"
|
||||
android:onClick="switchFullScreen"
|
||||
app:showAsAction="always"
|
||||
android:title="Fullscreen"/>
|
||||
app:showAsAction="ifRoom"
|
||||
android:title="@string/fullscreen"/>
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_settings_white_48dp"
|
||||
|
@ -27,4 +27,9 @@
|
|||
app:showAsAction="never"
|
||||
android:title="@string/menu_about"/>
|
||||
|
||||
<item
|
||||
android:onClick="showDonate"
|
||||
app:showAsAction="never"
|
||||
android:title="@string/menu_donate"/>
|
||||
|
||||
</menu>
|
|
@ -4,11 +4,11 @@
|
|||
<item
|
||||
android:id="@+id/menu_clear_template_image"
|
||||
android:onClick="clearTemplateImage"
|
||||
android:title="Clear template image"/>
|
||||
android:title="@string/menu_clear_template_image"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_select_template_image"
|
||||
android:onClick="selectTemplateImage"
|
||||
android:title="Select another image"/>
|
||||
android:title="@string/menu_select_another_template_image"/>
|
||||
|
||||
</menu>
|
|
@ -4,6 +4,12 @@
|
|||
<string name="app_name">GfxTablet</string>
|
||||
<string name="menu_settings">Settings</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>
|
||||
|
||||
|
@ -13,8 +19,8 @@
|
|||
<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_dark_canvas">Use dark canvas</string>
|
||||
<string name="preferences_dark_canvas_on">Black canvas will be used</string>
|
||||
<string name="preferences_dark_canvas_off">White 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/transparent gridded canvas will be used</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_off">Display will turn off according to system settings</string>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="Network preferences">
|
||||
<EditTextPreference
|
||||
android:defaultValue="0.0.0.0"
|
||||
android:defaultValue="host.example.com"
|
||||
android:key="host_preference"
|
||||
android:singleLine="true"
|
||||
android:inputType="textUri"
|
||||
|
|
|
@ -4,7 +4,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.1.0'
|
||||
classpath 'com.android.tools.build:gradle:1.2.3'
|
||||
}
|
||||
}
|
||||
allprojects {
|
||||
|
|