mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 22:25:44 +03:00
make quota bar rounded on the edges and remove containers background to remove the overpainting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
bdcfbbb377
commit
74ba90943e
4 changed files with 20 additions and 16 deletions
|
@ -355,7 +355,7 @@ dependencies {
|
|||
gplayImplementation "com.google.firebase:firebase-messaging:23.0.7"
|
||||
|
||||
// TODO change back to tag before merging
|
||||
implementation 'com.github.nextcloud.android-common:ui:f3624c87c5'
|
||||
implementation 'com.github.nextcloud.android-common:ui:fd9e4da593'
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
|
|
@ -66,6 +66,7 @@ import com.bumptech.glide.request.animation.GlideAnimation;
|
|||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.di.Injectable;
|
||||
import com.nextcloud.client.network.ClientFactory;
|
||||
|
@ -187,7 +188,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
/**
|
||||
* progress bar of the quota view.
|
||||
*/
|
||||
private ProgressBar mQuotaProgressBar;
|
||||
private LinearProgressIndicator mQuotaProgressBar;
|
||||
|
||||
/**
|
||||
* text view of the quota view.
|
||||
|
@ -289,10 +290,10 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
*/
|
||||
private void setupQuotaElement() {
|
||||
mQuotaView = (LinearLayout) findQuotaViewById(R.id.drawer_quota);
|
||||
mQuotaProgressBar = (ProgressBar) findQuotaViewById(R.id.drawer_quota_ProgressBar);
|
||||
mQuotaProgressBar = (LinearProgressIndicator) findQuotaViewById(R.id.drawer_quota_ProgressBar);
|
||||
mQuotaTextPercentage = (TextView) findQuotaViewById(R.id.drawer_quota_percentage);
|
||||
mQuotaTextLink = (TextView) findQuotaViewById(R.id.drawer_quota_link);
|
||||
viewThemeUtils.platform.themeHorizontalProgressBar(mQuotaProgressBar);
|
||||
viewThemeUtils.material.colorProgressBar(mQuotaProgressBar);
|
||||
}
|
||||
|
||||
public void updateHeader() {
|
||||
|
@ -695,9 +696,9 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
mQuotaProgressBar.setProgress(relative);
|
||||
|
||||
if (relative < RELATIVE_THRESHOLD_WARNING) {
|
||||
viewThemeUtils.platform.themeHorizontalProgressBar(mQuotaProgressBar);
|
||||
viewThemeUtils.material.colorProgressBar(mQuotaProgressBar);
|
||||
} else {
|
||||
viewThemeUtils.platform.themeHorizontalProgressBar(mQuotaProgressBar,
|
||||
viewThemeUtils.material.colorProgressBar(mQuotaProgressBar,
|
||||
getResources().getColor(R.color.infolevel_warning));
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
|
@ -38,14 +39,14 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/appbar"
|
||||
android:clickable="false"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/standard_padding"
|
||||
android:paddingLeft="@dimen/drawer_content_horizontal_padding"
|
||||
android:paddingTop="@dimen/standard_half_padding"
|
||||
android:paddingRight="@dimen/standard_padding"
|
||||
android:paddingBottom="@dimen/standard_half_padding"
|
||||
android:visibility="gone">
|
||||
android:paddingRight="@dimen/drawer_content_horizontal_padding"
|
||||
android:paddingBottom="@dimen/standard_padding"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drawer_quota_link"
|
||||
|
@ -53,15 +54,16 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/alternate_half_padding" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/drawer_quota_ProgressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="false"
|
||||
android:indeterminateOnly="false"
|
||||
android:scaleY="1.4"
|
||||
android:text="@string/drawer_quota" />
|
||||
android:text="@string/drawer_quota"
|
||||
app:trackCornerRadius="5dp"
|
||||
app:trackThickness="5dp"
|
||||
tools:progress="50" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/drawer_quota_percentage"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<dimen name="file_icon_rounded_corner_radius_for_grid_mode">3dp</dimen>
|
||||
<dimen name="file_avatar_size">128dp</dimen>
|
||||
<integer name="file_avatar_px">512</integer>
|
||||
<dimen name="drawer_content_horizontal_padding">28dp</dimen>
|
||||
<dimen name="standard_padding">16dp</dimen>
|
||||
<dimen name="standard_double_padding">32dp</dimen>
|
||||
<dimen name="standard_half_padding">8dp</dimen>
|
||||
|
|
Loading…
Reference in a new issue