layout - How to align title of Activity on center or anywhere in android? -


((textview)((framelayout)((linearlayout)((viewgroup)getwindow().getdecorview()).getchildat(0)).getchildat(0)).getchildat(0)).setgravity(gravity.center); 

i have used above code aligning title of activity in center gave me error i.e. "framelayout cannot resolved type" , if removed framelayout give me same error in linearlayout. have change title bar through android.xml file adding these line:

          <application  android:label="@string/app_name">           <activity android:name=".optionsmenuact"               android:label="@string/app_name"                android:theme="@android:style/theme.translucent">           <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.launcher" />         </intent-filter>         </activity> 

now trying align according need , want increase size of title text.

how can plz me............

you'll want use custom title view this. check out question : how set custom title bar textview value dynamically in android?


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -