1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-21 20:02:07 +01:00

Android Studio 2.0; bump libs; gradle version

This commit is contained in:
Gregor Santner 2016-04-09 13:53:06 +02:00
parent c8b2e0f0da
commit 88801f6961
12 changed files with 40 additions and 42 deletions

View file

@ -10,7 +10,7 @@ android:
- platform-tools
- tools
- android-23
- build-tools-23.0.2
- build-tools-23.0.3
- extra-google-m2repository
- extra-android-m2repository

View file

@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
@ -23,8 +23,8 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.getbase:floatingactionbutton:1.9.1'
compile 'com.jakewharton:butterknife:7.0.1'
}

View file

@ -972,8 +972,7 @@ public class MainActivity extends AppCompatActivity
}
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() ?
getString(R.string.settings_images_switch_off) : getString(R.string.settings_images_switch_on)};
@ -983,11 +982,14 @@ public class MainActivity extends AppCompatActivity
@Override
public void onClick(DialogInterface dialog, int item) {
switch (item) {
case 0: alertFormElements();
case 0:
alertFormElements();
break;
case 1: webView.loadUrl("https://" + podDomain + "/mobile/toggle");
case 1:
webView.loadUrl("https://" + podDomain + "/mobile/toggle");
break;
case 2: webSettings.setLoadsImagesAutomatically(!appSettings.isLoadImages());
case 2:
webSettings.setLoadsImagesAutomatically(!appSettings.isLoadImages());
appSettings.setLoadImages(!appSettings.isLoadImages());
webView.loadUrl(webView.getUrl());
break;
@ -1107,8 +1109,7 @@ public class MainActivity extends AppCompatActivity
case REQUEST_CODE_ASK_PERMISSIONS_SAVE_IMAGE:
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
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();
}
return;

View file

@ -51,8 +51,8 @@ import java.util.Date;
public class ShareActivity extends MainActivity {
private WebView webView;
private static final String TAG = "Diaspora Share";
private WebView webView;
private String podDomain;
private ValueCallback<Uri[]> mFilePathCallback;
private String mCameraPhotoPath;

View file

@ -51,8 +51,8 @@ import java.util.Date;
public class ShareActivity2 extends MainActivity {
private WebView webView;
private static final String TAG = "Diaspora Share";
private WebView webView;
private String podDomain;
private ValueCallback<Uri[]> mFilePathCallback;
private String mCameraPhotoPath;

View file

@ -14,17 +14,10 @@ import java.util.List;
public class SoftKeyboardStateWatcher implements ViewTreeObserver.OnGlobalLayoutListener {
public interface SoftKeyboardStateListener {
void onSoftKeyboardOpened(int keyboardHeightInPx);
void onSoftKeyboardClosed();
}
private final List<SoftKeyboardStateListener> listeners = new LinkedList<>();
private final View activityRootView;
private int lastSoftKeyboardHeightInPx;
private boolean isSoftKeyboardOpened;
public SoftKeyboardStateWatcher(View activityRootView) {
this(activityRootView, false);
}
@ -93,4 +86,10 @@ public class SoftKeyboardStateWatcher implements ViewTreeObserver.OnGlobalLayout
}
}
}
public interface SoftKeyboardStateListener {
void onSoftKeyboardOpened(int keyboardHeightInPx);
void onSoftKeyboardClosed();
}
}

View file

@ -137,8 +137,7 @@ public class ContextMenuWebView extends WebView {
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_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) {
// Menu options for a hyperlink.
menu.setHeaderTitle(result.getExtra());

View file

@ -2,10 +2,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/label_background" />
<padding
android:bottom="4dp"
android:left="16dp"
android:top="4dp"
android:right="16dp"
android:bottom="4dp"/>
<corners
android:radius="2dp"/>
android:top="4dp" />
<corners android:radius="2dp" />
</shape>

View file

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
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
// in the individual module build.gradle files

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Wed Oct 21 11:34:03 PDT 2015
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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