Exemplo n.º 1
0
        private void GetCompanyInfo()
        {
            ISharedPreferences app = Application.Context.GetSharedPreferences("AppData", FileCreationMode.Private);
            var company            = app.GetString("Company", string.Empty);
            var location           = app.GetString("Location", string.Empty);
            var phone1             = app.GetString("Phone1", string.Empty);
            var phone2             = app.GetString("Phone2", string.Empty);
            var email     = app.GetString("Email", string.Empty);
            var thumbnail = app.GetString("Thumbnail", string.Empty);

            mCompany.Text  = company;
            mLocation.Text = location;
            mPhoneNo1.Text = phone1;
            mPhoneNo2.Text = phone2;
            mEmail.Text    = email;

            Glide.With(this).Load(thumbnail)
            .Apply(RequestOptions.OverrideOf(600, 600).FitCenter())
            .Apply(RequestOptions.PlaceholderOf(Resource.Drawable.placeholder).FitCenter())
            .Transition(DrawableTransitionOptions.WithCrossFade())
            .Into(mImageThumb);

            mFab.Click += (o, s) =>
            {
                CallUs(phone1, phone2);
            };
        }
Exemplo n.º 2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            View view = inflater.Inflate(Resource.Layout.order_done, container, false);

            Button    mFAQ     = view.FindViewById <Button>(Resource.Id.btnfaq);
            Button    mInfo    = view.FindViewById <Button>(Resource.Id.btnInfo);
            ImageView mPayInfo = view.FindViewById <ImageView>(Resource.Id.imageView);
            Button    mMore    = view.FindViewById <Button>(Resource.Id.btnReadMore);

            mMore.Click += MMore_Click;

            mPayInfo.SetScaleType(ImageView.ScaleType.FitXy);

            Glide.With(this).Load(Thumbnail)
            .Apply(RequestOptions.OverrideOf(400, 400).FitCenter())
            .Apply(RequestOptions.PlaceholderOf(Resource.Drawable.placeholder).FitCenter())
            .Transition(DrawableTransitionOptions.WithCrossFade())
            .Into(mPayInfo);

            mFAQ.Click += (o, s) =>
            {
                FAQ();
            };
            mInfo.Click += (o, s) =>
            {
                Information();
            };

            CircleImageView mPesa     = view.FindViewById <CircleImageView>(Resource.Id.mpesa);
            CircleImageView mTigoPesa = view.FindViewById <CircleImageView>(Resource.Id.tigopesa);
            CircleImageView mHalopesa = view.FindViewById <CircleImageView>(Resource.Id.halopesa);
            CircleImageView mAirtel   = view.FindViewById <CircleImageView>(Resource.Id.airtelmoney);
            CircleImageView mTpesa    = view.FindViewById <CircleImageView>(Resource.Id.tpesa);
            CircleImageView mZantel   = view.FindViewById <CircleImageView>(Resource.Id.zantel);

            Glide.With(this).Load(Resource.Drawable.mpesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mPesa);
            Glide.With(this).Load(Resource.Drawable.tigopesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mTigoPesa);
            Glide.With(this).Load(Resource.Drawable.halopesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mHalopesa);
            Glide.With(this).Load(Resource.Drawable.airtelmoney).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mAirtel);
            Glide.With(this).Load(Resource.Drawable.tpesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mTpesa);
            Glide.With(this).Load(Resource.Drawable.easymoney).Apply(RequestOptions.OverrideOf(90, 150).CenterInside()).Into(mZantel);

            mPesa.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionCall,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", Android.Net.Uri.Encode(telephone))));
                StartActivity(phone);
            };
            mTigoPesa.Click += (o, s) =>
            {
                string telephone = "*150*011#";
                var    phone     = new Intent(Intent.ActionCall,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", Android.Net.Uri.Encode(telephone))));
                StartActivity(phone);
            };
            mHalopesa.Click += (o, s) =>
            {
                string telephone = "*150*88#";
                var    phone     = new Intent(Intent.ActionCall,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", Android.Net.Uri.Encode(telephone))));
                StartActivity(phone);
            };
            mAirtel.Click += (o, s) =>
            {
                string telephone = "*150*60#";
                var    phone     = new Intent(Intent.ActionCall,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", Android.Net.Uri.Encode(telephone))));
                StartActivity(phone);
            };
            mTpesa.Click += (o, s) =>
            {
                string telephone = "*150*71#";
                var    phone     = new Intent(Intent.ActionCall,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", Android.Net.Uri.Encode(telephone))));
                StartActivity(phone);
            };
            mZantel.Click += (o, s) =>
            {
                string telephone = "*150*02#";
                var    phone     = new Intent(Intent.ActionCall,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", Android.Net.Uri.Encode(telephone))));
                StartActivity(phone);
            };

            return(view);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            ISharedPreferences app = Application.Context.GetSharedPreferences("AppData", FileCreationMode.Private);

            _lang     = app.GetString("Language", "en");
            Thumbnail = app.GetString("Payment", string.Empty);
            ChangeLanguage(_lang);

            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.order_done);

            Button    mFAQ     = FindViewById <Button>(Resource.Id.btnfaq);
            Button    mInfo    = FindViewById <Button>(Resource.Id.btnInfo);
            ImageView mPayInfo = FindViewById <ImageView>(Resource.Id.imageView);
            Button    mMore    = FindViewById <Button>(Resource.Id.btnReadMore);

            mMore.Click += MMore_Click;
            Glide.With(this).Load(Thumbnail)
            .Apply(RequestOptions.OverrideOf(400, 400).FitCenter())
            .Apply(RequestOptions.PlaceholderOf(Resource.Drawable.placeholder).FitCenter())
            .Transition(DrawableTransitionOptions.WithCrossFade())
            .Into(mPayInfo);

            mFAQ.Click += (o, s) =>
            {
                FAQ();
            };
            mInfo.Click += (o, s) =>
            {
                Information();
            };

            CircleImageView mPesa     = FindViewById <CircleImageView>(Resource.Id.mpesa);
            CircleImageView mTigoPesa = FindViewById <CircleImageView>(Resource.Id.tigopesa);
            CircleImageView mHalopesa = FindViewById <CircleImageView>(Resource.Id.halopesa);
            CircleImageView mAirtel   = FindViewById <CircleImageView>(Resource.Id.airtelmoney);
            CircleImageView mTpesa    = FindViewById <CircleImageView>(Resource.Id.tpesa);
            CircleImageView mZantel   = FindViewById <CircleImageView>(Resource.Id.zantel);

            Glide.With(this).Load(Resource.Drawable.mpesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mPesa);
            Glide.With(this).Load(Resource.Drawable.tigopesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mTigoPesa);
            Glide.With(this).Load(Resource.Drawable.halopesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mHalopesa);
            Glide.With(this).Load(Resource.Drawable.airtelmoney).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mAirtel);
            Glide.With(this).Load(Resource.Drawable.tpesa).Apply(RequestOptions.OverrideOf(90, 90).CenterInside()).Into(mTpesa);
            Glide.With(this).Load(Resource.Drawable.easymoney).Apply(RequestOptions.OverrideOf(90, 150).CenterInside()).Into(mZantel);

            mPesa.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionView,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", telephone)));
                StartActivity(phone);
            };
            mTigoPesa.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionView,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", telephone)));
                StartActivity(phone);
            };
            mHalopesa.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionView,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", telephone)));
                StartActivity(phone);
            };
            mAirtel.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionView,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", telephone)));
                StartActivity(phone);
            };
            mTpesa.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionView,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", telephone)));
                StartActivity(phone);
            };
            mZantel.Click += (o, s) =>
            {
                string telephone = "*150*00#";
                var    phone     = new Intent(Intent.ActionView,
                                              Android.Net.Uri.Parse(string.Format("tel:{0}", telephone)));
                StartActivity(phone);
            };
        }