Я пытаюсь установить индикатор выполнения, но он продолжает вращаться, нужно ли что-то добавить или как установить определенный процент?
Код:
public class TabOverviewFragment extends Fragment {
@BindView(R.id.progressBar1)
ProgressBar progressBar1;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_tab_overview,
container,
false);
ButterKnife.bind(this, view);
progressBar1.setProgress(90);
return view;
}
public TabOverviewFragment() {
// Required empty public constructor
}
}
Компоновка:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modinfosection.TabOverviewFragment">
<ProgressBar
android:id="@+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="30dp"
android:clickable="false"
android:scrollbarSize="300dp"/>