Beispiel #1
0
		public PhotosElement (TimelineViewController timeline, int rowIndex) : base("")
		{
			_Timeline = timeline;
			_RowIndex = rowIndex;
		}
		private void CreateMediaView(int pos, string title, HorizontalScrollView hsv)
		{
			float width = UIScreen.MainScreen.Bounds.Width;
			float topY = 42;
			SizeF size = new SizeF(width, 480 - topY);

			var rootElement = new RootElement (title) { UnevenRows = true };
			var section = new Section(GetSubTitle(LocType, pos));
			rootElement.Add(section);

			FilterType filter = GetFilter(pos);

			var mediaView = new TimelineViewController(filter, true, _MSP, this) { Root = rootElement, };
		 	mediaView.View.Frame = new System.Drawing.RectangleF(new PointF((pos - 1)* width, 0),  size);
			hsv.Add(mediaView.View);
			mediaViews.Add(mediaView);
		}
Beispiel #3
0
		private void Initialize()
		{
			LocType = LocalisationType.Global;
			
			float width = UIScreen.MainScreen.Bounds.Width;
			float topY = 40;
			var size = new SizeF(width, 480 - topY);
			
			var likedRootElement = new RootElement ("recent") { UnevenRows = true };
			var likedSection = new Section("recent posts worldwide");
			likedRootElement.Add(likedSection);
			
			likedMediaView = new TimelineViewController(FilterType.Liked, true, Nav, this) 
			{ 
				Root = likedRootElement, 
				ShowLoadMorePhotos = false,				
			};
			
			likedMediaView.TableView.BackgroundView = new UIImageView(Graphics.GetImgResource("pagedegarde"));
			likedMediaView.View.Frame = new System.Drawing.RectangleF(new PointF(0, topY),  size);
			this.Add(likedMediaView.View);
			
			var bottomPanel = new UIView(new RectangleF(0, View.Bounds.Height - 48, width, 48));
			//bottomPanel.DrawBorder(UIColor.LightGray);
			bottomPanel.BackgroundColor = UIColor.White;
			
			UIButton createAccountBtn = UIButton.FromType (UIButtonType.RoundedRect);
			createAccountBtn.Frame = new RectangleF(4, 2, 120, 44);
			createAccountBtn.SetTitleColor(UIColor.LightGray, UIControlState.Normal);
			createAccountBtn.SetTitle("create account", UIControlState.Normal);
			createAccountBtn.TouchUpInside += HandleCreateAccountBtnTouchDown;
			
			UIButton signInBtn = UIButton.FromType (UIButtonType.RoundedRect);
			signInBtn.Frame = new RectangleF(128, 2, 60, 44);
			signInBtn.SetTitleColor(UIColor.LightGray, UIControlState.Normal);
			signInBtn.SetTitle("sign in", UIControlState.Normal);
			signInBtn.TouchUpInside += HandleSignInBtnTouchDown;			
			
			UIButton signInWithFacebookBtn = UIButton.FromType (UIButtonType.RoundedRect);
			float w = 320 - 192 - 4;
			signInWithFacebookBtn.Frame = new RectangleF(192, 2, w, 44);
			signInWithFacebookBtn.SetTitleColor(UIColor.LightGray, UIControlState.Normal);			
			signInWithFacebookBtn.ImageEdgeInsets = new UIEdgeInsets(5, w - 26 - 5, 5, 5);
			signInWithFacebookBtn.TitleEdgeInsets = new UIEdgeInsets(0, - 26, 0, 26 + 5);					
			
			signInWithFacebookBtn.SetTitle("sign in with", UIControlState.Normal);
			signInWithFacebookBtn.SetImage(Graphics.GetImgResource("logo_FB"), UIControlState.Normal);
			signInWithFacebookBtn.TouchUpInside += HandleSignInWithFacebookBtnTouchDown;
									
			bottomPanel.Add(createAccountBtn);
			bottomPanel.Add(signInBtn);
			bottomPanel.Add(signInWithFacebookBtn);
			this.View.Add(bottomPanel);
			
			var imgViesw = new UIImageView(UIImage.FromBundle("Images/Icon"));
			imgViesw.Frame = new RectangleF((320 - 26)/2, (topY - 26) / 2, 26, 26);
			this.Add(imgViesw);
		}
		private void Initialize()
		{
			LocType = LocalisationType.Global;
			
			float width = UIScreen.MainScreen.Bounds.Width;
			float topY = 40;
			var size = new SizeF(width, 480 - topY);
			
			var likedRootElement = new RootElement ("album") { UnevenRows = true };
			var likedSection = new Section(album.Title);
			likedRootElement.Add(likedSection);			
			
			likedMediaView = new TimelineViewController(FilterType.Liked, true, Nav, this) 
			{ 
				Root = likedRootElement, 
				ShowLoadMorePhotos = false,				
			};
			
			likedMediaView.View.Frame = new System.Drawing.RectangleF(new PointF(0, topY),  size);
			this.Add(likedMediaView.View);
		}