1
我为该布局创建了布局和活动。我的ImageView没有出现在我的设备屏幕上
在布局中,我只有一个带有位于资源/绘图中的PNG图像的ImageView。
当我在我的设备中启动应用程序时,ImageView没有出现在屏幕上。
这是我的XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="25px"
android:minHeight="25px"
android:gravity="center"
android:visibility="visible"
tools:visibility="visible">
<ImageView
android:layout_width="350.0dp"
android:layout_height="279.5dp"
android:id="@+id/OpeningLogo"
android:layout_gravity="center"
android:visibility="visible"
tools:visibility="visible"
android:src="@drawable/logo"
android:adjustViewBounds="true" />
</LinearLayout>
这是活动代码:
namespace *********
{
[Activity(Label = "xxxxxxxxx", MainLauncher = true, Icon = "@drawable/Logo")]
public class OpeningActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Opening);
Intent GoToLogin = new Intent(this, typeof(MainActivity));
Thread.Sleep(5000);
this.Finish();
StartActivity(GoToLogin);
}
}
}
如果你要我把更多的东西告诉我。
在此先感谢!
谢谢!帮了很多。 NoHistory也将在未来提供帮助。 – Diorrini11