コード例 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            if (!ErrorReporter.HasDump())
            {
                Toast.MakeText(this, Resource.String.Vernacular_P0_error_reporting_no_dump, ToastLength.Long).Show();

                this.Finish();
                return;
            }

            SetContentView(Resource.Layout.activity_error_reporting);

            //Toolbar support
            var toolbar = this.FindViewById <global::Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            if (toolbar != null)
            {
                SetSupportActionBar(toolbar);
                SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            }
            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                FindViewById(Resource.Id.toolbar_shadow).Visibility = ViewStates.Gone;
            }

            FindViewById <TextView>(Resource.Id.text_introduction).ReloadTextAsHtml();
            FindViewById <TextView>(Resource.Id.text_information).ReloadTextAsHtml();

            FindViewById <Button>(Resource.Id.button_send).Click += HandleSendClick;
            FindViewById <Button>(Resource.Id.button_drop).Click += HandleDropClick;
        }