| | |
| | | { |
| | | protected override void OnCreate(Bundle savedInstanceState) |
| | | { |
| | | base.OnCreate(savedInstanceState); |
| | | |
| | | // Create your application here |
| | | SetContentView(Resource.Layout.activity_splash); |
| | | |
| | | Android.Widget.TextView tvPrivacyPolicy = FindViewById<Android.Widget.TextView>(Resource.Id.privacy_policy_btn); |
| | | Android.Widget.TextView tvServiceAgreement = FindViewById<Android.Widget.TextView>(Resource.Id.service_agreement_btn); |
| | | |
| | | Android.Widget.Button btnDisagree = FindViewById<Android.Widget.Button>(Resource.Id.disagree_btn); |
| | | Android.Widget.Button btnAgree = FindViewById<Android.Widget.Button>(Resource.Id.agree_btn); |
| | | |
| | | tvPrivacyPolicy.Click += (sender, e) => |
| | | try |
| | | { |
| | | Intent i = new Intent(this, typeof(WebviewActivity)); |
| | | base.OnCreate(savedInstanceState); |
| | | |
| | | i.PutExtra("url", HDL_ON.Constant.URL_PRIVACYPOLICY); |
| | | StartActivity(i); |
| | | Intent data = new Intent(); |
| | | data.PutExtra("data", "disagree"); |
| | | SetResult(Result.Canceled, Intent); |
| | | }; |
| | | tvServiceAgreement.Click += (sender, e) => |
| | | // Create your application here |
| | | SetContentView(Resource.Layout.activity_splash); |
| | | |
| | | Android.Widget.TextView tvPrivacyPolicy = FindViewById<Android.Widget.TextView>(Resource.Id.privacy_policy_btn); |
| | | Android.Widget.TextView tvServiceAgreement = FindViewById<Android.Widget.TextView>(Resource.Id.service_agreement_btn); |
| | | |
| | | Android.Widget.Button btnDisagree = FindViewById<Android.Widget.Button>(Resource.Id.disagree_btn); |
| | | Android.Widget.Button btnAgree = FindViewById<Android.Widget.Button>(Resource.Id.agree_btn); |
| | | |
| | | tvPrivacyPolicy.Click += (sender, e) => |
| | | { |
| | | Intent i = new Intent(this, typeof(WebviewActivity)); |
| | | |
| | | i.PutExtra("url", HDL_ON.Constant.URL_PRIVACYPOLICY); |
| | | StartActivity(i); |
| | | Intent data = new Intent(); |
| | | data.PutExtra("data", "disagree"); |
| | | SetResult(Result.Canceled, Intent); |
| | | }; |
| | | tvServiceAgreement.Click += (sender, e) => |
| | | { |
| | | Intent i = new Intent(this, typeof(WebviewActivity)); |
| | | |
| | | i.PutExtra("url", HDL_ON.Constant.URL_USERAGREEMENT); |
| | | |
| | | StartActivity(i); |
| | | Intent data = new Intent(); |
| | | data.PutExtra("data", "disagree"); |
| | | SetResult(Result.Canceled, Intent); |
| | | }; |
| | | btnDisagree.Click += (sender, e) => |
| | | { |
| | | //Java.Lang.JavaSystem.Exit(0); |
| | | FinishAffinity(); |
| | | }; |
| | | btnAgree.Click += (sender, e) => |
| | | { |
| | | OnAppConfig.Instance.isAgreePrivacyPolicy = true; |
| | | OnAppConfig.Instance.FirstRunApp = false; |
| | | OnAppConfig.Instance.SaveConfig(); |
| | | |
| | | Intent data = new Intent(); |
| | | data.PutExtra("data", "agree"); |
| | | SetResult(Result.Ok, Intent); |
| | | Finish(); |
| | | }; |
| | | }catch(Exception ex) |
| | | { |
| | | Intent i = new Intent(this, typeof(WebviewActivity)); |
| | | Console.WriteLine("AgreementActivity----------------------------1"+ex.Message); |
| | | |
| | | i.PutExtra("url",HDL_ON.Constant.URL_USERAGREEMENT); |
| | | |
| | | StartActivity(i); |
| | | Intent data = new Intent(); |
| | | data.PutExtra("data", "disagree"); |
| | | SetResult(Result.Canceled, Intent); |
| | | }; |
| | | btnDisagree.Click += (sender, e) => |
| | | { |
| | | //Java.Lang.JavaSystem.Exit(0); |
| | | FinishAffinity(); |
| | | }; |
| | | btnAgree.Click += (sender, e) => |
| | | { |
| | | OnAppConfig.Instance.isAgreePrivacyPolicy = true; |
| | | OnAppConfig.Instance.FirstRunApp = false; |
| | | OnAppConfig.Instance.SaveConfig(); |
| | | |
| | | Intent data = new Intent(); |
| | | data.PutExtra("data", "agree"); |
| | | SetResult(Result.Ok, Intent); |
| | | Finish(); |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | } |