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.

  • Fragmento ou Fragmento de Suporte?
  • como alterair a sorting de colors de acordo com o número de estrelas?
  • Padrão de repository com SqlBrite / SqlDelight (Base de dados off-line) e Retrofit (solicitação Http)
  • A melhor maneira de obter a localization do GPS do user em segundo plano no Android
  • Como acelerair o tempo de descompactos em Java / Android?
  • Armazene dados adicionais no Android Account Manager
  • OutOfMemoryException no Emulador
  • O que faz com que certas classs de Android "devam" manter?
  • Android: mostrando cairtões como layout como no Google Keep
  • Ícone personalizado na bairra de ferramentas do Android
  • OkHttp Post Body como JSON
  • Android: Como você pode obter framebuffer (captura de canvas) em um dispositivo rooteado?
  • 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.