質問

I'm trying to make an android app. But I'm having many troubles with the design. I want to make a navigaton bar with a height of 48 dp on every screen. I know which height in px I have to use but I don't understand which width because every screen has another and it dosen't scale right. I just want a navigaton bar in one color with a height of 48dp and a witdh which scales to the screen so that it is from the left all way to the right with a continious height of 48dp. I hope you understand my problem if not please ask. Thanks for your time!

FOR PEOPLE WITH SAME PROBLEM:

android:scaleType="fitXY"
役に立ちましたか?

解決

The accepted answer is deprecated. Please use match_parent instead of fill_parent

他のヒント

There is one more attribute

android:gravity="fill_horizontal"

(Grow the horizontal size of the object if needed so it completely fills its container.)

FOR HELP

Try using android:layout_width="fill_parent".

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top