Use framework progress bar

pull/996/head
Alex Baker 6 years ago
parent b8d649656a
commit 669c8d7dd1

@ -163,7 +163,6 @@ dependencies {
implementation("me.saket:better-link-movement-method:2.2.0") implementation("me.saket:better-link-movement-method:2.2.0")
implementation("com.squareup.okhttp3:okhttp:${Versions.okhttp}") implementation("com.squareup.okhttp3:okhttp:${Versions.okhttp}")
implementation("com.google.code.gson:gson:2.8.6") implementation("com.google.code.gson:gson:2.8.6")
implementation("com.github.rey5137:material:1.3.0")
implementation("com.google.android.material:material:1.1.0") implementation("com.google.android.material:material:1.1.0")
implementation("androidx.annotation:annotation:1.1.0") implementation("androidx.annotation:annotation:1.1.0")
implementation("androidx.constraintlayout:constraintlayout:2.0.0-beta4") implementation("androidx.constraintlayout:constraintlayout:2.0.0-beta4")

@ -141,12 +141,6 @@
license: The Apache Software License, Version 2.0 license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: com.github.rey5137:material:+
name: Material Library
copyrightHolder: Rey Pham
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://github.com/rey5137/material
- artifact: commons-codec:commons-codec:+ - artifact: commons-codec:commons-codec:+
name: Apache Commons Codec name: Apache Commons Codec
copyrightHolder: The Apache Software Foundation copyrightHolder: The Apache Software Foundation

2
app/proguard.pro vendored

@ -2,8 +2,6 @@
-keep class org.tasks.** { *; } -keep class org.tasks.** { *; }
-dontwarn com.rey.material.**
# remove logging statements # remove logging statements
-assumenosideeffects class timber.log.Timber* { -assumenosideeffects class timber.log.Timber* {
public static *** v(...); public static *** v(...);

@ -384,22 +384,6 @@
"version": "2.2.0" "version": "2.2.0"
} }
}, },
{
"notice": null,
"copyrightHolder": "Rey Pham",
"copyrightStatement": "Copyright © Rey Pham. All rights reserved.",
"license": "The Apache Software License, Version 2.0",
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt",
"normalizedLicense": "apache2",
"year": null,
"url": "https://github.com/rey5137/material",
"libraryName": "Material Library",
"artifactId": {
"name": "material",
"group": "com.github.rey5137",
"version": "1.3.0"
}
},
{ {
"notice": null, "notice": null,
"copyrightHolder": "The Apache Software Foundation", "copyrightHolder": "The Apache Software Foundation",

@ -7,12 +7,12 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.ProgressBar;
import android.widget.Toast; import android.widget.Toast;
import androidx.lifecycle.ViewModelProviders; import androidx.lifecycle.ViewModelProviders;
import butterknife.BindView; import butterknife.BindView;
import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputEditText;
import com.google.api.services.tasks.model.TaskList; import com.google.api.services.tasks.model.TaskList;
import com.rey.material.widget.ProgressView;
import com.todoroo.astrid.activity.MainActivity; import com.todoroo.astrid.activity.MainActivity;
import com.todoroo.astrid.activity.TaskListFragment; import com.todoroo.astrid.activity.TaskListFragment;
import com.todoroo.astrid.api.GtasksFilter; import com.todoroo.astrid.api.GtasksFilter;
@ -42,7 +42,7 @@ public class GoogleTaskListSettingsActivity extends BaseListSettingsActivity {
TextInputEditText name; TextInputEditText name;
@BindView(R.id.progress_bar) @BindView(R.id.progress_bar)
ProgressView progressView; ProgressBar progressView;
private boolean isNewList; private boolean isNewList;
private GoogleTaskList gtasksList; private GoogleTaskList gtasksList;

@ -8,6 +8,7 @@ import android.os.Bundle;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ProgressBar;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import at.bitfire.dav4jvm.exception.HttpException; import at.bitfire.dav4jvm.exception.HttpException;
import butterknife.BindView; import butterknife.BindView;
@ -15,7 +16,6 @@ import butterknife.OnTextChanged;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout; import com.google.android.material.textfield.TextInputLayout;
import com.rey.material.widget.ProgressView;
import com.todoroo.astrid.activity.MainActivity; import com.todoroo.astrid.activity.MainActivity;
import com.todoroo.astrid.activity.TaskListFragment; import com.todoroo.astrid.activity.TaskListFragment;
import com.todoroo.astrid.api.CaldavFilter; import com.todoroo.astrid.api.CaldavFilter;
@ -48,7 +48,7 @@ public abstract class BaseCaldavCalendarSettingsActivity extends BaseListSetting
TextInputLayout nameLayout; TextInputLayout nameLayout;
@BindView(R.id.progress_bar) @BindView(R.id.progress_bar)
ProgressView progressView; ProgressBar progressView;
private CaldavCalendar caldavCalendar; private CaldavCalendar caldavCalendar;
private CaldavAccount caldavAccount; private CaldavAccount caldavAccount;

@ -1,11 +1,15 @@
<com.rey.material.widget.ProgressView <ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" style="?android:attr/progressBarStyleHorizontal"
xmlns:app="http://schemas.android.com/apk/res-auto" android:indeterminateOnly="true"
android:indeterminate="true"
android:indeterminateTintMode="src_atop"
android:indeterminateTint="?attr/colorSecondary"
android:id="@+id/progress_bar" android:id="@+id/progress_bar"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="4dp" android:paddingTop="0dp"
android:visibility="gone" android:paddingBottom="0dp"
app:pv_autostart="true" android:layout_gravity="top"
app:pv_circular="false" android:layout_marginTop="-7dp"
app:pv_progressMode="indeterminate" android:layout_marginBottom="-7dp"
app:pv_progressStyle="@style/ProgressViewStyle"/> android:layout_height="wrap_content"
android:visibility="gone" />

@ -152,11 +152,6 @@
<item name="cardPreventCornerOverlap">false</item> <item name="cardPreventCornerOverlap">false</item>
</style> </style>
<style name="ProgressViewStyle" parent="Material.Drawable.LinearProgress">
<item name="lpd_strokeColor">?attr/colorAccent</item>
<item name="lpd_strokeSecondaryColor">@android:color/transparent</item>
</style>
<style name="ChipStyle" parent="Base.Widget.MaterialComponents.Chip"> <style name="ChipStyle" parent="Base.Widget.MaterialComponents.Chip">
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item> <item name="android:layout_width">wrap_content</item>

Loading…
Cancel
Save