using System;
using UnityEngine;
using UnityEngine.UI;

public class ScrollViewCtl : MonoBehaviour
{
  
    public RectTransform bannerImage;
    public RectTransform horizontalSlider;
    public float HideFactor = 0.3f;
    // Start is called before the first frame update
    void Start()
    {
        
    }
    void OnValueChanged(int value)
    {
    
        horizontalSlider.anchoredPosition = new Vector2(0, 0);
      
    }
  

    
    public void clcikBanner()
    {
        CallAndroidMethod("showMainActivity", true, "clickbanner");
    }
    private void CallAndroidMethod(string methodName, bool isFinish, string data)
    {
#if UNITY_ANDROID
        try
        {
            AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
            jo.Call(methodName, isFinish, data);
        }
        catch (Exception e)
        {
            Debug.LogError(e.Message);
        }
#endif
    }

}
