use of android.support.v7.app.ActionBar in project ListenerMusicPlayer by hefuyicoder.
the class ArtistDetailFragment method setupToolbar.
private void setupToolbar() {
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
final ActionBar ab = ((AppCompatActivity) getActivity()).getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(true);
collapsingToolbarLayout.setTitle(artistName);
}
use of android.support.v7.app.ActionBar in project ListenerMusicPlayer by hefuyicoder.
the class PlaylistDetailFragment method setupToolbar.
private void setupToolbar() {
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
final ActionBar ab = ((AppCompatActivity) getActivity()).getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(true);
collapsingToolbarLayout.setTitle(playlistName);
}
use of android.support.v7.app.ActionBar in project ListenerMusicPlayer by hefuyicoder.
the class FoldersFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ATE.apply(this, ATEUtil.getATEKey(getActivity()));
if (Build.VERSION.SDK_INT < 21 && view.findViewById(R.id.status_bar) != null) {
view.findViewById(R.id.status_bar).setVisibility(View.GONE);
if (Build.VERSION.SDK_INT >= 19) {
int statusBarHeight = DensityUtil.getStatusBarHeight(getContext());
view.findViewById(R.id.toolbar).setPadding(0, statusBarHeight, 0, 0);
}
}
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
final ActionBar ab = ((AppCompatActivity) getActivity()).getSupportActionBar();
ab.setHomeAsUpIndicator(R.drawable.ic_menu);
ab.setDisplayHomeAsUpEnabled(true);
ab.setTitle(R.string.folders);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(mAdapter);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST, false));
mPresenter.subscribe();
subscribeMetaChangedEvent();
}
use of android.support.v7.app.ActionBar in project ListenerMusicPlayer by hefuyicoder.
the class SearchFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ATE.apply(this, ATEUtil.getATEKey(getActivity()));
if (Build.VERSION.SDK_INT < 21 && view.findViewById(R.id.status_bar) != null) {
view.findViewById(R.id.status_bar).setVisibility(View.GONE);
if (Build.VERSION.SDK_INT >= 19) {
int statusBarHeight = DensityUtil.getStatusBarHeight(getContext());
view.findViewById(R.id.toolbar).setPadding(0, statusBarHeight, 0, 0);
}
}
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
final ActionBar ab = ((AppCompatActivity) getActivity()).getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(true);
getActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);
recyclerView.setOnTouchListener(this);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setAdapter(adapter);
subscribeMediaUpdateEvent();
}
use of android.support.v7.app.ActionBar in project JieCaoVideoPlayer by lipangit.
the class JCVideoPlayer method showSupportActionBar.
public static void showSupportActionBar(Context context) {
if (ACTION_BAR_EXIST) {
ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
if (ab != null) {
ab.setShowHideAnimationEnabled(false);
ab.show();
}
}
if (TOOL_BAR_EXIST) {
JCUtils.getAppCompActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
Aggregations