我开发了一个Android应用程序.我使用android:background属性将图像作为背景.但是当它在方形显示器上显示时,图像会保持伸展状态.如何使Android背景适合屏幕而不拉伸?我见过许多应用程序的图像或视频都没有拉伸,但填满了Android手机的整个屏幕.
我的xml代码如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".MainActivity"
android:background="@drawable/Splash" >
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 我陷入了一个问题,我必须使用控制器打开离子框架中的特定页面.我必须转到下一页
#/tab/hotel_details/1
Run Code Online (Sandbox Code Playgroud)
当我在离子弹出窗口中单击确定按钮时
$scope.showAlert = function() {
var alertPopup = $ionicPopup.alert({
title: 'Click OK for further details',
});
alertPopup.then(function(res) {
//Go to a specific page
});
};
Run Code Online (Sandbox Code Playgroud)
我无法使用$state.go("tab.hotel_details");,因为我必须去hotel_details/1
我必须摆脱上述问题进一步开发我的应用程序.