forked from syncfusion/xamarin-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NavigationDrawer.cs
1637 lines (1457 loc) · 82.3 KB
/
NavigationDrawer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#region Copyright Syncfusion Inc. 2001-2022.
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// [email protected]. Any infringement will be prosecuted under
// applicable laws.
using Android.Util;
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Graphics;
using Com.Syncfusion.Navigationdrawer;
namespace SampleBrowser
{
[Activity(Label = "NavigationDrawer")]
public class NavigationDrawer : SamplePage
{
/*********************************
**Local Variable Inizialisation**
*********************************/
LinearLayout inboxLayout, mail1, mail2, mail3, mail4, mail9, mail10, mail11,mail18, mail19, mail20;
LinearLayout secondaryDrawerLayout, Item1, Item2, Item3, Item4, Item5, Item6, Item7;
LinearLayout ItemLayout1, ItemLayout2, ItemLayout3, ItemLayout4, ItemLayout5, ItemLayout6, ItemLayout7;
LinearLayout.LayoutParams layoutParams5, layoutParams,layoutParamsSecondaryDrawer;
SeparatorView separatorView1, separatorView2, separatorView3, separatorView4, separatorView5, separatorView6, separatorView7;
SeparatorView labelSeparator4, labelSeparator3, labelSeparator5;
SeparatorView labelSeparator6, labelSeparator7, labelSeparator8, labelSeparator9,labelSeparator18, labelSeparator19, labelSeparator20;
LinearLayout outboxlayout, mail12, mail13, mail14, mail15, mail16, mail17;
LinearLayout mail5, mail6, profilelayout, linear2;
SeparatorView labelSeparator10, labelSeparator11, labelSeparator12, labelSeparator13;
SeparatorView labelSeparator14, labelSeparator15, labelSeparator16, labelSeparator17;
Button iconbutton,iconbutton1;
ListView viewItem;
SfNavigationDrawer slideDrawer;
DrawerSettings drawerSettings;
LinearLayout propertylayout;
ArrayAdapter<String> dataAdapter, dataAdapter1, arrayAdapter, dataAdapter2, dataAdapter3;
Spinner positionSpinner,positionSpinner1, animationSpinner, animationSpinner1;
Position sliderposition = Position.Left,sliderposition1 = Position.Right;
Transition sliderTransition = Transition.SlideOnTop,sliderTransition1 = Transition.SlideOnTop;
Context context;
int height, width;
double actionBarHeight;
TextView profileContentLabel;
FrameLayout ContentFrame;
ScrollView textScroller,textScroller1, textScroller2;
public override void OnApplyChanges()
{
base.OnApplyChanges();
slideDrawer.Position = sliderposition;
slideDrawer.Transition = sliderTransition;
slideDrawer.SecondaryDrawerSettings.Position = sliderposition1;
slideDrawer.SecondaryDrawerSettings.Transition = sliderTransition1;
}
public override View GetPropertyWindowLayout(Context context)
{
int width = (context.Resources.DisplayMetrics.WidthPixels) / 2;
propertylayout = new LinearLayout(context);
propertylayout.Orientation = Orientation.Vertical;
layoutParams = new LinearLayout.LayoutParams(width * 2, 3);
layoutParams.SetMargins(0, 20, 0, 0);
positionLabelLayout();
AnimationLayout();
return propertylayout;
}
private void positionLabelLayout()
{
//cultureLabel
TextView cultureLabel = new TextView(context);
cultureLabel.TextSize = 20;
cultureLabel.Text = "Default Drawer Position";
TextView cultureLabel1 = new TextView(context);
cultureLabel1.TextSize = 20;
cultureLabel1.Text = " Secondary Drawer Position";
//positionlist
List<String> positionlist = new List<String>();
positionlist.Add("Left");
positionlist.Add("Right");
positionlist.Add("Top");
positionlist.Add("Bottom");
List<String> positionlist1 = new List<String>();
positionlist1.Add("Left");
positionlist1.Add("Right");
positionlist1.Add("Top");
positionlist1.Add("Bottom");
//dataAdapter
dataAdapter = new ArrayAdapter<String>
(context, Android.Resource.Layout.SimpleSpinnerItem, positionlist);
dataAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
dataAdapter2 = new ArrayAdapter<String>
(context, Android.Resource.Layout.SimpleSpinnerItem, positionlist1);
dataAdapter2.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
//positionSpinner
positionSpinner = new Spinner(context,SpinnerMode.Dialog);
positionSpinner.SetGravity(GravityFlags.Left);
positionSpinner.Adapter = dataAdapter;
positionSpinner.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) => {
String selectedItem = dataAdapter.GetItem(e.Position);
if (selectedItem.Equals("Left"))
{
sliderposition = Position.Left;
}
if (selectedItem.Equals("Right"))
{
sliderposition = Position.Right;
}
if (selectedItem.Equals("Top"))
{
sliderposition = Position.Top;
}
if (selectedItem.Equals("Bottom"))
{
sliderposition = Position.Bottom;
}
};
positionSpinner1 = new Spinner(context, SpinnerMode.Dialog);
positionSpinner1.SetGravity(GravityFlags.Left);
positionSpinner1.Adapter = dataAdapter2;
positionSpinner1.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) => {
String selectedItem = dataAdapter2.GetItem(e.Position);
if (selectedItem.Equals("Left"))
{
sliderposition1 = Position.Left;
}
if (selectedItem.Equals("Right"))
{
sliderposition1 = Position.Right;
}
if (selectedItem.Equals("Top"))
{
sliderposition1 = Position.Top;
}
if (selectedItem.Equals("Bottom"))
{
sliderposition1 = Position.Bottom;
}
};
propertylayout.AddView(cultureLabel);
propertylayout.AddView(positionSpinner);
propertylayout.AddView(cultureLabel1);
propertylayout.AddView(positionSpinner1);
//labelSeparator
SeparatorView labelSeparator = new SeparatorView(context, width * 2);
labelSeparator.separatorColor = Color.LightGray;
labelSeparator.LayoutParameters = new ViewGroup.LayoutParams(width * 2, 3);
//propertylayout.AddView(labelSeparator, layoutParams);
}
private void AnimationLayout()
{
//cultureLabel1
TextView cultureLabel1 = new TextView(context);
cultureLabel1.TextSize = 20;
cultureLabel1.Text = "Default Drawer Animations";
//cultureLabel2
TextView cultureLabel2 = new TextView(context);
cultureLabel2.TextSize = 20;
cultureLabel2.Text = "Secondary Drawer Animations";
//transitionlist
List<String> transitionlist = new List<String>();
transitionlist.Add("SlideOnTop");
transitionlist.Add("Reveal");
transitionlist.Add("Push");
//transitionlist
List<String> transitionlist1 = new List<String>();
transitionlist1.Add("SlideOnTop");
transitionlist1.Add("Reveal");
transitionlist1.Add("Push");
//dataAdapter1
dataAdapter1 = new ArrayAdapter<String>
(context, Android.Resource.Layout.SimpleSpinnerItem, transitionlist);
dataAdapter1.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); ;
dataAdapter3 = new ArrayAdapter<String>
(context, Android.Resource.Layout.SimpleSpinnerItem, transitionlist1);
dataAdapter3.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); ;
//animationSpinner
animationSpinner = new Spinner(context,SpinnerMode.Dialog);
animationSpinner.SetGravity(GravityFlags.Left);
animationSpinner.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) => {
String selectedItem = dataAdapter1.GetItem(e.Position);
if (selectedItem.Equals("SlideOnTop"))
{
sliderTransition = Transition.SlideOnTop;
}
if (selectedItem.Equals("Reveal"))
{
sliderTransition = Transition.Reveal;
}
if (selectedItem.Equals("Push"))
{
sliderTransition = Transition.Push;
}
};
animationSpinner1 = new Spinner(context, SpinnerMode.Dialog);
animationSpinner1.SetGravity(GravityFlags.Left);
animationSpinner1.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) => {
String selectedItem = dataAdapter3.GetItem(e.Position);
if (selectedItem.Equals("SlideOnTop"))
{
sliderTransition1 = Transition.SlideOnTop;
}
if (selectedItem.Equals("Reveal"))
{
sliderTransition1 = Transition.Reveal;
}
if (selectedItem.Equals("Push"))
{
sliderTransition1 = Transition.Push;
}
};
TextView textSpacing = new TextView(context);
propertylayout.AddView(textSpacing);
animationSpinner.Adapter = dataAdapter1;
animationSpinner1.Adapter = dataAdapter3;
propertylayout.AddView(cultureLabel1);
propertylayout.AddView(animationSpinner);
propertylayout.AddView(cultureLabel2);
propertylayout.AddView(animationSpinner1);
//labelSeparator1
SeparatorView labelSeparator1 = new SeparatorView(context, width * 2);
labelSeparator1.separatorColor = Color.LightGray;
labelSeparator1.LayoutParameters = new ViewGroup.LayoutParams(width * 2, 3);
//propertylayout.AddView(labelSeparator1, layoutParams);
propertylayout.SetPadding(5, 0, 5, 0);
}
public override View GetSampleContent(Context context1)
{
context = context1;
IconButtonLayout();
HomeContentLayout();
MainContentLayout();
ProfileContentLayout();
InboxContentLayout();
SecondaryDrawerLayout();
OutBoxLayout();
ClickListenerLayout();
return slideDrawer;
}
private void IconButtonLayout()
{
//iconbutton
iconbutton = new Button(context);
iconbutton.SetBackgroundResource(Resource.Drawable.burgericon);
FrameLayout.LayoutParams btlayoutParams = new FrameLayout.LayoutParams(getDimensionPixelSize(context, Resource.Dimension.nav_drawer_btn_wt), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_btn_ht), GravityFlags.Center);
iconbutton.LayoutParameters = btlayoutParams;
iconbutton.SetPadding(10, 0, 0, 0);
if (context.Resources.DisplayMetrics.Density > 1.5)
{
iconbutton.SetX(10);
}
iconbutton.Gravity = GravityFlags.CenterVertical;
iconbutton1 = new Button(context);
Typeface tf = Typeface.CreateFromAsset(context.Assets, "Segoe_MDL2_Assets.ttf");
iconbutton1.Text = "\uE823";
iconbutton1.Typeface = tf;
iconbutton1.SetTextColor(Color.White);
iconbutton1.SetBackgroundColor(Color.Rgb(47, 173, 227));
FrameLayout.LayoutParams btlayoutParams1 = new FrameLayout.LayoutParams(getDimensionPixelSize(context, Resource.Dimension.nav_drawer_btn_wt), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_btn_ht), GravityFlags.Center);
iconbutton1.LayoutParameters = btlayoutParams1;
iconbutton1.SetPadding(10, 0, 0, 0);
if (context.Resources.DisplayMetrics.Density > 1.5)
{
iconbutton1.SetX(10);
}
iconbutton1.Gravity = GravityFlags.CenterVertical;
}
private void HomeContentLayout()
{
//HomeLabel
profileContentLabel = new TextView(context);
profileContentLabel.TextSize = 20;
profileContentLabel.Text = "Home";
profileContentLabel.SetTextColor(Color.White);
profileContentLabel.Gravity = GravityFlags.Center;
//linearLayout
LinearLayout linearLayout = new LinearLayout(context);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams((int)(context.Resources.DisplayMetrics.WidthPixels - (68 * context.Resources.DisplayMetrics.Density)), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_header_ht), GravityFlags.Center);
layoutParams.SetMargins(10, 0, 0, 0);
linearLayout.SetPadding(10, 0, 0, 0);
linearLayout.AddView(iconbutton);
linearLayout.AddView(profileContentLabel, layoutParams);
linearLayout.AddView(iconbutton1);
linearLayout.SetBackgroundColor(Color.Rgb(47, 173, 227));
TypedValue tv = new TypedValue();
if (context.Theme.ResolveAttribute(Android.Resource.Attribute.ActionBarSize, tv, true))
{
actionBarHeight = TypedValue.ComplexToDimensionPixelSize(tv.Data, context.Resources.DisplayMetrics);
}
height = Convert.ToInt32(context.Resources.DisplayMetrics.HeightPixels - actionBarHeight);
width = context.Resources.DisplayMetrics.WidthPixels;
//linear2
linear2 = new LinearLayout(context);
linear2.Orientation = Orientation.Vertical;
linear2.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
FrameLayout.LayoutParams layout2 = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent, GravityFlags.Center);
linear2.AddView(linearLayout, layout2);
}
private void MainContentLayout()
{
//textScroller
textScroller = new ScrollView(context);
textScroller.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
//textView
TextView textView = new TextView(context);
textView.Text = "\n \t Lorem ipsum dolor sit amet, lacus amet amet ultricies. Quisque mi venenatis morbi libero, orci dis, mi ut et class porta, massa ligula magna enim, aliquam orci vestibulum tempus. Turpis facilisis vitae consequat, cum a a, turpis dui consequat massa in dolor per, felis non amet. Auctor eleifend in omnis elit vestibulum, donec non elementum tellus est mauris, id aliquam, at lacus, arcu pretium proin lacus dolor et. Eu tortor, vel ultrices amet dignissim mauris vehicula. Lorem tortor neque, purus taciti quis id. Elementum integer orci accumsan minim phasellus vel.";
textView.TextSize = 16;
textView.SetPadding(20, 0, 20, 0);
textScroller.AddView(textView);
ContentFrame = new FrameLayout(context);
ContentFrame.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
ContentFrame.SetBackgroundColor(Color.White);
ContentFrame.AddView(textScroller);
textScroller.SetBackgroundColor(Color.White);
linear2.AddView(ContentFrame);
//contentLayout
LinearLayout contentLayout = new LinearLayout(context);
RoundedImageView roundedImg = new RoundedImageView(context, getDimensionPixelSize(context, Resource.Dimension.nav_drawer_imd_size), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_imd_size));
roundedImg.SetPadding(0, 10, 0, 10);
roundedImg.SetImageResource(Resource.Drawable.user);
LinearLayout.LayoutParams layparams8 = new LinearLayout.LayoutParams(getDimensionPixelSize(context, Resource.Dimension.nav_drawer_imd_size), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_imd_size));
layparams8.Gravity = GravityFlags.Center;
roundedImg.LayoutParameters = new ViewGroup.LayoutParams(getDimensionPixelSize(context, Resource.Dimension.nav_drawer_imd_size), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_imd_size));
//userNameLabel1
TextView userNameLabel1 = new TextView(context);
userNameLabel1.Text = "James Pollock";
userNameLabel1.Gravity = GravityFlags.Center;
userNameLabel1.TextSize = 17;
userNameLabel1.SetTextColor(Color.White);
userNameLabel1.SetPadding(0, 20, 0, 0);
userNameLabel1.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
//headerLayout
LinearLayout headerLayout = new LinearLayout(context);
headerLayout.Orientation = Orientation.Vertical;
headerLayout.SetBackgroundColor(Color.Rgb(47, 173, 227));
headerLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, getDimensionPixelSize(context, Resource.Dimension.nav_drawer_slider_ht));
headerLayout.SetGravity(GravityFlags.Center);
headerLayout.AddView(roundedImg, layparams8);
headerLayout.AddView(userNameLabel1);
LinearLayout.LayoutParams layparams2 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(height * 0.15));
layparams2.Gravity = GravityFlags.Center;
contentLayout.AddView(headerLayout);
LinearLayout.LayoutParams layparams5 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (2));
contentLayout.AddView(new SeparatorView(context, width) { separatorColor = Color.LightGray }, layparams5);
contentLayout.SetBackgroundColor(Color.White);
linear2.SetBackgroundColor(Color.White);
//slideDrawer
slideDrawer = new Com.Syncfusion.Navigationdrawer.SfNavigationDrawer(context);
slideDrawer.ContentView = linear2;
slideDrawer.DrawerWidth = (float)(200);
slideDrawer.DrawerHeight = (float)(300);
slideDrawer.Transition = Transition.SlideOnTop;
slideDrawer.TouchThreshold = 90;
slideDrawer.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
viewItem = new ListView(context);
viewItem.VerticalScrollBarEnabled = true;
iconbutton.Click += (object sender, EventArgs e) => {
slideDrawer.ToggleDrawer();
};
iconbutton1.Click += (object sender, EventArgs e) => {
slideDrawer.ToggleSecondaryDrawer();
};
//positionlist
List<String> positionlist = new List<String>();
positionlist.Add("Home");
positionlist.Add("Profile");
positionlist.Add("Inbox");
positionlist.Add("Outbox");
positionlist.Add("Sent Items");
positionlist.Add("Trash");
arrayAdapter = new ArrayAdapter<String>(context, Android.Resource.Layout.SimpleListItem1, positionlist);
viewItem.Adapter = arrayAdapter;
viewItem.SetBackgroundColor(Color.White);
viewItem.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
contentLayout.AddView(viewItem);
contentLayout.Orientation = Orientation.Vertical;
//frameLayout
FrameLayout frameLayout = new FrameLayout(context);
frameLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
frameLayout.SetBackgroundColor(Color.White);
frameLayout.AddView(contentLayout);
slideDrawer.DrawerContentView = frameLayout;
}
private void ProfileContentLayout()
{
//profilelayout
profilelayout = new LinearLayout(context);
profilelayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
profilelayout.Orientation = Orientation.Vertical;
LinearLayout linearLayout2 = new LinearLayout(context);
linearLayout2.SetGravity(GravityFlags.Center);
linearLayout2.SetPadding(0, 30, 0, 30);
linearLayout2.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
RoundedImageView roundedImg1 = new RoundedImageView(context, getDimensionPixelSize(context, Resource.Dimension.nav_drawer_prof_ht), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_prof_ht));
roundedImg1.LayoutParameters = new ViewGroup.LayoutParams(getDimensionPixelSize(context, Resource.Dimension.nav_drawer_prof_ht), getDimensionPixelSize(context, Resource.Dimension.nav_drawer_prof_ht));
roundedImg1.SetImageResource(Resource.Drawable.user);
LinearLayout txtlayout = new LinearLayout(context);
txtlayout.SetPadding(40, 0, 0, 0);
txtlayout.Orientation = Orientation.Vertical;
//userNameLabel2
TextView userNameLabel2 = new TextView(context);
userNameLabel2.TextSize = 20;
userNameLabel2.Text = "JamesPollock";
userNameLabel2.SetTextColor(Color.Black);
//userAgeLabel
TextView userAgeLabel = new TextView(context);
userAgeLabel.Text = "Age 30";
userAgeLabel.TextSize = 13;
userAgeLabel.SetTextColor(Color.Black);
//txtlayout
txtlayout.AddView(userNameLabel2);
txtlayout.AddView(userAgeLabel);
linearLayout2.AddView(roundedImg1);
linearLayout2.AddView(txtlayout);
linearLayout2.SetBackgroundColor(Color.White);
profilelayout.AddView(linearLayout2);
profilelayout.Orientation = Orientation.Vertical;
//separatorparams
FrameLayout.LayoutParams separatorparams = new FrameLayout.LayoutParams(width, 2, GravityFlags.Center);
SeparatorView labelSeparator2 = new SeparatorView(context, width);
labelSeparator2.separatorColor = Color.LightGray;
labelSeparator2.SetPadding(20, 0, 20, 20);
profilelayout.AddView(labelSeparator2, separatorparams);
//profiledescriptionLabel
TextView profiledescriptionLabel = new TextView(context);
profiledescriptionLabel.TextSize = 16;
profiledescriptionLabel.SetPadding(20, 0, 20, 0);
profiledescriptionLabel.SetBackgroundColor(Color.White);
profiledescriptionLabel.Text = "\n" +
"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters.\n" +
"\n" + "\n" + "when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters.\n" +
"\n" + "\n" + "James Pollock";
profilelayout.AddView(profiledescriptionLabel);
profilelayout.SetBackgroundColor(Color.White);
}
private void InboxContentLayout()
{
LinearLayout ContentLayout = new LinearLayout(context);
ContentLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date = new TextView(context);
date.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date.Text = "Jan 17";
date.Typeface = Typeface.DefaultBold;
date.SetTextColor(Color.ParseColor("#006BCD"));
date.Gravity = GravityFlags.End;
//inboxLayout
inboxLayout = new LinearLayout(context);
inboxLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
inboxLayout.SetBackgroundColor(Color.White);
inboxLayout.Orientation = Orientation.Vertical;
mail1 = new LinearLayout(context);
//userNameLabel3
TextView userNameLabel3 = new TextView(context);
userNameLabel3.Text = "John";
userNameLabel3.Typeface = Typeface.DefaultBold;
userNameLabel3.TextSize = 15;
userNameLabel3.Gravity = GravityFlags.Start;
TextView updateLabel1 = new TextView(context);
updateLabel1.Text = "Goto Meeting";
updateLabel1.Typeface = Typeface.DefaultBold;
updateLabel1.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel1.TextSize = 13;
TextView messageLabel1 = new TextView(context);
messageLabel1.Text = "Join meeting to discuss about daily status,workflow,pending work and improve process";
TextView spaceText1 = new TextView(context);
spaceText1.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text1 = new TextView(context);
Text1.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
//labelSeparator3
labelSeparator3 = new SeparatorView(context, width * 2);
labelSeparator3.separatorColor = Color.LightGray;
labelSeparator3.LayoutParameters = new ViewGroup.LayoutParams(width * 2, 3);
//layoutParams5
layoutParams5 = new LinearLayout.LayoutParams(width * 2, 3);
layoutParams5.SetMargins(0, 10, 15, 0);
messageLabel1.TextSize = 12;
ContentLayout.AddView(userNameLabel3);
ContentLayout.AddView(date);
mail1.AddView(ContentLayout);
mail1.AddView(spaceText1);
mail1.AddView(updateLabel1);
mail1.AddView(Text1);
mail1.AddView(messageLabel1);
//mail2
LinearLayout ContentLayout1 = new LinearLayout(context);
ContentLayout1.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date1 = new TextView(context);
date1.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date1.Text = "Jan 8";
date1.Typeface = Typeface.DefaultBold;
date1.SetTextColor(Color.ParseColor("#006BCD"));
date1.Gravity = GravityFlags.End;
mail2 = new LinearLayout(context);
TextView userNameLabel4 = new TextView(context);
userNameLabel4.Text = "Caster";
userNameLabel4.Typeface = Typeface.DefaultBold;
userNameLabel4.TextSize = 15;
TextView updateLabel2 = new TextView(context);
updateLabel2.Text = "FW:Status Update";
updateLabel2.Typeface = Typeface.DefaultBold;
updateLabel2.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel2.TextSize = 13;
TextView messageLabel2 = new TextView(context);
messageLabel2.Text = "Hi, Please find the today's status";
messageLabel2.TextSize = 12;
TextView spaceText2 = new TextView(context);
spaceText2.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text2 = new TextView(context);
Text2.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
ContentLayout1.AddView(userNameLabel4);
ContentLayout1.AddView(date1);
mail2.AddView(ContentLayout1);
mail2.AddView(spaceText2);
mail2.AddView(updateLabel2);
mail2.AddView(Text2);
mail2.AddView(messageLabel2);
labelSeparator4 = new SeparatorView(context, width * 2);
labelSeparator4.separatorColor = Color.LightGray;
labelSeparator4.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail3
LinearLayout ContentLayout2 = new LinearLayout(context);
ContentLayout2.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date2 = new TextView(context);
date2.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date2.Text = "Mar 9";
date2.Typeface = Typeface.DefaultBold;
date2.SetTextColor(Color.ParseColor("#006BCD"));
date2.Gravity = GravityFlags.End;
mail3 = new LinearLayout(context);
TextView userNameLabel5 = new TextView(context);
userNameLabel5.Text = "Joey";
userNameLabel5.Typeface = Typeface.DefaultBold;
userNameLabel5.TextSize = 15;
TextView updateLabel3 = new TextView(context);
updateLabel3.Text = "Greetings! Congrats";
updateLabel3.Typeface = Typeface.DefaultBold;
updateLabel3.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel3.TextSize = 13;
TextView messageLabel3 = new TextView(context);
messageLabel3.Text = "Hi, Congrats you have won the raffle";
messageLabel3.TextSize = 12;
TextView spaceText3 = new TextView(context);
spaceText3.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text3 = new TextView(context);
Text3.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
ContentLayout2.AddView(userNameLabel5);
ContentLayout2.AddView(date2);
mail3.AddView(ContentLayout2);
mail3.AddView(spaceText3);
mail3.AddView(updateLabel3);
mail3.AddView(Text3);
mail3.AddView(messageLabel3);
labelSeparator5 = new SeparatorView(context, width * 2);
labelSeparator5.separatorColor = Color.LightGray;
labelSeparator5.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail4
LinearLayout ContentLayout3 = new LinearLayout(context);
ContentLayout3.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date3 = new TextView(context);
date3.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date3.Text = "Apr 10";
date3.Typeface = Typeface.DefaultBold;
date3.SetTextColor(Color.ParseColor("#006BCD"));
date3.Gravity = GravityFlags.End;
mail4 = new LinearLayout(context);
TextView userNameLabel6 = new TextView(context);
userNameLabel6.Text = "Xavier";
userNameLabel6.Typeface = Typeface.DefaultBold;
userNameLabel6.TextSize = 15;
TextView updateLabel4 = new TextView(context);
updateLabel4.Text = "Report Monitor";
updateLabel4.Typeface = Typeface.DefaultBold;
updateLabel4.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel4.TextSize = 13;
TextView messageLabel4 = new TextView(context);
messageLabel4.Text = "Do not reply, Please find the attachment. Attachment have the full details of monitor report with timing";
messageLabel4.TextSize = 12;
TextView spaceText4 = new TextView(context);
spaceText4.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text4 = new TextView(context);
Text4.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
ContentLayout3.AddView(userNameLabel6);
ContentLayout3.AddView(date3);
mail4.AddView(ContentLayout3);
mail4.AddView(spaceText4);
mail4.AddView(updateLabel4);
mail4.AddView(Text4);
mail4.AddView(messageLabel4);
labelSeparator6 = new SeparatorView(context, width * 2);
labelSeparator6.separatorColor = Color.LightGray;
labelSeparator6.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail9
LinearLayout ContentLayout4 = new LinearLayout(context);
ContentLayout4.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date4 = new TextView(context);
date4.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date4.Text = "May 11";
date4.Typeface = Typeface.DefaultBold;
date4.SetTextColor(Color.ParseColor("#006BCD"));
date4.Gravity = GravityFlags.End;
mail9 = new LinearLayout(context);
TextView userNameLabel7 = new TextView(context);
userNameLabel7.Text = "Gonzalez";
userNameLabel7.Typeface = Typeface.DefaultBold;
userNameLabel7.TextSize = 15;
TextView updateLabel5 = new TextView(context);
updateLabel5.Text = "News Letter";
updateLabel5.Typeface = Typeface.DefaultBold;
updateLabel5.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel5.TextSize = 13;
TextView messageLabel5 = new TextView(context);
messageLabel5.Text = "Hi, Please find the attached news letter";
messageLabel5.TextSize = 12;
TextView spaceText5 = new TextView(context);
spaceText5.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text5 = new TextView(context);
Text5.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
ContentLayout4.AddView(userNameLabel7);
ContentLayout4.AddView(date4);
mail9.AddView(ContentLayout4);
mail9.AddView(spaceText5);
mail9.AddView(updateLabel5);
mail9.AddView(Text5);
mail9.AddView(messageLabel5);
labelSeparator7 = new SeparatorView(context, width * 2);
labelSeparator7.separatorColor = Color.LightGray;
labelSeparator7.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail10
LinearLayout ContentLayout5 = new LinearLayout(context);
ContentLayout5.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date5 = new TextView(context);
date5.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date5.Text = "May 12";
date5.Typeface = Typeface.DefaultBold;
date5.SetTextColor(Color.ParseColor("#006BCD"));
date5.Gravity = GravityFlags.End;
mail10 = new LinearLayout(context);
TextView userNameLabel8 = new TextView(context);
userNameLabel8.Text = "Rodriguez";
userNameLabel8.Typeface = Typeface.DefaultBold;
userNameLabel8.TextSize = 15;
TextView updateLabel6 = new TextView(context);
updateLabel6.Text = "Conference about Latest Technology";
updateLabel6.Typeface = Typeface.DefaultBold;
updateLabel6.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel6.TextSize = 13;
TextView messageLabel6 = new TextView(context);
messageLabel6.Text = "Hi,We are scheduled a conference meeting";
messageLabel6.TextSize = 12;
TextView spaceText6 = new TextView(context);
spaceText6.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text6 = new TextView(context);
Text6.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
ContentLayout5.AddView(userNameLabel8);
ContentLayout5.AddView(date5);
mail10.AddView(ContentLayout5);
mail10.AddView(spaceText6);
mail10.AddView(updateLabel6);
mail10.AddView(Text6);
mail10.AddView(messageLabel6);
labelSeparator8 = new SeparatorView(context, width * 2);
labelSeparator8.separatorColor = Color.LightGray;
labelSeparator8.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail11
LinearLayout ContentLayout6 = new LinearLayout(context);
ContentLayout6.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView date6 = new TextView(context);
date6.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
date6.Text = "May 13";
date6.Typeface = Typeface.DefaultBold;
date6.SetTextColor(Color.ParseColor("#006BCD"));
date6.Gravity = GravityFlags.End;
mail11 = new LinearLayout(context);
TextView userNameLabel9 = new TextView(context);
userNameLabel9.Text = "Ruben";
userNameLabel9.TextSize = 15;
userNameLabel9.Typeface = Typeface.DefaultBold;
TextView updateLabel7 = new TextView(context);
updateLabel7.Text = "RE:Status Update";
updateLabel7.SetTextColor(Color.ParseColor("#006BCD"));
updateLabel7.Typeface = Typeface.DefaultBold;
updateLabel7.TextSize = 13;
TextView messageLabel7 = new TextView(context);
messageLabel7.Text = "Thanks for the status report";
messageLabel7.TextSize = 12;
TextView spaceText7 = new TextView(context);
spaceText7.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text7 = new TextView(context);
Text7.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
ContentLayout6.AddView(userNameLabel9);
ContentLayout6.AddView(date6);
mail11.AddView(ContentLayout6);
mail11.AddView(spaceText7);
mail11.AddView(updateLabel7);
mail11.AddView(Text7);
mail11.AddView(messageLabel7);
labelSeparator9 = new SeparatorView(context, width * 2);
labelSeparator9.separatorColor = Color.LightGray;
labelSeparator9.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail18
mail18 = new LinearLayout(context);
TextView userNameLabel18 = new TextView(context);
userNameLabel18.Text = "Frank";
userNameLabel18.TextSize = 15;
TextView updateLabel18 = new TextView(context);
updateLabel18.Text = "Monthly Reports Documents";
updateLabel18.TextSize = 13;
TextView messageLabel18 = new TextView(context);
messageLabel18.Text = "Hi,All documents are reviewed";
messageLabel18.TextSize = 12;
TextView spaceText18 = new TextView(context);
spaceText18.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text18 = new TextView(context);
Text18.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
mail18.AddView(userNameLabel18);
mail18.AddView(spaceText18);
mail18.AddView(updateLabel18);
mail18.AddView(Text18);
mail18.AddView(messageLabel18);
labelSeparator18 = new SeparatorView(context, width * 2);
labelSeparator18.separatorColor = Color.LightGray;
labelSeparator18.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail19
mail19 = new LinearLayout(context);
TextView userNameLabel19 = new TextView(context);
userNameLabel19.Text = "Michael";
userNameLabel19.TextSize = 15;
TextView updateLabel19 = new TextView(context);
updateLabel19.Text = "Metting Confirmation";
updateLabel19.TextSize = 13;
TextView messageLabel19 = new TextView(context);
messageLabel19.Text = "Thanks for scheduling the metting";
messageLabel19.TextSize = 12;
TextView spaceText19 = new TextView(context);
spaceText19.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text19 = new TextView(context);
Text19.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
mail19.AddView(userNameLabel19);
mail19.AddView(spaceText19);
mail19.AddView(updateLabel19);
mail19.AddView(Text19);
mail19.AddView(messageLabel19);
labelSeparator19 = new SeparatorView(context, width * 2);
labelSeparator19.separatorColor = Color.LightGray;
labelSeparator19.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail20
mail20 = new LinearLayout(context);
TextView userNameLabel20 = new TextView(context);
userNameLabel20.Text = "Robin";
userNameLabel20.TextSize = 15;
TextView updateLabel20 = new TextView(context);
updateLabel20.Text = "Success! Report Automation";
updateLabel20.TextSize = 13;
TextView messageLabel20 = new TextView(context);
messageLabel20.Text = "Do not reply, Automation result will update soon";
messageLabel20.TextSize = 12;
TextView spaceText20 = new TextView(context);
spaceText20.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
TextView Text20 = new TextView(context);
Text20.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 20);
mail20.AddView(userNameLabel20);
mail20.AddView(spaceText20);
mail20.AddView(updateLabel20);
mail20.AddView(Text20);
mail20.AddView(messageLabel20);
labelSeparator20 = new SeparatorView(context, width * 2);
labelSeparator20.separatorColor = Color.LightGray;
labelSeparator20.LayoutParameters = (new ViewGroup.LayoutParams(width * 2, 3));
//mail Orientation
mail1.Orientation = Orientation.Vertical;
mail2.Orientation = Orientation.Vertical;
mail3.Orientation = Orientation.Vertical;
mail4.Orientation = Orientation.Vertical;
mail9.Orientation = Orientation.Vertical;
mail10.Orientation = Orientation.Vertical;
mail11.Orientation = Orientation.Vertical;
mail18.Orientation = Orientation.Vertical;
mail19.Orientation = Orientation.Vertical;
mail20.Orientation = Orientation.Vertical;
//mail LayoutParameters
mail1.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail1.SetPadding(20, 10, 10, 5);
mail2.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail2.SetPadding(20, 10, 10, 5);
mail3.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail3.SetPadding(20, 10, 10, 5);
mail4.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail4.SetPadding(20, 10, 10, 5);
mail9.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail9.SetPadding(20, 10, 10, 5);
mail10.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail10.SetPadding(20, 10, 10, 5);
mail11.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail11.SetPadding(20, 10, 10, 5);
mail18.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail18.SetPadding(20, 10, 10, 5);
mail19.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail19.SetPadding(20, 10, 10, 5);
mail20.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent));
mail20.SetPadding(20, 10, 10, 5);
//inboxview
inboxLayout.SetPadding(20, 0, 20, 20);
inboxLayout.AddView(mail1);
inboxLayout.AddView(labelSeparator3, layoutParams5);
inboxLayout.AddView(mail2);
inboxLayout.AddView(labelSeparator4, layoutParams5);
inboxLayout.AddView(mail3);
inboxLayout.AddView(labelSeparator5, layoutParams5);
inboxLayout.AddView(mail4);
inboxLayout.AddView(labelSeparator6, layoutParams5);
inboxLayout.AddView(mail9);
inboxLayout.AddView(labelSeparator7, layoutParams5);
inboxLayout.AddView(mail10);
inboxLayout.AddView(labelSeparator9, layoutParams5);
inboxLayout.AddView(mail11);
inboxLayout.AddView(labelSeparator8, layoutParams5);
inboxLayout.AddView(mail18);
inboxLayout.AddView(labelSeparator18, layoutParams5);
inboxLayout.AddView(mail19);
inboxLayout.AddView(labelSeparator19, layoutParams5);
inboxLayout.AddView(mail20);
inboxLayout.AddView(labelSeparator20, layoutParams5);
}
private void SecondaryDrawerLayout()
{
//textScroller
textScroller1 = new ScrollView(context);
textScroller1.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
TextView headerView = new TextView(context);
headerView.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
headerView.SetBackgroundColor(Color.Rgb(47, 173, 227));
headerView.SetPadding(20, 0, 0, 0);
headerView.Text = "Notifications";
headerView.TextSize = 20;
headerView.Gravity = GravityFlags.CenterVertical;
headerView.SetTextColor(Color.White);
//slideDrawer
drawerSettings = new DrawerSettings();
drawerSettings.DrawerWidth = (float)(230);
drawerSettings.DrawerHeight = (float)(250);
drawerSettings.DrawerHeaderHeight = 40;
drawerSettings.Transition = Transition.SlideOnTop;
drawerSettings.Position = Position.Right;
drawerSettings.EnableSwipeGesture = true;
drawerSettings.TouchThreshold = 90;
drawerSettings.DrawerHeaderView = headerView;
//ItemLAyout
ItemLayout1 = new LinearLayout(context);
ItemLayout1.Orientation = Orientation.Horizontal;
ItemLayout2 = new LinearLayout(context);
ItemLayout2.Orientation = Orientation.Horizontal;
ItemLayout3 = new LinearLayout(context);
ItemLayout3.Orientation = Orientation.Horizontal;
ItemLayout4 = new LinearLayout(context);
ItemLayout4.Orientation = Orientation.Horizontal;
ItemLayout5 = new LinearLayout(context);
ItemLayout5.Orientation = Orientation.Horizontal;
ItemLayout6 = new LinearLayout(context);
ItemLayout6.Orientation = Orientation.Horizontal;
ItemLayout7 = new LinearLayout(context);
ItemLayout7.Orientation = Orientation.Horizontal;
//secondaryDrawerLayout
secondaryDrawerLayout = new LinearLayout(context);
secondaryDrawerLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
secondaryDrawerLayout.SetBackgroundColor(Color.White);
secondaryDrawerLayout.Orientation = Orientation.Vertical;
//layoutParamsSecondaryDrawer
layoutParamsSecondaryDrawer = new LinearLayout.LayoutParams(width * 2, 3);
layoutParamsSecondaryDrawer.SetMargins(0, 10, 15, 0);
//ItemImage
ImageView imag1 = new ImageView(context);
imag1.LayoutParameters = new ViewGroup.LayoutParams(120, 120);
imag1.SetPadding(0, 20, 0, 0);
imag1.SetImageResource(Resource.Drawable.a5);
ImageView imag2 = new ImageView(context);
imag2.LayoutParameters = new ViewGroup.LayoutParams(120, 120);
imag2.SetPadding(0, 20, 0, 0);
imag2.SetImageResource(Resource.Drawable.a0);
ImageView imag3 = new ImageView(context);
imag3.LayoutParameters = new ViewGroup.LayoutParams(120, 120);
imag3.SetPadding(0, 20, 0, 0);
imag3.SetImageResource(Resource.Drawable.a1);