private void SetUpWaveLoading(WaveLoadingView wlv) { wlv.ProgressValue = 50; wlv.SetAnimDuration(15000); wlv.SetAmplitudeRatio(35); wlv.CenterTitle = "Maghrib"; wlv.TopTitle = "-2:25"; wlv.BottomTitle = "12:35"; }
protected override void OnCreate(Bundle bundle) { RequestWindowFeature(WindowFeatures.NoTitle); base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); TextAge = FindViewById <EditText>(Resource.Id.age); TextWeight = FindViewById <EditText>(Resource.Id.weight); TextHeight = FindViewById <EditText>(Resource.Id.Height); ImgFemale = FindViewById <ImageButton>(Resource.Id.female); ImgMale = FindViewById <ImageButton>(Resource.Id.male); waveLoadingView = FindViewById <WaveLoadingView>(Resource.Id.waveloadingView); mtextLayoutAge = FindViewById <TextInputLayout>(Resource.Id.textLayoutAge); mtextLayoutWeight = FindViewById <TextInputLayout>(Resource.Id.textLayoutWeight); mtextLayoutHeight = FindViewById <TextInputLayout>(Resource.Id.textLayoutHeight); mButton = FindViewById <Button>(Resource.Id.button); TextCategory = FindViewById <TextView>(Resource.Id.textCategory); TextOfKg = FindViewById <TextView>(Resource.Id.textKg); mtextEllipobaris = FindViewById <TextView>(Resource.Id.textEllipobaris); mtextNormalWeight = FindViewById <TextView>(Resource.Id.textNormalWeight); mtextOverWeight = FindViewById <TextView>(Resource.Id.textΟverWeight); mtextObese = FindViewById <TextView>(Resource.Id.textObese); mtextInfectiousObesity = FindViewById <TextView>(Resource.Id.textInfectiousObesity); AdView adView = FindViewById <AdView>(Resource.Id.adView); AdView adView2 = FindViewById <AdView>(Resource.Id.adView2); DeleteText = FindViewById <ImageButton>(Resource.Id.deleteText); AdRequest adRequest = new AdRequest.Builder().Build(); adView.LoadAd(adRequest); AdRequest adRequest2 = new AdRequest.Builder().Build(); adView2.LoadAd(adRequest2); mtextEllipobaris.Text += " < 20"; mtextNormalWeight.Text += " 20 - 24.9"; mtextOverWeight.Text += " 25 - 29.9"; mtextObese.Text += " 30 - 34.9"; mtextInfectiousObesity.Text += " > 35"; ImgMale.Click += ImgMale_Click; ImgFemale.Click += ImgFemale_Click; mButton.Click += MButton_Click; DeleteText.Click += DeleteText_Click; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Main_1); SupportToolbar toolBar = FindViewById <SupportToolbar>(Resource.Id.toolbar); SetSupportActionBar(toolBar); SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.Title = ""; appbar = FindViewById <AppBarLayout>(Resource.Id.appbar); var metrics = Resources.DisplayMetrics; var widthInDp = ConvertPixelsToDp(metrics.WidthPixels); var heightInDp = ConvertPixelsToDp(metrics.HeightPixels); appbar.LayoutParameters.Height = (int)(metrics.HeightPixels / 2); //animation = (AnimationDrawable)appbar.Background; //animation.SetEnterFadeDuration(5000); //animation.SetExitFadeDuration(2000); //animation.Start(); FrameLayout btn_recite = FindViewById <FrameLayout>(Resource.Id.btn_recite); FrameLayout btn_listen = FindViewById <FrameLayout>(Resource.Id.btn_listen); FrameLayout btn_study = FindViewById <FrameLayout>(Resource.Id.btn_study); var width = metrics.WidthPixels; btn_recite.LayoutParameters.Width = (int)(width / 1.3); btn_listen.LayoutParameters.Width = (int)(width / 1.3); btn_study.LayoutParameters.Width = (int)(width / 1.3); CollapsingToolbarLayout collapsingToolBar = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar); collapsingToolBar.Title = ""; wlv = FindViewById <WaveLoadingView>(Resource.Id.waveLoadingView); SetUpWaveLoading(wlv); mDrawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout); NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view); // set drawer width to 3 fourth of the screen size navigationView.LayoutParameters.Width = (int)(Resources.DisplayMetrics.WidthPixels * .75); if (navigationView != null) { SetUpDrawerContent(navigationView); } //data = new DataManip(this); //dataPath = data.createDBconnection(); //Toast.MakeText(this, dataPath, ToastLength.Long).Show(); //Console.WriteLine(dataPath); //string dbCreateRes = data.createDatabase(dataPath); //Toast.MakeText(this, dbCreateRes, ToastLength.Long).Show(); //LocalDB localDB = new LocalDB() { FirstName = "AbdulVohid", LastName = "ServenatOfAllah", ID = 16012686 }; //string inserRes = await data.insertUpdateData(localDB, dataPath); //Toast.MakeText(this, inserRes, ToastLength.Long).Show(); //System.IO.StreamReader streamReader = new System.IO.StreamReader(dataPath); //string db = streamReader.ReadToEnd(); //Toast.MakeText(this, db, ToastLength.Long).Show(); //Console.WriteLine(db); }
private void InitComponent(View view) { try { ProfileImage = view.FindViewById <ImageView>(Resource.Id.Iconimage2); Username = view.FindViewById <TextView>(Resource.Id.username); WalletNumber = view.FindViewById <TextView>(Resource.Id.walletnumber); TxtUpgrade = view.FindViewById <TextView>(Resource.Id.upgradeText); XtBoostMe = view.FindViewById <TextView>(Resource.Id.tv_Boost); EditButton = view.FindViewById <CircleButton>(Resource.Id.EditButton); SettingsButton = view.FindViewById <CircleButton>(Resource.Id.SettingsButton); BoostButton = view.FindViewById <CircleButton>(Resource.Id.BoostButton); WalletButton = view.FindViewById <RelativeLayout>(Resource.Id.walletSection); PopularityButton = view.FindViewById <RelativeLayout>(Resource.Id.popularitySection); UpgradeButton = view.FindViewById <RelativeLayout>(Resource.Id.upgradeSection); FriendsButton = view.FindViewById <RelativeLayout>(Resource.Id.StFriendsLayout); FavoriteButton = view.FindViewById <RelativeLayout>(Resource.Id.StFavoriteLayout); InviteButton = view.FindViewById <RelativeLayout>(Resource.Id.StInviteFriendsLayout); BlogsButton = view.FindViewById <RelativeLayout>(Resource.Id.StBlogsLayout); HelpButton = view.FindViewById <RelativeLayout>(Resource.Id.StNeedHelpLayout); HeaderSection = view.FindViewById <LinearLayout>(Resource.Id.headerSection); MWaveLoadingView = (WaveLoadingView)view.FindViewById(Resource.Id.waveLoadingView); MWaveLoadingView.Visibility = ViewStates.Gone; BoostButton.Tag = "Off"; GlideImageLoader.LoadImage(Activity, UserDetails.Avatar, ProfileImage, ImageStyle.CircleCrop, ImagePlaceholders.Drawable); if (AppSettings.SetTabDarkTheme) { SettingsButton.SetColor(Color.Black); EditButton.SetColor(Color.Black); BoostButton.SetColor(Color.Black); } if (AppSettings.EnableAppFree) { WalletButton.Visibility = ViewStates.Invisible; UpgradeButton.Visibility = ViewStates.Invisible; } if (!AppSettings.PremiumSystemEnabled) { Activity.RunOnUiThread(() => { UpgradeButton.Visibility = ViewStates.Invisible; UpgradeButton.Enabled = false; }); } if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop) { return; } Activity.Window.ClearFlags(WindowManagerFlags.TranslucentStatus); Activity.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); Activity.Window.SetStatusBarColor(Color.ParseColor(AppSettings.MainColor)); } catch (Exception e) { Console.WriteLine(e); } }