简体   繁体   English

使用屏幕宽度缩放自定义图像标题

[英]Custom Image Title scaling with Screen-width

Im trying to make a custom Titlebar for my App, which is no more, than an Image. 我试图为我的应用制作一个自定义的标题栏,仅此而已。

Totally custom example: 完全自定义的示例: 在此处输入图片说明

My Goal is to have the Size of the Picture scale by the Screen-width of the Display. 我的目标是使图片的大小与显示器的屏幕宽度相等。

I already tried removing the TitleBar, and just placing an ImageView, but still a Titlebar, with App-Name and Icon got created... 我已经尝试删除TitleBar,只放置一个ImageView,但是仍然创建了Titlebar,并创建了App-Name和Icon ...

manifest<application>标记中设置此属性以删除标题栏

android:theme="@android:style/Theme.NoTitleBar">

Set your activity like this in manifest.xml manifest.xml这样设置您的活动

   <activity
        android:name=".YourActivity"
        android:configChanges="keyboardHidden|orientation|keyboard" // this is hide keyboard
        android:theme="@android:style/Theme.Translucent.NoTitleBar" > // hide the title bar
    </activity>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM