ActionBar를 사용하고 있습니다. 제목 표시 줄에 새로 고침 진행률 회 전자를 넣고 싶습니다. 그렇지 않으면 숨길 수 있습니다. 가능한가요? :ActionBar에서 진행 상황 회 전자 (새로 고침)를 표시 하시겠습니까?
// My menu has a refresh item, but it shouldn't be visible on the
// actionbar unless it's spinning.
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_refresh"
android:title="@string/refresh"
android:icon="@drawable/ic_action_refresh" />
</menu>
...
// When I need to show some work being done on my activity,
// can I somehow now make the spinner associated with the
// refresh item become visible on the action bar?
getActionBarHelper().setRefreshActionItemState(true);
"진행 중"/ 회전하지 않는 한 ActionBar에 표시하고 싶지 않습니다. 이 ActionBarSherlock의 출신
감사 전화에서 게시
확인 덕분에 거기에서 조금 파고 들겠습니다. SDK와 함께 제공된 샘플은 처음에 생각한만큼 좋지 않습니다. 그들은 Window.FEATURE_CUSTOM_TITLE을 사용하고 있습니다.이 기능은 사용자가 원하는대로 완전히 그려지기 전에 제목 표시 줄을 보여주는 효과가 있습니다. 전문가답지 않게 보입니다. 한숨. – user291701
@Jake Wharton 나는 이것을 해결하려고 노력하고있다. '새로 고침 '버튼을 누르면 콜백'onOptionsItemSelected'가 호출됩니다. MartinS가 제안한대로 어디에서 setProgressBarIndeterminateVisibility를 호출 할 것인가? –
ActionBarSherlock을 사용하는 경우 setSupportProgressBarIndeterminateVisibility()를 사용해야합니다. 그렇지 않으면 진행 표시기가 항상 회전하여 그 이유를 알 수 없습니다. –