mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
Android Studio 2.0; bump libs; gradle version
This commit is contained in:
parent
c8b2e0f0da
commit
88801f6961
12 changed files with 40 additions and 42 deletions
|
@ -10,7 +10,7 @@ android:
|
||||||
- platform-tools
|
- platform-tools
|
||||||
- tools
|
- tools
|
||||||
- android-23
|
- android-23
|
||||||
- build-tools-23.0.2
|
- build-tools-23.0.3
|
||||||
- extra-google-m2repository
|
- extra-google-m2repository
|
||||||
- extra-android-m2repository
|
- extra-android-m2repository
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.2"
|
buildToolsVersion "23.0.3"
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -23,8 +23,8 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
testCompile 'junit:junit:4.12'
|
testCompile 'junit:junit:4.12'
|
||||||
compile 'com.android.support:appcompat-v7:23.2.1'
|
compile 'com.android.support:appcompat-v7:23.3.0'
|
||||||
compile 'com.android.support:design:23.2.1'
|
compile 'com.android.support:design:23.3.0'
|
||||||
compile 'com.getbase:floatingactionbutton:1.9.1'
|
compile 'com.getbase:floatingactionbutton:1.9.1'
|
||||||
compile 'com.jakewharton:butterknife:7.0.1'
|
compile 'com.jakewharton:butterknife:7.0.1'
|
||||||
}
|
}
|
||||||
|
|
|
@ -972,8 +972,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.nav_settings_view:
|
case R.id.nav_settings_view: {
|
||||||
{
|
|
||||||
final CharSequence[] options = {getString(R.string.settings_font), getString(R.string.settings_view), appSettings.isLoadImages() ?
|
final CharSequence[] options = {getString(R.string.settings_font), getString(R.string.settings_view), appSettings.isLoadImages() ?
|
||||||
getString(R.string.settings_images_switch_off) : getString(R.string.settings_images_switch_on)};
|
getString(R.string.settings_images_switch_off) : getString(R.string.settings_images_switch_on)};
|
||||||
|
|
||||||
|
@ -983,11 +982,14 @@ public class MainActivity extends AppCompatActivity
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int item) {
|
public void onClick(DialogInterface dialog, int item) {
|
||||||
switch (item) {
|
switch (item) {
|
||||||
case 0: alertFormElements();
|
case 0:
|
||||||
|
alertFormElements();
|
||||||
break;
|
break;
|
||||||
case 1: webView.loadUrl("https://" + podDomain + "/mobile/toggle");
|
case 1:
|
||||||
|
webView.loadUrl("https://" + podDomain + "/mobile/toggle");
|
||||||
break;
|
break;
|
||||||
case 2: webSettings.setLoadsImagesAutomatically(!appSettings.isLoadImages());
|
case 2:
|
||||||
|
webSettings.setLoadsImagesAutomatically(!appSettings.isLoadImages());
|
||||||
appSettings.setLoadImages(!appSettings.isLoadImages());
|
appSettings.setLoadImages(!appSettings.isLoadImages());
|
||||||
webView.loadUrl(webView.getUrl());
|
webView.loadUrl(webView.getUrl());
|
||||||
break;
|
break;
|
||||||
|
@ -1107,8 +1109,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
case REQUEST_CODE_ASK_PERMISSIONS_SAVE_IMAGE:
|
case REQUEST_CODE_ASK_PERMISSIONS_SAVE_IMAGE:
|
||||||
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
Toast.makeText(this, R.string.permission_granted_try_again, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.permission_granted_try_again, Toast.LENGTH_SHORT).show();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
Toast.makeText(this, R.string.permission_denied, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.permission_denied, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -51,8 +51,8 @@ import java.util.Date;
|
||||||
|
|
||||||
public class ShareActivity extends MainActivity {
|
public class ShareActivity extends MainActivity {
|
||||||
|
|
||||||
private WebView webView;
|
|
||||||
private static final String TAG = "Diaspora Share";
|
private static final String TAG = "Diaspora Share";
|
||||||
|
private WebView webView;
|
||||||
private String podDomain;
|
private String podDomain;
|
||||||
private ValueCallback<Uri[]> mFilePathCallback;
|
private ValueCallback<Uri[]> mFilePathCallback;
|
||||||
private String mCameraPhotoPath;
|
private String mCameraPhotoPath;
|
||||||
|
|
|
@ -51,8 +51,8 @@ import java.util.Date;
|
||||||
|
|
||||||
public class ShareActivity2 extends MainActivity {
|
public class ShareActivity2 extends MainActivity {
|
||||||
|
|
||||||
private WebView webView;
|
|
||||||
private static final String TAG = "Diaspora Share";
|
private static final String TAG = "Diaspora Share";
|
||||||
|
private WebView webView;
|
||||||
private String podDomain;
|
private String podDomain;
|
||||||
private ValueCallback<Uri[]> mFilePathCallback;
|
private ValueCallback<Uri[]> mFilePathCallback;
|
||||||
private String mCameraPhotoPath;
|
private String mCameraPhotoPath;
|
||||||
|
|
|
@ -14,17 +14,10 @@ import java.util.List;
|
||||||
|
|
||||||
public class SoftKeyboardStateWatcher implements ViewTreeObserver.OnGlobalLayoutListener {
|
public class SoftKeyboardStateWatcher implements ViewTreeObserver.OnGlobalLayoutListener {
|
||||||
|
|
||||||
public interface SoftKeyboardStateListener {
|
|
||||||
void onSoftKeyboardOpened(int keyboardHeightInPx);
|
|
||||||
|
|
||||||
void onSoftKeyboardClosed();
|
|
||||||
}
|
|
||||||
|
|
||||||
private final List<SoftKeyboardStateListener> listeners = new LinkedList<>();
|
private final List<SoftKeyboardStateListener> listeners = new LinkedList<>();
|
||||||
private final View activityRootView;
|
private final View activityRootView;
|
||||||
private int lastSoftKeyboardHeightInPx;
|
private int lastSoftKeyboardHeightInPx;
|
||||||
private boolean isSoftKeyboardOpened;
|
private boolean isSoftKeyboardOpened;
|
||||||
|
|
||||||
public SoftKeyboardStateWatcher(View activityRootView) {
|
public SoftKeyboardStateWatcher(View activityRootView) {
|
||||||
this(activityRootView, false);
|
this(activityRootView, false);
|
||||||
}
|
}
|
||||||
|
@ -93,4 +86,10 @@ public class SoftKeyboardStateWatcher implements ViewTreeObserver.OnGlobalLayout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface SoftKeyboardStateListener {
|
||||||
|
void onSoftKeyboardOpened(int keyboardHeightInPx);
|
||||||
|
|
||||||
|
void onSoftKeyboardClosed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,8 +137,7 @@ public class ContextMenuWebView extends WebView {
|
||||||
menu.setHeaderTitle(result.getExtra());
|
menu.setHeaderTitle(result.getExtra());
|
||||||
menu.add(0, ID_SAVE_IMAGE, 0, context.getString(R.string.context_menu_save_image)).setOnMenuItemClickListener(handler);
|
menu.add(0, ID_SAVE_IMAGE, 0, context.getString(R.string.context_menu_save_image)).setOnMenuItemClickListener(handler);
|
||||||
menu.add(0, ID_EXTERNAL_BROWSER, 0, context.getString(R.string.context_menu_open_external_browser)).setOnMenuItemClickListener(handler);
|
menu.add(0, ID_EXTERNAL_BROWSER, 0, context.getString(R.string.context_menu_open_external_browser)).setOnMenuItemClickListener(handler);
|
||||||
}
|
} else if (result.getType() == HitTestResult.ANCHOR_TYPE ||
|
||||||
else if (result.getType() == HitTestResult.ANCHOR_TYPE ||
|
|
||||||
result.getType() == HitTestResult.SRC_ANCHOR_TYPE) {
|
result.getType() == HitTestResult.SRC_ANCHOR_TYPE) {
|
||||||
// Menu options for a hyperlink.
|
// Menu options for a hyperlink.
|
||||||
menu.setHeaderTitle(result.getExtra());
|
menu.setHeaderTitle(result.getExtra());
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/label_background" />
|
<solid android:color="@color/label_background" />
|
||||||
<padding
|
<padding
|
||||||
|
android:bottom="4dp"
|
||||||
android:left="16dp"
|
android:left="16dp"
|
||||||
android:top="4dp"
|
|
||||||
android:right="16dp"
|
android:right="16dp"
|
||||||
android:bottom="4dp"/>
|
android:top="4dp" />
|
||||||
<corners
|
<corners android:radius="2dp" />
|
||||||
android:radius="2dp"/>
|
|
||||||
</shape>
|
</shape>
|
|
@ -5,7 +5,7 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.0'
|
classpath 'com.android.tools.build:gradle:2.0.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Wed Oct 21 11:34:03 PDT 2015
|
#Mon Dec 28 10:00:20 PST 2015
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
|
||||||
|
|
Loading…
Reference in a new issue