Last active
August 29, 2015 14:23
-
-
Save ar-android/d3b1fc63262fd13fd6a1 to your computer and use it in GitHub Desktop.
Inflate ActionBar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.text.Editable; | |
import android.text.TextWatcher; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.Toast; | |
public class MainActivity extends Activity { | |
private EditText mEditText; | |
private Button mTextView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
android.app.ActionBar actionBar = getActionBar(); | |
AdapterActionBar actionbar = new AdapterActionBar( | |
getApplicationContext()); | |
actionBar.setDisplayShowHomeEnabled(false); | |
actionBar.setCustomView(actionbar); | |
actionBar.setDisplayShowCustomEnabled(true); | |
setContentView(R.layout.activity_main); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment