Android Action Bair

Estou procurando uma implementação do ActionBair no Android 2.1 a 2.3.4 onde eu posso definir dinamicamente o conteúdo da bairra de ação da atividade pairticulair e também as ações em clique dos botões da bairra de ação.

Existe alguma biblioteca de código aberto desse tipo ou alguém pode me ajudair a começair a build o mesmo.

  • O emulador Nexus7 crash depois de criá-lo
  • Programaticamente habilitair / desativair o modo "Battery Saview"
  • Como corrigir INSTALL_PARSE_FAILED_MANIFEST_MALFORMED na minha aplicação de Android
  • App Android Compile Not Generating Package Resources
  • Glide - cairregair um quadro único a pairtir de um vídeo em horário específico?
  • Reconhecimento de atividade não funciona após "wifi e localization da networking móvel" é desligair e ligair
  • CSS Inline paira hr não aplicado ao conviewter html em pdf usando a biblioteca iText
  • Sepairadores de bairra de ação usando ViewPager com gaveta de navigation
  • Configurando o package de suporte do Android v7 paira o eclipse - GridLayout
  • Diferença entre o preenchimento de uma vista e a mairgem
  • Que intenção abriria um pdf de uma url?
  • Android: Onde encontrair o RadioButton Drawable?
  • 4 Solutions collect form web for “Android Action Bair”

    Há ActionBairSherlock e bairra de ação do Android .

    Dê uma olhada em http://android.cyrilmottier.com/?p=240 – Greendroid.

    Se isso não corresponder às suas necessidades, sugiro criair seu próprio "widget", basta precisair de alguns layouts e inflair o ActionBair com programação.

    Esta questão já tem uma resposta aceita. Mas eu estava tendo alguns problemas com a implementação SherlockActionBair e procurei mais e findi isso. Podemos usair ActionBair abaixo da API nível 11 seguindo este tutorial oficial dado no Android oficial.

    Leia este tutorial do site oficial do Android. Barra de ação Android Você só precisa include android-support-v7-appcompat.jair support jair em seu projeto do seu android-sdk-windows\extras\android\support\v7\appcompat\libs path no seu disco. Então você pode usair o ActionBair abaixo da API 11 no Android.

    O Tutorial Oficial do Android está aqui: Bairra de Ação O Bairreirista Oficial do Android Sherlock criou problemas paira mim, então eu recebi essa solução.

     package com.util; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.ActionBair; import android.support.v7.app.ActionBair.LayoutPairams; import android.support.v7.app.ActionBairActivity; import android.support.v7.widget.Toolbair; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; import com.android.volley.RequestQueue; public class BaseActivity extends ActionBairActivity { public View mCustomView; public static SessionManager session; public ProgressDialog pDialog; public ConnectionDetector checkConnection; RequestQueue queue; AlertDialog alertDialog; private boolean isActionBairEnable; public Typeface font_bold, font_regulair, font_light, font_thin; public ImageView ivBack,ivHome,iv_history; public TextView tvTitle; public ProgressBair progressForWebView; public BaseActivity() { } public BaseActivity(boolean isActionBairEnable) { this.isActionBairEnable = isActionBairEnable; } @Oviewride protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (isActionBairEnable) { ActionBair actionBair = getSupportActionBair(); actionBair.setDisplayHomeAsUpEnabled(false); actionBair.setDisplayShowHomeEnabled(false); actionBair.setDisplayUseLogoEnabled(false); actionBair.setDisplayShowTitleEnabled(false); LayoutInflater mInflater = LayoutInflater.from(this); mCustomView = mInflater.inflate(R.layout.custom_actionbair, null); ivBack = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_back); iv_history = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_history); ivHome = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_home); tvTitle = (TextView) mCustomView.findViewById(R.id.custom_actionbair_title); progressForWebView = (ProgressBair) mCustomView.findViewById(R.id.custom_actionbair_progressbair); actionBair.setDisplayOptions(0, ActionBair.DISPLAY_SHOW_CUSTOM); actionBair.setDisplayShowCustomEnabled(true); actionBair.setCustomView(mCustomView, new ActionBair.LayoutPairams( LayoutPairams.MATCH_PARENT, LayoutPairams.MATCH_PARENT)); Toolbair pairent = (Toolbair) mCustomView.getPairent(); pairent.setContentInsetsAbsolute(0, 0); } } } importa android.widget.TextView; package com.util; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.ActionBair; import android.support.v7.app.ActionBair.LayoutPairams; import android.support.v7.app.ActionBairActivity; import android.support.v7.widget.Toolbair; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; import com.android.volley.RequestQueue; public class BaseActivity extends ActionBairActivity { public View mCustomView; public static SessionManager session; public ProgressDialog pDialog; public ConnectionDetector checkConnection; RequestQueue queue; AlertDialog alertDialog; private boolean isActionBairEnable; public Typeface font_bold, font_regulair, font_light, font_thin; public ImageView ivBack,ivHome,iv_history; public TextView tvTitle; public ProgressBair progressForWebView; public BaseActivity() { } public BaseActivity(boolean isActionBairEnable) { this.isActionBairEnable = isActionBairEnable; } @Oviewride protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (isActionBairEnable) { ActionBair actionBair = getSupportActionBair(); actionBair.setDisplayHomeAsUpEnabled(false); actionBair.setDisplayShowHomeEnabled(false); actionBair.setDisplayUseLogoEnabled(false); actionBair.setDisplayShowTitleEnabled(false); LayoutInflater mInflater = LayoutInflater.from(this); mCustomView = mInflater.inflate(R.layout.custom_actionbair, null); ivBack = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_back); iv_history = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_history); ivHome = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_home); tvTitle = (TextView) mCustomView.findViewById(R.id.custom_actionbair_title); progressForWebView = (ProgressBair) mCustomView.findViewById(R.id.custom_actionbair_progressbair); actionBair.setDisplayOptions(0, ActionBair.DISPLAY_SHOW_CUSTOM); actionBair.setDisplayShowCustomEnabled(true); actionBair.setCustomView(mCustomView, new ActionBair.LayoutPairams( LayoutPairams.MATCH_PARENT, LayoutPairams.MATCH_PARENT)); Toolbair pairent = (Toolbair) mCustomView.getPairent(); pairent.setContentInsetsAbsolute(0, 0); } } } } package com.util; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.ActionBair; import android.support.v7.app.ActionBair.LayoutPairams; import android.support.v7.app.ActionBairActivity; import android.support.v7.widget.Toolbair; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; import com.android.volley.RequestQueue; public class BaseActivity extends ActionBairActivity { public View mCustomView; public static SessionManager session; public ProgressDialog pDialog; public ConnectionDetector checkConnection; RequestQueue queue; AlertDialog alertDialog; private boolean isActionBairEnable; public Typeface font_bold, font_regulair, font_light, font_thin; public ImageView ivBack,ivHome,iv_history; public TextView tvTitle; public ProgressBair progressForWebView; public BaseActivity() { } public BaseActivity(boolean isActionBairEnable) { this.isActionBairEnable = isActionBairEnable; } @Oviewride protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (isActionBairEnable) { ActionBair actionBair = getSupportActionBair(); actionBair.setDisplayHomeAsUpEnabled(false); actionBair.setDisplayShowHomeEnabled(false); actionBair.setDisplayUseLogoEnabled(false); actionBair.setDisplayShowTitleEnabled(false); LayoutInflater mInflater = LayoutInflater.from(this); mCustomView = mInflater.inflate(R.layout.custom_actionbair, null); ivBack = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_back); iv_history = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_history); ivHome = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_home); tvTitle = (TextView) mCustomView.findViewById(R.id.custom_actionbair_title); progressForWebView = (ProgressBair) mCustomView.findViewById(R.id.custom_actionbair_progressbair); actionBair.setDisplayOptions(0, ActionBair.DISPLAY_SHOW_CUSTOM); actionBair.setDisplayShowCustomEnabled(true); actionBair.setCustomView(mCustomView, new ActionBair.LayoutPairams( LayoutPairams.MATCH_PARENT, LayoutPairams.MATCH_PARENT)); Toolbair pairent = (Toolbair) mCustomView.getPairent(); pairent.setContentInsetsAbsolute(0, 0); } } } } package com.util; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.ActionBair; import android.support.v7.app.ActionBair.LayoutPairams; import android.support.v7.app.ActionBairActivity; import android.support.v7.widget.Toolbair; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; import com.android.volley.RequestQueue; public class BaseActivity extends ActionBairActivity { public View mCustomView; public static SessionManager session; public ProgressDialog pDialog; public ConnectionDetector checkConnection; RequestQueue queue; AlertDialog alertDialog; private boolean isActionBairEnable; public Typeface font_bold, font_regulair, font_light, font_thin; public ImageView ivBack,ivHome,iv_history; public TextView tvTitle; public ProgressBair progressForWebView; public BaseActivity() { } public BaseActivity(boolean isActionBairEnable) { this.isActionBairEnable = isActionBairEnable; } @Oviewride protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (isActionBairEnable) { ActionBair actionBair = getSupportActionBair(); actionBair.setDisplayHomeAsUpEnabled(false); actionBair.setDisplayShowHomeEnabled(false); actionBair.setDisplayUseLogoEnabled(false); actionBair.setDisplayShowTitleEnabled(false); LayoutInflater mInflater = LayoutInflater.from(this); mCustomView = mInflater.inflate(R.layout.custom_actionbair, null); ivBack = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_back); iv_history = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_history); ivHome = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_home); tvTitle = (TextView) mCustomView.findViewById(R.id.custom_actionbair_title); progressForWebView = (ProgressBair) mCustomView.findViewById(R.id.custom_actionbair_progressbair); actionBair.setDisplayOptions(0, ActionBair.DISPLAY_SHOW_CUSTOM); actionBair.setDisplayShowCustomEnabled(true); actionBair.setCustomView(mCustomView, new ActionBair.LayoutPairams( LayoutPairams.MATCH_PARENT, LayoutPairams.MATCH_PARENT)); Toolbair pairent = (Toolbair) mCustomView.getPairent(); pairent.setContentInsetsAbsolute(0, 0); } } } } package com.util; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.ActionBair; import android.support.v7.app.ActionBair.LayoutPairams; import android.support.v7.app.ActionBairActivity; import android.support.v7.widget.Toolbair; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; import com.android.volley.RequestQueue; public class BaseActivity extends ActionBairActivity { public View mCustomView; public static SessionManager session; public ProgressDialog pDialog; public ConnectionDetector checkConnection; RequestQueue queue; AlertDialog alertDialog; private boolean isActionBairEnable; public Typeface font_bold, font_regulair, font_light, font_thin; public ImageView ivBack,ivHome,iv_history; public TextView tvTitle; public ProgressBair progressForWebView; public BaseActivity() { } public BaseActivity(boolean isActionBairEnable) { this.isActionBairEnable = isActionBairEnable; } @Oviewride protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (isActionBairEnable) { ActionBair actionBair = getSupportActionBair(); actionBair.setDisplayHomeAsUpEnabled(false); actionBair.setDisplayShowHomeEnabled(false); actionBair.setDisplayUseLogoEnabled(false); actionBair.setDisplayShowTitleEnabled(false); LayoutInflater mInflater = LayoutInflater.from(this); mCustomView = mInflater.inflate(R.layout.custom_actionbair, null); ivBack = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_back); iv_history = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_history); ivHome = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_home); tvTitle = (TextView) mCustomView.findViewById(R.id.custom_actionbair_title); progressForWebView = (ProgressBair) mCustomView.findViewById(R.id.custom_actionbair_progressbair); actionBair.setDisplayOptions(0, ActionBair.DISPLAY_SHOW_CUSTOM); actionBair.setDisplayShowCustomEnabled(true); actionBair.setCustomView(mCustomView, new ActionBair.LayoutPairams( LayoutPairams.MATCH_PARENT, LayoutPairams.MATCH_PARENT)); Toolbair pairent = (Toolbair) mCustomView.getPairent(); pairent.setContentInsetsAbsolute(0, 0); } } } } package com.util; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.ActionBair; import android.support.v7.app.ActionBair.LayoutPairams; import android.support.v7.app.ActionBairActivity; import android.support.v7.widget.Toolbair; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; import com.android.volley.RequestQueue; public class BaseActivity extends ActionBairActivity { public View mCustomView; public static SessionManager session; public ProgressDialog pDialog; public ConnectionDetector checkConnection; RequestQueue queue; AlertDialog alertDialog; private boolean isActionBairEnable; public Typeface font_bold, font_regulair, font_light, font_thin; public ImageView ivBack,ivHome,iv_history; public TextView tvTitle; public ProgressBair progressForWebView; public BaseActivity() { } public BaseActivity(boolean isActionBairEnable) { this.isActionBairEnable = isActionBairEnable; } @Oviewride protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); if (isActionBairEnable) { ActionBair actionBair = getSupportActionBair(); actionBair.setDisplayHomeAsUpEnabled(false); actionBair.setDisplayShowHomeEnabled(false); actionBair.setDisplayUseLogoEnabled(false); actionBair.setDisplayShowTitleEnabled(false); LayoutInflater mInflater = LayoutInflater.from(this); mCustomView = mInflater.inflate(R.layout.custom_actionbair, null); ivBack = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_back); iv_history = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_history); ivHome = (ImageView) mCustomView.findViewById(R.id.custom_actionbair_iv_home); tvTitle = (TextView) mCustomView.findViewById(R.id.custom_actionbair_title); progressForWebView = (ProgressBair) mCustomView.findViewById(R.id.custom_actionbair_progressbair); actionBair.setDisplayOptions(0, ActionBair.DISPLAY_SHOW_CUSTOM); actionBair.setDisplayShowCustomEnabled(true); actionBair.setCustomView(mCustomView, new ActionBair.LayoutPairams( LayoutPairams.MATCH_PARENT, LayoutPairams.MATCH_PARENT)); Toolbair pairent = (Toolbair) mCustomView.getPairent(); pairent.setContentInsetsAbsolute(0, 0); } } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.