Search in sources :

Example 96 with ActionBar

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);
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity) ActionBar(android.support.v7.app.ActionBar)

Example 97 with ActionBar

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);
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity) ActionBar(android.support.v7.app.ActionBar)

Example 98 with ActionBar

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();
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(io.hefuyi.listener.widget.DividerItemDecoration) ActionBar(android.support.v7.app.ActionBar)

Example 99 with ActionBar

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();
}
Also used : AppCompatActivity(android.support.v7.app.AppCompatActivity) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ActionBar(android.support.v7.app.ActionBar)

Example 100 with ActionBar

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);
    }
}
Also used : ActionBar(android.support.v7.app.ActionBar)

Aggregations

ActionBar (android.support.v7.app.ActionBar)784 View (android.view.View)248 Toolbar (android.support.v7.widget.Toolbar)214 TextView (android.widget.TextView)160 Intent (android.content.Intent)118 ImageView (android.widget.ImageView)76 AppCompatActivity (android.support.v7.app.AppCompatActivity)66 RecyclerView (android.support.v7.widget.RecyclerView)57 AdapterView (android.widget.AdapterView)52 Bundle (android.os.Bundle)49 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)49 ListView (android.widget.ListView)44 ColorDrawable (android.graphics.drawable.ColorDrawable)33 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)32 ViewPager (android.support.v4.view.ViewPager)29 ArrayList (java.util.ArrayList)29 SharedPreferences (android.content.SharedPreferences)28 Fragment (android.support.v4.app.Fragment)28 MenuItem (android.view.MenuItem)28 BindView (butterknife.BindView)28