List of usage examples for android.widget LinearLayout setOnClickListener
public void setOnClickListener(@Nullable OnClickListener l)
From source file:com.gh4a.fragment.RepositoryFragment.java
private void fillData() { TextView tvRepoName = (TextView) mContentView.findViewById(R.id.tv_repo_name); SpannableStringBuilder repoName = new SpannableStringBuilder(); repoName.append(mRepository.getOwner().getLogin()); repoName.append("/"); repoName.append(mRepository.getName()); repoName.setSpan(new IntentSpan(tvRepoName.getContext()) { @Override/*from w w w .j a va 2 s . c o m*/ protected Intent getIntent() { return IntentUtils.getUserActivityIntent(getActivity(), mRepository.getOwner()); } }, 0, mRepository.getOwner().getLogin().length(), 0); tvRepoName.setText(repoName); tvRepoName.setMovementMethod(UiUtils.CHECKING_LINK_METHOD); TextView tvParentRepo = (TextView) mContentView.findViewById(R.id.tv_parent); if (mRepository.isFork() && mRepository.getParent() != null) { Repository parent = mRepository.getParent(); tvParentRepo.setVisibility(View.VISIBLE); tvParentRepo.setText( getString(R.string.forked_from, parent.getOwner().getLogin() + "/" + parent.getName())); tvParentRepo.setOnClickListener(this); tvParentRepo.setTag(parent); } else { tvParentRepo.setVisibility(View.GONE); } fillTextView(R.id.tv_desc, 0, mRepository.getDescription()); fillTextView(R.id.tv_language, R.string.repo_language, mRepository.getLanguage()); fillTextView(R.id.tv_url, 0, !StringUtils.isBlank(mRepository.getHomepage()) ? mRepository.getHomepage() : mRepository.getHtmlUrl()); mContentView.findViewById(R.id.cell_stargazers).setOnClickListener(this); mContentView.findViewById(R.id.cell_forks).setOnClickListener(this); mContentView.findViewById(R.id.cell_pull_requests).setOnClickListener(this); mContentView.findViewById(R.id.tv_contributors_label).setOnClickListener(this); mContentView.findViewById(R.id.other_info).setOnClickListener(this); mContentView.findViewById(R.id.tv_releases_label).setOnClickListener(this); Permissions permissions = mRepository.getPermissions(); updateClickableLabel(R.id.tv_collaborators_label, permissions != null && permissions.hasPushAccess()); updateClickableLabel(R.id.tv_downloads_label, mRepository.isHasDownloads()); updateClickableLabel(R.id.tv_wiki_label, mRepository.isHasWiki()); TextView tvStargazersCount = (TextView) mContentView.findViewById(R.id.tv_stargazers_count); tvStargazersCount.setText(String.valueOf(mRepository.getWatchers())); TextView tvForksCount = (TextView) mContentView.findViewById(R.id.tv_forks_count); tvForksCount.setText(String.valueOf(mRepository.getForks())); LinearLayout llIssues = (LinearLayout) mContentView.findViewById(R.id.cell_issues); if (mRepository.isHasIssues()) { llIssues.setVisibility(View.VISIBLE); llIssues.setOnClickListener(this); // value will be filled when PR count arrives } else { llIssues.setVisibility(View.GONE); } mContentView.findViewById(R.id.tv_private) .setVisibility(mRepository.isPrivate() ? View.VISIBLE : View.GONE); }
From source file:de.enlightened.peris.ForumSettingsFragment.java
private void setupIconAvatarButton(final SharedPreferences appPreferences) { //Avatars and Icons button final LinearLayout forumSettingShowImages = (LinearLayout) this.getActivity() .findViewById(R.id.forum_setting_show_images); forumSettingShowImages.setOnClickListener(new View.OnClickListener() { @Override//from w ww.ja v a2s . com @SuppressWarnings("checkstyle:requirethis") public void onClick(final View v) { final SharedPreferences appPreferences = getActivity().getSharedPreferences("prefs", 0); boolean currentAvatarSetting = appPreferences.getBoolean("show_images", true); final TextView forumSettingShowImagesReadout = (TextView) getActivity() .findViewById(R.id.forum_setting_show_images_readout); if (currentAvatarSetting) { forumSettingShowImagesReadout.setText("Off"); currentAvatarSetting = false; } else { forumSettingShowImagesReadout.setText("On"); currentAvatarSetting = true; } final SharedPreferences.Editor editor = appPreferences.edit(); editor.putBoolean("show_images", currentAvatarSetting); editor.commit(); } }); final boolean currentAvatarSetting = appPreferences.getBoolean("show_images", true); final TextView forumSettingShowImagesReadout = (TextView) getActivity() .findViewById(R.id.forum_setting_show_images_readout); if (currentAvatarSetting) { forumSettingShowImagesReadout.setText("On"); } else { forumSettingShowImagesReadout.setText("Off"); } }
From source file:com.activiti.android.ui.fragments.task.filter.TaskFilterPropertiesFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); frag = (TasksFragment) getActivity().getSupportFragmentManager().findFragmentByTag(TasksFragment.TAG); fragFilters = (FiltersFragment) getActivity().getSupportFragmentManager() .findFragmentByTag(FiltersFragment.TAG); keywordsText = (TextView) viewById(R.id.task_filter_keywords_value); sortText = (TextView) viewById(R.id.task_filter_sort_value); stateText = (TextView) viewById(R.id.task_filter_state_value); processText = (TextView) viewById(R.id.task_filter_process_definition_value); assignmentText = (TextView) viewById(R.id.task_filter_assignment_value); nameText = (MaterialEditText) viewById(R.id.task_filter_name); refreshInfo();//from w w w . j a v a 2 s .c o m viewById(R.id.task_filter_keywords).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { EditTextDialogFragment.with(getActivity()).fieldId(EDIT_NAME_ID).tag(getTag()).singleLine(true) .notNull(false).value(keywordsText.getText().toString()) .hintId(R.string.task_filter_text_placeholder_long).displayAsDialog(); } }); LinearLayout sortClick = (LinearLayout) viewById(R.id.task_filter_sort); sortClick.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TaskSortingDialogFragment.with(getActivity()).sort(sort).displayAsDialog(); } }); LinearLayout stateButton = (LinearLayout) viewById(R.id.task_filter_state); stateButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TaskStateDialogFragment.with(getActivity()).state(state).displayAsDialog(); } }); LinearLayout assignmentButton = (LinearLayout) viewById(R.id.task_filter_assignment); assignmentButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TaskAssignmentDialogFragment.with(getActivity()).assignment(assignment).displayAsDialog(); } }); LinearLayout processDefIdButton = (LinearLayout) viewById(R.id.task_filter_process_definition); processDefIdButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TaskProcessDefinitionFragment.with(getActivity()).appId(appId).processDefId(processDefId) .displayAsDialog(); } }); viewById(R.id.action_save).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (filterId != null) { updateFilter(); } else { createFilter(); } } }); viewById(R.id.filter_back).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { getFragmentManager().popBackStack(); } }); }
From source file:ovh.ice.icecons.LicenseActivity.java
private void createLayout() { // main centered layout LinearLayout.LayoutParams smallLayoutParams = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1f); float scale = IceScreenUtils.densityScale(getApplicationContext()); int padding = Math.round(64 * scale); LinearLayout frameLayout = new LinearLayout(this); frameLayout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)); frameLayout.setBackgroundColor(0xffffffff); frameLayout.setGravity(Gravity.CENTER); setContentView(frameLayout);//from w w w .j a va2s.co m LinearLayout baseLayout = new LinearLayout(this); baseLayout.setOrientation(LinearLayout.VERTICAL); baseLayout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT)); baseLayout.setGravity(Gravity.LEFT); frameLayout.addView(baseLayout); // gpl button LinearLayout sourceLayout = new LinearLayout(this); sourceLayout.setOrientation(LinearLayout.HORIZONTAL); sourceLayout.setLayoutParams(smallLayoutParams); sourceLayout.setGravity(Gravity.CENTER); baseLayout.addView(sourceLayout); LinearLayout sourceClickLayout = new LinearLayout(this); sourceClickLayout.setOrientation(LinearLayout.HORIZONTAL); sourceClickLayout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)); sourceClickLayout.setGravity(Gravity.CENTER); sourceLayout.addView(sourceClickLayout); sourceClickLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { gplLink(v); } }); TextView sourceText = new TextView(this); sourceText.setText("This program's source code is avaiable under the GNU General Public License v3."); sourceText.setTextSize(24); sourceText.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimaryDark)); sourceText.setPadding(padding, padding, padding, padding); sourceClickLayout.addView(sourceText); // cc button LinearLayout imgLayout = new LinearLayout(this); imgLayout.setOrientation(LinearLayout.HORIZONTAL); imgLayout.setLayoutParams(smallLayoutParams); imgLayout.setGravity(Gravity.CENTER); imgLayout.setBackgroundColor(0xff000000); baseLayout.addView(imgLayout); LinearLayout imgClickLayout = new LinearLayout(this); imgClickLayout.setOrientation(LinearLayout.HORIZONTAL); imgClickLayout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)); imgClickLayout.setGravity(Gravity.CENTER); imgLayout.addView(imgClickLayout); imgClickLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ccLink(v); } }); TextView aboutText = new TextView(this); aboutText.setText( "All the images included in this program are avaiable under the Creative Commons Attribution Share Alike 4.0 license."); aboutText.setTextSize(24); aboutText.setTextColor(0xffffffff); aboutText.setPadding(padding, padding, padding, padding); imgClickLayout.addView(aboutText); }
From source file:il.co.togetthere.ScreenSlideActivity.java
@SuppressLint("InlinedApi") @Override//from ww w . j a v a 2 s . c o m protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_screen_slide); // Start to import data from DB mThread.delegate = this; mCurr = -1; /** * View Initialization **/ // Hide the status bar. //View decorView = getWindow().getDecorView(); //int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; //decorView.setSystemUiVisibility(uiOptions); // Remember that you should never show the action bar if the // status bar is hidden, so hide that too if necessary. android.app.ActionBar actionBar = getActionBar(); actionBar.hide(); /** * Set Profile Picture **/ ProfilePictureView profilePictureView = (ProfilePictureView) findViewById( R.id.button_show_user_details_slide); profilePictureView.setProfileId(LoginActivity.user.getID()); profilePictureView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent infoIntent = new Intent(ScreenSlideActivity.this, UserInfoActivity.class); ScreenSlideActivity.this.startActivity(infoIntent); } }); /** * Get Values **/ Intent inIntent = getIntent(); setmServiceProviderType(inIntent.getStringExtra("TYPE_EXTRA")); if (getmServiceProviderType() != null && getmServiceProviderType().equals("help")) { mThread.execute(DynamoDBManagerType.GET_TASKS.toString()); } else { mThread.execute(DynamoDBManagerType.GET_PROVIDER.toString(), ServiceProvider.stringToEnum(getmServiceProviderType()).toString()); } /** * Set Lower Bar Functions */ ((LinearLayout) findViewById(R.id.button_add_new_location)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent addNewIntent; if (getmServiceProviderType().equals("help")) { addNewIntent = new Intent(ScreenSlideActivity.this, AddNewTaskActivity.class); ScreenSlideActivity.this.startActivity(addNewIntent); } else { addNewIntent = new Intent(ScreenSlideActivity.this, AddSPActivity.class); ScreenSlideActivity.this.startActivity(addNewIntent); } } }); // TODO "Rank" button Handler LinearLayout rankButton = (LinearLayout) findViewById(R.id.button_rank); if (getmServiceProviderType().equals("help")) { rankButton.setVisibility(View.INVISIBLE); } else { rankButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Rank Dialog } }); } LinearLayout editButton = (LinearLayout) findViewById(R.id.button_edit); if (getmServiceProviderType().equals("help")) { editButton.setVisibility(View.INVISIBLE); } else { editButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent editIntent = null; editIntent = new Intent(ScreenSlideActivity.this, EditActivity.class); editIntent.putExtra("SP_NUMBER", mCurr); ScreenSlideActivity.this.startActivity(editIntent); // TODO - update SP when editing is finished } }); } // Titles TextView titleRank = ((TextView) findViewById(R.id.button_rank_title)); TextView titleAdd = ((TextView) findViewById(R.id.button_add_new_location_title)); TextView titleEdit = ((TextView) findViewById(R.id.button_edit_title)); // Define Font Typeface font = Typeface.createFromAsset(getAssets(), "fonts/GOTHIC.TTF"); titleRank.setTypeface(font); titleAdd.setTypeface(font); titleEdit.setTypeface(font); }
From source file:uguess.qucai.com.merchant.business.common.ui.PictureViewPagerActivity.java
/** * ?ActionBar/*w w w.ja va 2s . c om*/ */ private void initActionBar() { //?actionbar?? QCActionBar actionBar = (QCActionBar) findViewById(R.id.action_bar); ImageView back = (ImageView) actionBar.findViewById(R.id.bar_left); LinearLayout iconLayout = (LinearLayout) actionBar.findViewById(R.id.iconLinear); LinearLayout operationLayout = (LinearLayout) actionBar.findViewById(R.id.operatorLinear); back.setImageResource(R.drawable.ic_common_back); actionBar.setTitle(null); actionBar.setBackground(getResources().getColor(R.color.transparent)); iconLayout.setBackgroundColor(getResources().getColor(R.color.transparent)); actionBar.showSystemBar(); // iconLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { finish(); } }); operationLayout.setVisibility(View.INVISIBLE); }
From source file:com.prey.activities.InitActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); this.setContentView(R.layout.home); PreyLogger.i("onCreate of MenuActivity"); onboardingPagerAdapter = new OnboardingPagerAdapter(getSupportFragmentManager()); mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setAdapter(onboardingPagerAdapter); Button buttonHome = (Button) findViewById(R.id.buttonHome); buttonHome.setOnClickListener(new View.OnClickListener() { @Override// w w w.j av a2 s.c o m public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), SignUpActivity.class); startActivity(intent); finish(); } }); TextView textView = (TextView) findViewById(R.id.linkHome); textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), SignInActivity.class); startActivity(intent); finish(); } }); Typeface titilliumWebBold = Typeface.createFromAsset(getAssets(), "fonts/Titillium_Web/TitilliumWeb-Bold.ttf"); buttonHome.setTypeface(titilliumWebBold); final LinearLayout larr = (LinearLayout) findViewById(R.id.larr); final LinearLayout rarr = (LinearLayout) findViewById(R.id.rarr); larr.setVisibility(View.GONE); larr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int currentItem = mViewPager.getCurrentItem(); larr.setVisibility(View.VISIBLE); rarr.setVisibility(View.VISIBLE); if (currentItem == 0) { larr.setVisibility(View.GONE); } mViewPager.setCurrentItem(currentItem - 1); } }); rarr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int currentItem = mViewPager.getCurrentItem(); larr.setVisibility(View.VISIBLE); rarr.setVisibility(View.VISIBLE); if (currentItem >= 5) { rarr.setVisibility(View.GONE); onboardingCompleted(); } mViewPager.setCurrentItem(currentItem + 1); } }); mViewPager.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int currentItem = mViewPager.getCurrentItem(); larr.setVisibility(View.VISIBLE); rarr.setVisibility(View.VISIBLE); PreyLogger.i("currentItem:" + currentItem); if (currentItem == 0) { larr.setVisibility(View.GONE); } if (currentItem >= 5) { rarr.setVisibility(View.GONE); onboardingCompleted(); } return false; } }); onboardingInit(); }
From source file:org.arasthel.almeribus.Principal.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // We ask ABS to have an indeterminate progress bar on the action bar // requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.activity_principal); setBehindContentView(R.layout.menu); //active = false; active = true;//ww w. j a va 2s . c o m SlidingMenu menu = getSlidingMenu(); menu.setMode(SlidingMenu.LEFT); menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN); menu.setShadowWidthRes(R.dimen.shadow_width); menu.setShadowDrawable(R.drawable.shadow); menu.setBehindScrollScale(1); //menu.setTouchModeBehind(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setBehindWidth((int) (getWindowManager().getDefaultDisplay().getWidth() * 0.9)); menu.setFadeDegree(0.35f); menu.setOnOpenedListener(new OnOpenedListener() { @Override public void onOpened() { getSlidingMenu().invalidate(); } }); menu.setOnClosedListener(new OnClosedListener() { @Override public void onClosed() { getSlidingMenu().invalidate(); } }); setCloseOnBack(true); setSlidingActionBarEnabled(true); LinearLayout abrirListadoParadas = (LinearLayout) menu.findViewById(R.id.abrir_listado_paradas); abrirListadoParadas.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { abrirListadoParadas(); } }); LinearLayout abrirMapaParadas = (LinearLayout) menu.findViewById(R.id.abrir_mapa_paradas); abrirMapaParadas.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { abrirMapaParadas(); } }); LinearLayout abrirTarifas = (LinearLayout) menu.findViewById(R.id.abrir_listado_tarifas); abrirTarifas.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { abrirTarifas(); } }); View info = menu.findViewById(R.id.info); info.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { abrirInfo(); } }); View avisos = menu.findViewById(R.id.avisos); avisos.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { abrirAvisos(); } }); InicioFragment mFragment = new InicioFragment(); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, mFragment).commit(); } else { getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, mFragment).commit(); } //loaded = false; loaded = true; //new MostrarMensajeTask().execute(); //new BuscarActualizacionesTask().execute(); }
From source file:utils.widget.vpi_lib.TabPageIndicator_Custom.java
@SuppressLint("InflateParams") private void addTab(int index, CharSequence text, int iconResId, String url) { // TODO/*from w w w .ja v a 2s .c o m*/ final TabView tabView = new TabView(getContext()); tabView.mIndex = index; LinearLayout linearLayout = new LinearLayout(getContext()); linearLayout.setOrientation(LinearLayout.VERTICAL); linearLayout.setTag(index); linearLayout.setFocusable(true); linearLayout.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { LinearLayout tabView = (LinearLayout) v; final int oldSelected = mViewPager.getCurrentItem(); final int newSelected = Integer.valueOf(tabView.getTag().toString()); mViewPager.setCurrentItem(newSelected); if (oldSelected == newSelected && mTabReselectedListener != null) { mTabReselectedListener.onTabReselected(newSelected); } } }); parentView = LayoutInflater.from(getContext()).inflate(R.layout.vpi_tap_custom, null); ImageView img = (ImageView) parentView.findViewById(R.id.tabImage); // img.setImageResource(iconResId); /* * ProgressBar pbBar = (ProgressBar) * view.findViewById(R.id.progressBar_tab_custom); */ // LinearLayout layout = (LinearLayout) // view.findViewById(R.id.vpi_custom_layout); TextView txtTitle = (TextView) parentView.findViewById(R.id.vpi_custom_txt_Title); TextView txtBottom = (TextView) parentView.findViewById(R.id.vpi_custom_txt_btm); // TODO // LinearLayout.LayoutParams layoutParams = new // LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT); // layout.setLayoutParams(layoutParams); txtTitle.setText(text); txtTitle.setTextColor(getResources().getColor(R.color.vpi_non_focus)); txtBottom.setBackgroundColor(getResources().getColor(R.color.vpi_non_focus)); /* * AQuery aq = new AQuery(getContext()); * aq.id(img).progress(pbBar).image(url, false, true, 0, * R.drawable.img_default_category, new BitmapAjaxCallback() { * * @SuppressLint("NewApi") @SuppressWarnings("deprecation") * * @Override protected void callback(String url, ImageView iv, Bitmap * bm, AjaxStatus status) { int sdk = android.os.Build.VERSION.SDK_INT; * if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) { * iv.setBackgroundDrawable(new * BitmapDrawable(getContext().getResources(), bm)); } else { * iv.setBackground(new BitmapDrawable(getContext().getResources(), * bm)); } } }); */ linearLayout.addView(parentView); linearLayout.addView(tabView); mTabLayout.addView(linearLayout, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 1)); }
From source file:com.andrew.apollo.ui.activities.BaseActivity.java
/** * Initializes the items in the bottom action bar. *//*from w ww. j a v a 2 s. com*/ private void initBottomActionBar() { // Play and pause button mPlayPauseButton = (PlayPauseButton) findViewById(R.id.action_button_play); // Shuffle button mShuffleButton = (ShuffleButton) findViewById(R.id.action_button_shuffle); // Repeat button mRepeatButton = (RepeatButton) findViewById(R.id.action_button_repeat); // Track name mTrackName = (TextView) findViewById(R.id.bottom_action_bar_line_one); // Artist name mArtistName = (TextView) findViewById(R.id.bottom_action_bar_line_two); // Album art mAlbumArt = (ImageView) findViewById(R.id.bottom_action_bar_album_art); // Open to the currently playing album profile mAlbumArt.setOnClickListener(mOpenCurrentAlbumProfile); // Bottom action bar final LinearLayout bottomActionBar = (LinearLayout) findViewById(R.id.bottom_action_bar); // Display the now playing screen or shuffle if this isn't anything // playing bottomActionBar.setOnClickListener(mOpenNowPlaying); }