Индикатор выполнения не отображается в API 24 - PullRequest
0 голосов
/ 13 июня 2018

Я, наверное, упускаю что-то супер очевидное.Я пытался в течение двух часов просто показать индикатор выполнения с неопределенным прогрессом

это мой макет

   <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:ads="http://schemas.android.com/apk/res-auto"


        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin">


        <LinearLayout
            android:id="@+id/loginForm"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/smallMargin"
            android:orientation="vertical">


            <EditText
                android:id="@+id/textUsername"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/prompt_email"
                android:inputType="textAutoCorrect"
                android:maxLines="1"
                android:singleLine="true" />


            <EditText
                android:id="@+id/textPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/prompt_password"
                android:imeActionId="6"
                android:imeActionLabel="@string/action_sign_in"
                android:imeOptions="actionUnspecified"
                android:inputType="textPassword"
                android:maxLines="1"
                android:singleLine="true" />


            <Button
                android:id="@+id/loginButton"
                style="?android:textAppearanceSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginTop="16dp"
                android:text="@string/action_sign_in"
                android:textStyle="bold" />



        </LinearLayout>


        <ProgressBar
            android:id="@+id/progressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/medium_margim"
            android:indeterminate="true"
            android:visibility="visible" />



        <com.google.android.gms.ads.AdView

            android:id="@+id/adView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"


            ads:adSize="MEDIUM_RECTANGLE"
            ads:adUnitId="@string/banner_ad_unit_id"
              />

    </LinearLayout>

Пока мой код просто загружает layout.xml

Все выглядит хорошо, как в дизайнере макетов, НО БАР ПРОГРЕССА НЕТ.

У кого-нибудь есть идеи?Я следовал 3 разным учебникам и ничего

============================ ОБНОВЛЕНИЕ ==========================

Я загрузил изображение API 27 и оно нормально работало на эмуляторе ... но мое приложение нацелено на API 21

Моему мобильному телефону 24 года, и он не показывает индикатор выполнения

1 Ответ

0 голосов
/ 13 июня 2018

Убедитесь, что анимация вашего телефона включена и установлена ​​на 1x в System Settings/Developer Options.

enter image description here

...