void EtietleriYerlestir()
        {
            var normaltypeface = Typeface.CreateFromAsset(this.Assets, "Fonts/muliRegular.ttf");

            TextHazneLinear.RemoveAllViews();
            var ElliDP      = DPX.dpToPx(this, 50);
            var PaddingSize = DPX.dpToPx(this, 8);

            for (int i = 0; i < HazirMesaklarDTO1.Count; i++)
            {
                var EtiketLabel = new TextView(this)
                {
                    Id = IsimIcinTextId
                };
                EtiketLabel.Text = HazirMesaklarDTO1[i].name;
                EtiketLabel.SetTextColor(Color.White);
                EtiketLabel.TextAlignment = TextAlignment.Center;
                EtiketLabel.Gravity       = GravityFlags.Center | GravityFlags.CenterHorizontal | GravityFlags.CenterVertical;
                EtiketLabel.TextSize      = 14f;
                var param = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
                param.RightMargin = 10;
                EtiketLabel.SetPadding(PaddingSize, PaddingSize, PaddingSize, PaddingSize);
                EtiketLabel.SetBackgroundResource(Resource.Drawable.custombuton);
                EtiketLabel.Tag    = i;
                EtiketLabel.Click += EtiketLabel_Click;
                EtiketLabel.SetTypeface(normaltypeface, TypefaceStyle.Normal);
                TextHazneLinear.AddView(EtiketLabel, param);
            }
        }
Exemple #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.PublicProfileBaseActivity);
            DinamikStatusBarColor1.SetFullScreen(this);
            FindViewById <LinearLayout>(Resource.Id.rootView).SetPadding(0, 0, 0, DinamikStatusBarColor1.getSoftButtonsBarSizePort(this));
            pagerhazne                     = FindViewById <RelativeLayout>(Resource.Id.pagerhazne);
            _viewpageer                    = FindViewById <ViewPager>(Resource.Id.viewPager1);
            GeriButton                     = FindViewById <ImageButton>(Resource.Id.geributton);
            KullaniciAdiYasi               = FindViewById <TextView>(Resource.Id.textView);
            HakkindaYazisi                 = FindViewById <TextView>(Resource.Id.textView3);
            EnSonLokasyonu                 = FindViewById <TextView>(Resource.Id.textView5);
            MesajAtButton                  = FindViewById <ImageButton>(Resource.Id.ımageButton4);
            FollowButton                   = FindViewById <ImageView>(Resource.Id.ımageView1);
            FollowButton.Click            += FollowButton_Click;
            MesajAtButton.Click           += MesajAtButton_Click;
            GeriButton.Click              += GeriButton_Click;
            Engelle                        = FindViewById <TextView>(Resource.Id.engelle);
            Engelle.Click                 += Engelle_Click;
            _viewpageer.OffscreenPageLimit = 20;

            var Pix1   = DPX.dpToPx(this, 50);
            var mevcut = pagerhazne.GetY();
            var yeniy  = mevcut - Pix1;

            pagerhazne.SetY(yeniy);
            pagerhazne.ClipToOutline = true;
            _indicator            = FindViewById <LinePageIndicator>(Resource.Id.indicator);
            KullaniciAdiYasi.Text = "";
            HakkindaYazisi.Text   = "";
            EnSonLokasyonu.Text   = "";
        }
        void LokasyondakiKisileriGetir()
        {
            #region Genislik Alır
            Display display = this.Activity.WindowManager.DefaultDisplay;
            Point   size    = new Point();
            display.GetSize(size);
            int width    = size.X;
            int height   = size.Y;
            var Genislik = width / 3;
            #endregion
            WebService         webService = new WebService();
            var                Donus      = webService.OkuGetir("users/location/" + SecilenLokasyonn.LokID + "/waiting");
            var                Donus2     = webService.OkuGetir("users/location/" + SecilenLokasyonn.LokID + "/online");
            List <MEMBER_DATA> List1      = new List <MEMBER_DATA>();
            List <MEMBER_DATA> List2      = new List <MEMBER_DATA>();
            List <MEMBER_DATA> Toplanmis  = new List <MEMBER_DATA>();
            var                MEDID      = DataBase.MEMBER_DATA_GETIR()[0].id;

            if (Donus != null)
            {
                List1 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus.ToString());
            }
            if (Donus2 != null)
            {
                List2 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus2.ToString());
            }

            var l2 = List2.ToList();

            List1.AddRange(l2);

            UserGallery1 = new List <MEMBER_DATA>();
            UserGallery1 = List1.Where(p => p.id != -1).GroupBy(p => p.id).Select(grp => grp.FirstOrDefault()).ToList();

            if (UserGallery1.Count > 0)
            {
                this.Activity.RunOnUiThread(() => {
                    var MeId = DataBase.MEMBER_DATA_GETIR()[0].id;
                    FilterUsers();
                    SuperBoostKullaniminaGoreSirala();
                    UserGallery1 = UserGallery1.FindAll(item => item.id != MeId);
                    var boldd    = Typeface.CreateFromAsset(this.Activity.Assets, "Fonts/muliBold.ttf");
                    var normall  = Typeface.CreateFromAsset(this.Activity.Assets, "Fonts/muliRegular.ttf");
                    mViewAdapter = new GaleriRecyclerViewAdapter(UserGallery1, (Android.Support.V7.App.AppCompatActivity) this.Activity, Genislik, normall, boldd);
                    mRecyclerView.SetAdapter(mViewAdapter);
                    mViewAdapter.ItemClick += MViewAdapter_ItemClick;
                    StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.Vertical);
                    var pix = DPX.dpToPx(this.Activity, 15);
                    mRecyclerView.AddItemDecoration(new SpacesItemDecoration(pix, this.Activity));
                    mRecyclerView.SetLayoutManager(layoutManager);
                    ShowLoading.Hide();
                });
            }
            else
            {
                AlertHelper.AlertGoster("Henüz bu lokasyonda kimse yok...", this.Activity);
                ShowLoading.Hide();
            }
        }
Exemple #4
0
 public override void OnActivityCreated(Bundle savedInstanceState)
 {
     Dialog.Window.RequestFeature(WindowFeatures.NoTitle);
     base.OnActivityCreated(savedInstanceState);
     Dialog.Window.Attributes.WindowAnimations = Resource.Style.dialog_animation3;
     Dialog.Window.SetLayout(ViewGroup.LayoutParams.MatchParent, DPX.dpToPx(this.Activity, 460));
     Dialog.Window.SetGravity(GravityFlags.FillHorizontal | GravityFlags.CenterHorizontal | GravityFlags.CenterVertical);
 }
Exemple #5
0
 public override void OnStart()
 {
     base.OnStart();
     if (!Actinmi)
     {
         Dialog.Window.SetLayout(ViewGroup.LayoutParams.MatchParent, DPX.dpToPx(this.Activity, 600));
         Dialog.Window.SetGravity(GravityFlags.FillHorizontal | GravityFlags.CenterHorizontal | GravityFlags.CenterVertical);
         SoketeGirisYap();
         Actinmi = true;
     }
 }
Exemple #6
0
 public override void GetItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
 {
     if (parent.GetChildLayoutPosition(view) == 1)
     {
         var pix = DPX.dpToPx(GelenBase, 90);
         outRect.Top = pix - space;
     }
     else
     {
         outRect.Top = space;
     }
     outRect.Bottom = space;
 }
Exemple #7
0
        void MarginleriSifirla(int Tagg)
        {
            SecilenPaketTag = Tagg;

            var UcMargin = DPX.dpToPx(this.Activity, 3);
            var OnMargin = DPX.dpToPx(this.Activity, 20);

            var PlusParams = ((LinearLayout.LayoutParams)PlusCard.LayoutParameters);

            PlusParams.SetMargins(UcMargin, OnMargin, UcMargin, UcMargin);

            var GoldParams = ((LinearLayout.LayoutParams)GoldCard.LayoutParameters);

            GoldParams.SetMargins(UcMargin, OnMargin, UcMargin, UcMargin);

            var PlatinumParams = ((LinearLayout.LayoutParams)PlatinumCard.LayoutParameters);

            PlatinumParams.SetMargins(UcMargin, OnMargin, UcMargin, UcMargin);

            switch (Tagg)
            {
            case 0:
                PlusParams.SetMargins(UcMargin, UcMargin, UcMargin, 0);
                break;

            case 1:
                GoldParams.SetMargins(UcMargin, UcMargin, UcMargin, 0);
                break;

            case 2:
                PlatinumParams.SetMargins(UcMargin, UcMargin, UcMargin, 0);
                break;

            default:
                break;
            }

            ((ViewGroup)PlusCard).LayoutTransition.EnableTransitionType(Android.Animation.LayoutTransitionType.Changing);
            ((ViewGroup)GoldCard).LayoutTransition.EnableTransitionType(Android.Animation.LayoutTransitionType.Changing);
            ((ViewGroup)PlatinumCard).LayoutTransition.EnableTransitionType(Android.Animation.LayoutTransitionType.Changing);
            PlusCard.LayoutParameters     = PlusParams;
            GoldCard.LayoutParameters     = GoldParams;
            PlatinumCard.LayoutParameters = PlatinumParams;
        }
        private void LeftViewArrowButton_Click(object sender, EventArgs e)
        {
            int END_WIDTH = 0;

            if (!LeftViewSonDurum)
            {
                END_WIDTH        = DPX.dpToPx(this, 155);
                LeftViewSonDurum = true;
                LeftViewArrowButton.SetImageResource(Resource.Drawable.right_arrow);
            }
            else
            {
                END_WIDTH        = DPX.dpToPx(this, 0);
                LeftViewSonDurum = false;
                LeftViewArrowButton.SetImageResource(Resource.Drawable.left_arrow);
            }
            ValueAnimator anim = ValueAnimator.OfInt(((View)LeftViewHaznee).MeasuredWidth, END_WIDTH);

            anim.AddUpdateListener(this);
            anim.SetDuration(300);
            anim.Start();
        }