android - Customized ActionBar yields different layout views -


i creating application customized actionbar. different screen resolutions, got different views. trying fix had no ways implement solution.

this layout emulator 480 x 800 resolution (hdpi):

enter image description here

on other hand, output emulator 720 x 1280 (xhdpi) same codes:

enter image description here

as can see, icon settings displayed on upper right corner. default? possible means remove , display correct , expected layout got hdpi layout?

by way, here's xml code customized actionbar:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="wrap_content" >      <relativelayout         android:id="@+id/top_line_1"         android:layout_width="fill_parent"         android:layout_height="1dip" >          <view             android:layout_width="fill_parent"             android:layout_height="1dip"             android:background="#8284a3" />     </relativelayout>      <relativelayout         android:id="@+id/top_line_2"         android:layout_width="fill_parent"         android:layout_height="1dip"         android:layout_below="@+id/top_line_1" >          <view             android:layout_width="fill_parent"             android:layout_height="1dip"             android:background="#6e7095" />     </relativelayout>      <relativelayout         android:id="@+id/main_action_bar"         android:layout_width="fill_parent"         android:layout_height="45dp"         android:layout_below="@+id/top_line_2"         android:background="@drawable/ab_solid_iformula"         android:paddingleft="5dp"         android:paddingright="5dp"         android:paddingbottom="7dp"         android:paddingtop="6dp" >          <button             android:id="@+id/main_top_left_button"             android:layout_width="wrap_content"             android:layout_height="fill_parent"             android:layout_alignparentleft="true"             android:layout_centervertical="true"             android:background="@drawable/rounded_nav_button"             android:minwidth="50dp"             android:paddingleft="6dp"             android:paddingright="6dp"             android:paddingbottom="6dp"             android:paddingtop="3dp"             android:text="@string/iformula_top_btn_add"             android:textcolor="#ffffff"             android:textsize="12sp" />          <button             android:id="@+id/main_top_right_button"             android:layout_width="wrap_content"             android:layout_height="fill_parent"             android:layout_alignparentright="true"             android:layout_centervertical="true"             android:background="@drawable/rounded_nav_button"             android:minwidth="50dp"             android:paddingleft="6dp"             android:paddingright="6dp"             android:paddingbottom="6dp"             android:paddingtop="3dp"             android:text="@string/iformula_top_btn_edit"             android:textcolor="#ffffff"             android:textsize="12sp" />          <textview             android:id="@+id/main_top_navigation_title"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_alignbaseline="@+id/main_top_right_button"             android:layout_alignbottom="@+id/main_top_right_button"             android:layout_centerhorizontal="true"             android:text="@string/app_name"             android:textcolor="#ffffff"             android:textsize="18sp"             android:textstyle="bold" />      </relativelayout>      <relativelayout         android:id="@+id/below_line"         android:layout_width="fill_parent"         android:layout_height="1dip"         android:layout_below="@+id/main_action_bar" >          <view             android:layout_width="fill_parent"             android:layout_height="1dip"             android:background="#00103d" />     </relativelayout>  </relativelayout> 

again, how remove icon settings? need same output hdpi.

it's not resolution type of device you're picking. overflow icon appears on phones have no menu hardware keys. more information can found here.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -