Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin.forms 如何将kenburnseffect应用于跨平台xamarin imageview?_Xamarin.forms_Cross Platform - Fatal编程技术网

Xamarin.forms 如何将kenburnseffect应用于跨平台xamarin imageview?

Xamarin.forms 如何将kenburnseffect应用于跨平台xamarin imageview?,xamarin.forms,cross-platform,Xamarin.forms,Cross Platform,我在xamarin移动应用程序中工作。我必须在标题图像中设计并应用ken burns效果。我搜索到现在还没有找到任何解决方案?请帮助我,任何人。谢谢。如果您想在xamarin.android中应用kenburneffect,您可以查看以下步骤: 首先,您需要安装Xamarin.kenBurnsView,然后在android中使用它 <?xml version="1.0" encoding="utf-8"?> android:layout\u width=“match\u pa

我在xamarin移动应用程序中工作。我必须在标题图像中设计并应用ken burns效果。我搜索到现在还没有找到任何解决方案?请帮助我,任何人。谢谢。

如果您想在xamarin.android中应用kenburneffect,您可以查看以下步骤:

首先,您需要安装Xamarin.kenBurnsView,然后在android中使用它

<?xml version="1.0" encoding="utf-8"?>

android:layout\u width=“match\u parent” android:layout\u height=“match\u parent”>

protectedoverride void OnCreate(Bundle savedInstanceState)
{        
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.layout12);
var kenburnimage=findviewbyd(Resource.Id.kenBurnsView1);
FindViewById(Resource.Id.button1)。单击+=委托{kenburnimage.Resume();};
FindViewById(Resource.Id.button2)。单击+=委托{kenburnimage.Pause();};
}

通过我的搜索,我只找到了在Android中使用kenburnview的方法,没有找到在Xamarin.formsyes中使用它的方法。。这是否适用于xamarin?我需要在xamarin表单中集成android和ios。
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.flaviofaria.kenburnsview.KenBurnsView 
    android:id="@+id/kenBurnsView1" 
    android:layout_width="match_parent"
    android:layout_height="match_parent" 
    android:src="@drawable/a11" />
<LinearLayout 
    android:layout_width="match_parent"
    android:layout_height="wrap_content" 
    android:orientation="horizontal" 
    android:layout_alignParentBottom="true" 
    android:weightSum="2">

    <Button android:id="@+id/button1" android:text="resume" 
            android:layout_width="0dp" 
            android:layout_height="wrap_content" 
            android:layout_weight="1" />
    <Button android:id="@+id/button2" android:text="pause" 
            android:layout_width="0dp" 
            android:layout_height="wrap_content" 
            android:layout_weight="1" />

</LinearLayout>
  protected override void OnCreate(Bundle savedInstanceState)
    {        

        base.OnCreate(savedInstanceState);
        SetContentView(Resource.Layout.layout12);


        var kenburnimage = FindViewById<KenBurnsView>(Resource.Id.kenBurnsView1);
        FindViewById<Button>(Resource.Id.button1).Click += delegate { kenburnimage.Resume(); };

        FindViewById<Button>(Resource.Id.button2).Click += delegate { kenburnimage.Pause(); };


    }