원래 이상없이 잘 표시되던 원형 프로그래스바가 얼마 전부터 표시되지 않습니다. 아래와 같이 해당 부분만 따로 빼서 테스트를 해봤는데 이것 역시 표시가 안되네요.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#00000000"
android:visibility="gone" />
<Button
android:id="@+id/btn_run"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Run"
android:onClick="onClick"/>
</LinearLayout>
public class MainActivity extends AppCompatActivity {
ProgressBar mProgress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mProgress = (ProgressBar)findViewById(R.id.progress);
}
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_run:
if (mProgress.getVisibility() == View.GONE) mProgress.setVisibility(View.VISIBLE);
else mProgress.setVisibility(View.GONE);
break;
}
}
}
이 코드에서도 안보이는 걸 봐서는 안드로이드 스튜디오 업데이트에서 뭔가 바뀐게 아닌가 하는 생각도 드는데 잘 모르겠네요. 혹시 이 문제에 대해 아시거나 짐작가는 부분이 있는 분들께 도움 구합니다.
참고로 테스트 기기 환경은 갤노트2 버전 4.4.2 이구요. 안드로이드 스튜디오는 2.2.1 쓰고 있습니다. 다음은 gradle 정보입니다.
......
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
......
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
......
}
......
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
}