diff --git a/app/app-release.apk b/app/app-release.apk index 65a865d..4149b24 100644 Binary files a/app/app-release.apk and b/app/app-release.apk differ diff --git a/app/build.gradle b/app/build.gradle index 4204251..6cae1ff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,9 +16,9 @@ android { buildToolsVersion "21.1.2" defaultConfig { applicationId "ua.samosfator.moduleok" - minSdkVersion 14 + minSdkVersion 10 targetSdkVersion 21 - versionCode 1 + versionCode 2 versionName "0.5.0" signingConfig signingConfigs.config } diff --git a/app/manifest-merger-release-report.txt b/app/manifest-merger-release-report.txt index fa7e19e..63906f5 100644 --- a/app/manifest-merger-release-report.txt +++ b/app/manifest-merger-release-report.txt @@ -27,6 +27,8 @@ MERGED from com.android.support:appcompat-v7:21.0.3:16:5 MERGED from com.android.support:support-v4:21.0.3:16:5 MERGED from com.android.support:recyclerview-v7:21.0.3:17:5 MERGED from com.android.support:support-v4:21.0.3:16:5 +MERGED from com.google.android.gms:play-services-base:6.5.87:20:5 +MERGED from com.android.support:support-v4:21.0.3:16:5 MERGED from com.android.support:appcompat-v7:21.0.3:16:5 MERGED from com.android.support:support-v4:21.0.3:16:5 MERGED from com.balysv:material-ripple:1.0.0:12:5 @@ -63,28 +65,37 @@ action#android.net.conn.CONNECTIVITY_CHANGE ADDED from AndroidManifest.xml:21:17 android:name ADDED from AndroidManifest.xml:21:25 -activity#ua.samosfator.moduleok.MainActivity +meta-data#com.google.android.gms.version ADDED from AndroidManifest.xml:25:9 +MERGED from com.google.android.gms:play-services-base:6.5.87:21:9 + android:value + ADDED from AndroidManifest.xml:26:20 + android:name + ADDED from AndroidManifest.xml:25:20 +activity#ua.samosfator.moduleok.MainActivity +ADDED from AndroidManifest.xml:28:9 android:label - ADDED from AndroidManifest.xml:27:13 + ADDED from AndroidManifest.xml:30:13 android:name - ADDED from AndroidManifest.xml:26:13 + ADDED from AndroidManifest.xml:29:13 intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER -ADDED from AndroidManifest.xml:28:13 +ADDED from AndroidManifest.xml:31:13 action#android.intent.action.MAIN -ADDED from AndroidManifest.xml:29:17 +ADDED from AndroidManifest.xml:32:17 android:name - ADDED from AndroidManifest.xml:29:25 + ADDED from AndroidManifest.xml:32:25 category#android.intent.category.LAUNCHER -ADDED from AndroidManifest.xml:31:17 +ADDED from AndroidManifest.xml:34:17 android:name - ADDED from AndroidManifest.xml:31:27 + ADDED from AndroidManifest.xml:34:27 uses-sdk INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested MERGED from com.android.support:appcompat-v7:21.0.3:15:5 MERGED from com.android.support:support-v4:21.0.3:15:5 MERGED from com.android.support:recyclerview-v7:21.0.3:15:5 MERGED from com.android.support:support-v4:21.0.3:15:5 +MERGED from com.google.android.gms:play-services-base:6.5.87:18:5 +MERGED from com.android.support:support-v4:21.0.3:15:5 MERGED from com.rengwuxian.materialedittext:library:1.7.1:6:5 MERGED from com.android.support:appcompat-v7:21.0.3:15:5 MERGED from com.android.support:support-v4:21.0.3:15:5 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5360e15..5471d50 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,10 +1,13 @@ + + serviceClass) { } return false; } + + public static boolean is_4_0_OrLater() { + return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH; + } } \ No newline at end of file diff --git a/app/src/main/java/ua/samosfator/moduleok/fragment/LoginFragment.java b/app/src/main/java/ua/samosfator/moduleok/fragment/LoginFragment.java index 7f425b7..53862b1 100644 --- a/app/src/main/java/ua/samosfator/moduleok/fragment/LoginFragment.java +++ b/app/src/main/java/ua/samosfator/moduleok/fragment/LoginFragment.java @@ -9,6 +9,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.EditorInfo; +import android.widget.Button; import com.dd.CircularProgressButton; import com.rengwuxian.materialedittext.MaterialEditText; @@ -24,7 +25,7 @@ import ua.samosfator.moduleok.event.LoginEvent; public class LoginFragment extends Fragment { - private CircularProgressButton login_button; + private Button login_button; private MaterialEditText login_txt; private MaterialEditText password_txt; @@ -109,7 +110,11 @@ private void doLogin(final String login, final String password) { private void initViews() { login_txt = (MaterialEditText) rootView.findViewById(R.id.login_editText); password_txt = (MaterialEditText) rootView.findViewById(R.id.password_editText); - login_button = (CircularProgressButton) rootView.findViewById(R.id.btnWithText); + if (App.is_4_0_OrLater()) { + login_button = (CircularProgressButton) rootView.findViewById(R.id.btnWithText); + } else { + login_button = (Button) rootView.findViewById(R.id.btnWithText); + } } public LoginFragment restoreView() { @@ -135,8 +140,12 @@ private void enableInputs(final boolean bool) { new Handler(Looper.getMainLooper()).post(() -> { login_txt.setEnabled(bool); password_txt.setEnabled(bool); - login_button.setIndeterminateProgressMode(!bool); - login_button.setProgress(bool ? 0 : 50); + if (App.is_4_0_OrLater()) { + ((CircularProgressButton) login_button).setIndeterminateProgressMode(!bool); + ((CircularProgressButton) login_button).setProgress(bool ? 0 : 50); + } else { + login_button.setEnabled(bool); + } }); } } diff --git a/app/src/main/java/ua/samosfator/moduleok/fragment/navigation_drawer_fragment/NavigationDrawerToggle.java b/app/src/main/java/ua/samosfator/moduleok/fragment/navigation_drawer_fragment/NavigationDrawerToggle.java index 3f91bcb..3eddffd 100644 --- a/app/src/main/java/ua/samosfator/moduleok/fragment/navigation_drawer_fragment/NavigationDrawerToggle.java +++ b/app/src/main/java/ua/samosfator/moduleok/fragment/navigation_drawer_fragment/NavigationDrawerToggle.java @@ -1,12 +1,15 @@ package ua.samosfator.moduleok.fragment.navigation_drawer_fragment; +import android.annotation.TargetApi; import android.app.Activity; +import android.os.Build; import android.support.v4.app.FragmentActivity; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget.Toolbar; import android.view.View; +import ua.samosfator.moduleok.App; import ua.samosfator.moduleok.Preferences; public class NavigationDrawerToggle extends ActionBarDrawerToggle { @@ -22,19 +25,25 @@ public NavigationDrawerToggle(Activity activity, DrawerLayout drawerLayout, Tool drawerLayout.post(this::syncState); } + @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public void onDrawerOpened(View drawerView) { super.onDrawerOpened(drawerView); if (!mUserSawDrawer) { saveUserSawDrawerState(); } - activity.invalidateOptionsMenu(); + if (App.is_4_0_OrLater()) { + activity.invalidateOptionsMenu(); + } } + @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public void onDrawerClosed(View drawerView) { super.onDrawerClosed(drawerView); - activity.invalidateOptionsMenu(); + if (App.is_4_0_OrLater()) { + activity.invalidateOptionsMenu(); + } } private void saveUserSawDrawerState() { diff --git a/app/src/main/res/layout-v10/fragment_login.xml b/app/src/main/res/layout-v10/fragment_login.xml new file mode 100644 index 0000000..338cfee --- /dev/null +++ b/app/src/main/res/layout-v10/fragment_login.xml @@ -0,0 +1,74 @@ + + + + + + + + +