diff --git a/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorDeterminateDemoFragment.java b/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorDeterminateDemoFragment.java
deleted file mode 100644
index 7fb00a6719a..00000000000
--- a/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorDeterminateDemoFragment.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.material.catalog.progressindicator;
-
-import io.material.catalog.R;
-
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import com.google.android.material.progressindicator.CircularProgressIndicator;
-import com.google.android.material.progressindicator.LinearProgressIndicator;
-import com.google.android.material.slider.Slider;
-import io.material.catalog.feature.DemoFragment;
-import io.material.catalog.feature.DemoUtils;
-import java.util.List;
-
-/**
- * This is the fragment to dome in details of different determinate progress indicators.
- *
- *
This demo includes multiple examples of determinate {@link LinearProgressIndicator} and {@link
- * CircularProgressIndicator} and the ability to:
- *
- *
- *
Update the indicator with a specified progress.
- *
Hide the indicator
- *
Show the indicator
- *
- */
-public class ProgressIndicatorDeterminateDemoFragment extends DemoFragment {
-
- @Override
- @NonNull
- public View onCreateDemoView(
- @NonNull LayoutInflater layoutInflater,
- @Nullable ViewGroup viewGroup,
- @Nullable Bundle bundle) {
- View view =
- layoutInflater.inflate(
- R.layout.cat_progress_indicator_determinate_fragment,
- viewGroup,
- false /* attachToRoot */);
-
- initialize(view);
-
- return view;
- }
-
- public void initialize(@NonNull View view) {
- List linearProgressIndicatorList =
- DemoUtils.findViewsWithType(view, LinearProgressIndicator.class);
- List circularProgressIndicatorList =
- DemoUtils.findViewsWithType(view, CircularProgressIndicator.class);
-
- Slider slider = view.findViewById(R.id.slider);
- Button showButton = view.findViewById(R.id.show_button);
- Button hideButton = view.findViewById(R.id.hide_button);
-
- slider.addOnChangeListener(
- (sliderObj, value, fromUser) -> {
- for (LinearProgressIndicator indicator : linearProgressIndicatorList) {
- indicator.setProgressCompat((int) value, true);
- }
- for (CircularProgressIndicator indicator : circularProgressIndicatorList) {
- indicator.setProgressCompat((int) value, true);
- }
- });
- showButton.setOnClickListener(
- v -> {
- for (LinearProgressIndicator indicator : linearProgressIndicatorList) {
- indicator.show();
- }
- for (CircularProgressIndicator indicator : circularProgressIndicatorList) {
- indicator.show();
- }
- });
- hideButton.setOnClickListener(
- v -> {
- for (LinearProgressIndicator indicator : linearProgressIndicatorList) {
- indicator.hide();
- }
- for (CircularProgressIndicator indicator : circularProgressIndicatorList) {
- indicator.hide();
- }
- });
- }
-}
diff --git a/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorFragment.java b/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorFragment.java
index 069154353da..f280620d37b 100644
--- a/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorFragment.java
+++ b/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorFragment.java
@@ -65,6 +65,13 @@ public Fragment createFragment() {
return new ProgressIndicatorVisibilityDemoFragment();
}
});
+ additionalDemos.add(
+ new Demo(R.string.cat_progress_indicator_demo_standalone_title) {
+ @Override
+ public Fragment createFragment() {
+ return new ProgressIndicatorStandaloneDemoFragment();
+ }
+ });
return additionalDemos;
}
@@ -80,29 +87,9 @@ public Fragment createFragment() {
return new ProgressIndicatorMultiColorDemoFragment();
}
});
- additionalDemos.add(
- new Demo(R.string.cat_progress_indicator_demo_indeterminate_title) {
- @Override
- public Fragment createFragment() {
- return new ProgressIndicatorIndeterminateDemoFragment();
- }
- });
- additionalDemos.add(
- new Demo(R.string.cat_progress_indicator_demo_determinate_title) {
- @Override
- public Fragment createFragment() {
- return new ProgressIndicatorDeterminateDemoFragment();
- }
- });
- additionalDemos.add(
- new Demo(R.string.cat_progress_indicator_demo_standalone_title) {
- @Override
- public Fragment createFragment() {
- return new ProgressIndicatorStandaloneDemoFragment();
- }
- });
return additionalDemos;
}
+
/** The Dagger module for {@link ProgressIndicatorFragment} dependencies. */
@dagger.Module
public abstract static class Module {
diff --git a/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorIndeterminateDemoFragment.java b/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorIndeterminateDemoFragment.java
deleted file mode 100644
index 4553d811905..00000000000
--- a/catalog/java/io/material/catalog/progressindicator/ProgressIndicatorIndeterminateDemoFragment.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.material.catalog.progressindicator;
-
-import io.material.catalog.R;
-
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.EditText;
-import androidx.annotation.LayoutRes;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import com.google.android.material.progressindicator.CircularProgressIndicator;
-import com.google.android.material.progressindicator.LinearProgressIndicator;
-import io.material.catalog.feature.DemoFragment;
-import io.material.catalog.feature.DemoUtils;
-import java.util.List;
-
-/**
- * This is the fragment to demo in details of different indeterminate progress indicators.
- *
- *
This demo includes multiple examples of indeterminate {@link LinearProgressIndicator} and
- * {@link CircularProgressIndicator} and the ability to:
- *
- *
- *
Update the indicator with a specified progress (which will change the mode to be
- * determinate).
- *
Hide the indicator
- *
Show the indicator (this will reset the indicator to indeterminate mode)
- *
- */
-public class ProgressIndicatorIndeterminateDemoFragment extends DemoFragment {
-
- @Override
- @NonNull
- public View onCreateDemoView(
- @NonNull LayoutInflater layoutInflater,
- @Nullable ViewGroup viewGroup,
- @Nullable Bundle bundle) {
- View view =
- layoutInflater.inflate(
- R.layout.cat_progress_indicator_indeterminate_fragment,
- viewGroup,
- false /* attachToRoot */);
-
- ViewGroup content = view.findViewById(R.id.content);
- content.addView(layoutInflater.inflate(getIndicatorsContent(), content, false), 0);
-
- initialize(view);
-
- return view;
- }
-
- /** Layout resource containing the progress indicator examples. */
- @LayoutRes
- protected int getIndicatorsContent() {
- return R.layout.cat_progress_indicator_indeterminate_indicators;
- }
-
- /**
- * Updates the linear progress indicator to show the specified progress. This is called every time
- * the "update" button is pressed.
- */
- protected void updateLinearProgressIndicator(
- @NonNull LinearProgressIndicator linearProgressIndicator, int progress) {
- linearProgressIndicator.setProgressCompat(progress, /*animated=*/ true);
- }
-
- /**
- * Updates the circular progress indicator to show the specified progress. This is called every
- * time the "update" button is pressed.
- */
- protected void updateCircularProgressIndicator(
- @NonNull CircularProgressIndicator circularProgressIndicator, int progress) {
- circularProgressIndicator.setProgressCompat(progress, /*animated=*/ true);
- }
-
- private void initialize(View view) {
- List linearProgressIndicatorList =
- DemoUtils.findViewsWithType(view, LinearProgressIndicator.class);
- List circularProgressIndicatorList =
- DemoUtils.findViewsWithType(view, CircularProgressIndicator.class);
-
- EditText progressInput = view.findViewById(R.id.progress_input);
- Button updateButton = view.findViewById(R.id.update_button);
- Button showButton = view.findViewById(R.id.show_button);
- Button hideButton = view.findViewById(R.id.hide_button);
-
- updateButton.setOnClickListener(
- v -> {
- int progress;
- try {
- progress = Integer.parseInt(progressInput.getEditableText().toString());
- } catch (NumberFormatException e) {
- progress = 0;
- }
- for (LinearProgressIndicator indicator : linearProgressIndicatorList) {
- updateLinearProgressIndicator(indicator, progress);
- }
- for (CircularProgressIndicator indicator : circularProgressIndicatorList) {
- updateCircularProgressIndicator(indicator, progress);
- }
- });
- showButton.setOnClickListener(
- v -> {
- for (LinearProgressIndicator indicator : linearProgressIndicatorList) {
- indicator.setIndeterminate(true);
- indicator.show();
- }
- for (CircularProgressIndicator indicator : circularProgressIndicatorList) {
- indicator.setIndeterminate(true);
- indicator.show();
- }
- });
- hideButton.setOnClickListener(
- v -> {
- for (LinearProgressIndicator indicator : linearProgressIndicatorList) {
- indicator.hide();
- }
- for (CircularProgressIndicator indicator : circularProgressIndicatorList) {
- indicator.hide();
- }
- });
- }
-}
diff --git a/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_determinate_fragment.xml b/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_determinate_fragment.xml
deleted file mode 100644
index c4bb00230cd..00000000000
--- a/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_determinate_fragment.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_indeterminate_fragment.xml b/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_indeterminate_fragment.xml
deleted file mode 100644
index e527bc02d42..00000000000
--- a/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_indeterminate_fragment.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_indeterminate_indicators.xml b/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_indeterminate_indicators.xml
deleted file mode 100644
index 6c0edf0dbe6..00000000000
--- a/catalog/java/io/material/catalog/progressindicator/res/layout/cat_progress_indicator_indeterminate_indicators.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/catalog/java/io/material/catalog/progressindicator/res/values/strings.xml b/catalog/java/io/material/catalog/progressindicator/res/values/strings.xml
index 03d95b5e2f5..07c5927bff1 100644
--- a/catalog/java/io/material/catalog/progressindicator/res/values/strings.xml
+++ b/catalog/java/io/material/catalog/progressindicator/res/values/strings.xml
@@ -27,14 +27,6 @@
description="Title of demo for the progress indicators with multi indicator colors [CHAR LIMIT=NONE]">
Progress Indicator Multicolored Demo
-
- Indeterminate Progress Indicator Demo
-
-
- Determinate Progress Indicator Demo
-
Standalone Drawable Progress Indicator Demo
@@ -44,14 +36,9 @@
ProgressIndicator shows the progress of an undergoing process.
It can represent a determinate or indeterminate process in linear or circular form.
-
- As more information about a process becomes available, a progress indicator can switch from an
- indeterminate to a determinate state. Update the progress below to see an example of this.
- (Re-show the progress indicator to return to indeterminate mode.)
-
+
Track Thickness (1-15) dp
@@ -96,10 +83,6 @@
description="Set the displayed progress indicators to the determinate mode. [CHAR LIMIT=NONE]">
Determinate Mode
-
- Update
-
@@ -123,45 +106,6 @@
description="A circular progress indicator with multiple indicator colors [CHAR LIMIT=NONE]">
Circular type with multiple indicator colors.
-
-
- Single color start-to-end linear
-
-
- Single color end-to-start linear with rounded corners
-
-
- Multiple color left-to-right linear, anchoring at the top edge
-
-
- Multiple color right-to-left linear, anchoring at the bottom edge
-
-
- Multiple color right-to-left linear with contiguous animation, anchoring at the bottom edge
-
-
-
- Single color clockwise circular
-
-
- Single color counter-clockwise circular with rounded corners
-
-
- Multiple color clockwise circular, anchoring at the outer edge
-
-
- Multiple color clockwise circular, anchoring at the inner edge
-
-
Indeterminate Chip