I am trying to get title Id of Action Bar so as to inflate color.
Trying same as undermentioned ..
actionBar = getSupportActionBar();
int titleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
TextView yourTextView = (TextView) findViewById(titleId);
actionBar.setTitle("Sign in or Create an account");
yourTextView.setTextColor(getResources().getColor(R.color.taxi_blue));
actionBar.setBackgroundDrawable(getResources().getDrawable(R.color.white));
actionBar.setDisplayShowTitleEnabled(true);
This is working great in higher version but when I try same in lower version I am getting NullPointException
I am getting exception at ..
yourTextView.setTextColor(getResources().getColor(R.color.taxi_blue));
I have used back support library for same.
Really stuck on this.
Any hint on this is appreciated.