Android Place A Textview Over Application Title
Is it possible to place a textbox over the application title bar? like in xcode, it is possible to place a textbox anywhere I guess using absolute positioning... The aim is to put
Solution 1:
Please try with the below one.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.main);
if ( customTitleSupported ) {
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);
}
final TextView myTitleText = (TextView) findViewById(R.id.myTitle);
if ( myTitleText != null ) {
myTitleText.setText("MY TITLE");
}
}
Post a Comment for "Android Place A Textview Over Application Title"