本文整理汇总了C#中Android.Views.LayoutInflater类的典型用法代码示例。如果您正苦于以下问题:C# LayoutInflater类的具体用法?C# LayoutInflater怎么用?C# LayoutInflater使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LayoutInflater类属于Android.Views命名空间,在下文中一共展示了LayoutInflater类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView (LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle)
{
var frame = (FrameLayout)layoutInflater.Inflate(Resource.Layout.zxingscannerfragmentlayout, null);
var layoutParams = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent);
try
{
scanner = new ZXingSurfaceView (this.Activity, ScanningOptions, callback);
frame.AddView(scanner, layoutParams);
if (!UseCustomView)
{
zxingOverlay = new ZxingOverlayView (this.Activity);
zxingOverlay.TopText = TopText ?? "";
zxingOverlay.BottomText = BottomText ?? "";
frame.AddView (zxingOverlay, layoutParams);
}
else if (CustomOverlayView != null)
{
frame.AddView(CustomOverlayView, layoutParams);
}
}
catch (Exception ex)
{
Console.WriteLine ("Create Surface View Failed: " + ex);
}
return frame;
}
开发者ID:sjller,项目名称:ZXing.Net.Mobile,代码行数:31,代码来源:ZXingScannerFragment.cs
示例2: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
RadCalendarView calendarView = new RadCalendarView (Activity);
calendarView.ScrollMode = ScrollMode.Stack;
return calendarView;
}
开发者ID:bmccool,项目名称:Android-samples,代码行数:7,代码来源:ScrollingModesFragment.cs
示例3: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Use this to return your custom view for this Fragment
// return inflater.Inflate(Resource.Layout.YourFragment, container, false);
// Lich hoc theo HK
var rootView = inflater.Inflate (Resource.Layout.LichHoc_HK, container, false);
isfirst = true;
listView_HK = rootView.FindViewById<ListView> (Resource.Id.listLH);
lbl_HK = rootView.FindViewById<TextView> (Resource.Id.lbl_HK_LH);
lbl_NH = rootView.FindViewById<TextView> (Resource.Id.lbl_NH_LH);
progress = rootView.FindViewById<ProgressBar> (Resource.Id.progressLH);
linear = rootView.FindViewById<LinearLayout>(Resource.Id.linear_HK_LH);
linearLH = rootView.FindViewById<LinearLayout>(Resource.Id.linearLH);
txtNotify = rootView.FindViewById<TextView>(Resource.Id.txtNotify_LT_HK);
// radioGroup = rootView.FindViewById<RadioGroup>(Resource.Id.radioGroup1);
bundle=this.Arguments;
check = bundle.GetBoolean ("Remind");
autoupdate = bundle.GetBoolean ("AutoUpdateData");
//load data
LoadData_HK ();
// row click
listView_HK.ItemLongClick += listView_ItemClick;
return rootView;
}
开发者ID:tienbui123,项目名称:Mobile-VS2,代码行数:30,代码来源:LichHocHKFragment.cs
示例4: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Use this to return your custom view for this Fragment
var view = inflater.Inflate(Resource.Layout.HeaderFragmentLayout, container, false);
var homeBtn = view.FindViewById<ImageView>(Resource.Id.HeaderLogo);
var overlayBtn = view.FindViewById<ImageView>(Resource.Id.HeaderOverlay);
var animIn = AnimationUtils.LoadAnimation(Activity.BaseContext, Resource.Animation.Overlay_animIn);
homeBtn.Click += delegate
{
if (!(Activity is MainActivity))
{
var i = new Intent(Activity, typeof(MainActivity));
i.AddFlags(ActivityFlags.NewTask | ActivityFlags.ClearTop);
Activity.StartActivity(i);
}
};
overlayBtn.Click += delegate
{
overlay.View.StartAnimation(animIn);
overlay.Initialize();
overlay.View.Visibility = ViewStates.Visible;
};
return view;
}
开发者ID:JMHornberg,项目名称:PJ6000-Hovedprosjekt,代码行数:27,代码来源:HeaderFragment.cs
示例5: OnCreateView
/// <inheritdoc/>
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
ZTnTrace.Trace(MethodBase.GetCurrentMethod());
var view = inflater.Inflate(Resource.Layout.Home, container, false);
var careerListView = view.FindViewById<ListView>(Resource.Id.AccountsListView);
careerListView.ItemClick += (sender, args) =>
{
var viewCareerIntent = new Intent(Activity, typeof(ViewCareerActivity));
D3Context.Instance.BattleTag = args.View.FindViewById<TextView>(Android.Resource.Id.Text1)
.Text;
D3Context.Instance.Host = args.View.FindViewById<TextView>(Android.Resource.Id.Text2)
.Text;
StartActivity(viewCareerIntent);
};
D3Context.Instance.DbAccounts = new AccountsDB(Activity);
cursor = D3Context.Instance.DbAccounts.GetAccounts();
Activity.StartManagingCursor(cursor);
IListAdapter accountsAdapter = new SimpleCursorAdapter(Activity, Android.Resource.Layout.SimpleListItem2, cursor, accountsFromColumns, accountsToId);
view.FindViewById<ListView>(Resource.Id.AccountsListView)
.Adapter = accountsAdapter;
return view;
}
开发者ID:djtms,项目名称:D3-Android-by-ZTn,代码行数:28,代码来源:CareersListFragment.cs
示例6: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
RelativeLayout view = (RelativeLayout)inflater.Inflate (Resource.Layout.raffledetail_gettemppass, container, false);
rootview = view;
TextView hinttextview=(TextView)view.FindViewById (Resource.Id.gettemppass_hinttext_textview);
hinttextview.Text = RequestTPScreenData.ProvideClientInfoTextViewText;
emailorphone = (EditText)view.FindViewById (Resource.Id.gettemppass_emailorphone_edittext);
emailorphone.Hint = RequestTPScreenData.ClientInfoTextFieldPlaceholder;
requesttemppass = (Button)view.FindViewById (Resource.Id.gettemppass_requesttemppass_button);
requesttemppass.Text = RequestTPScreenData.RequestTPBtnTitle;
//send web request
requesttemppass.Click+=OnRequestTempPassClick;
TextView signuptextview=view.FindViewById<TextView> (Resource.Id.gettemppass_register_textview);
nn_activity.SetClickAbleText (signuptextview,RequestTPScreenData.DontHaveAccountLabelText+RequestTPScreenData.SignUpBtnTitle,RequestTPScreenData.SignUpBtnTitle,()=>{
if(FormatManager.chechinput(emailorphone.Text,FormatManager.FormatOption.Email)){
(nn_activity as HomeScreen).ShowBuyerSignUp(emailorphone.Text);
}
else{
(nn_activity as HomeScreen).ShowBuyerSignUp("");
}
});
return view;
}
开发者ID:MADMUC,项目名称:TAP5050,代码行数:30,代码来源:RaffleGetTempPassFragment.cs
示例7: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = inflater.Inflate(Resource.Layout.BusinessCardFragmentLayout, container, false);
var listView = view.FindViewById<ListView>(Resource.Id.listViewBusinessCards);
listView.Adapter = new BusinessCardAdapter (this.Activity);
return view;
}
开发者ID:aaronlab,项目名称:Xamarin-Framework-Samples,代码行数:7,代码来源:BusinessCardFragment.cs
示例8: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
rootview = new RelativeLayout (nn_activity);
rootview.LayoutParameters = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
rootview.SetBackgroundColor (Resources.GetColor(Resource.Color.soarnix_bg_gray));
rootview.Id = TapUtil.generateViewId ();
//list to show event history
historyeventlist = new ListView (nn_activity);
historyeventlist.LayoutParameters= new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
historyeventlist.Id = TapUtil.generateViewId ();
adapter = new EventHistoryListAdapter (nn_activity,historylist);
historyeventlist.Adapter = adapter;
//add a relative layout to rootview to show no result event
nohistorylayout=new RelativeLayout(nn_activity);
nohistorylayout.LayoutParameters= new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
nohistorylayout.SetBackgroundResource(Resource.Color.soarnix_bg_gray);
nohistorylayout.Visibility = ViewStates.Gone;
nohistorytext = new TextView (nn_activity);
nohistorytext.Text = HistoryScreenData.NoRecordMessage;
nohistorytext.Gravity = GravityFlags.Center;
RelativeLayout.LayoutParams nohistorytextparam=new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.WrapContent, RelativeLayout.LayoutParams.WrapContent);
nohistorytextparam.AddRule (LayoutRules.CenterInParent);
nohistorytextparam.SetMargins (TapUtil.dptodx (10), 0, TapUtil.dptodx (10), 0);
nohistorytext.LayoutParameters = nohistorytextparam;
nohistorylayout.AddView (nohistorytext);
rootview.AddView (historyeventlist);
rootview.AddView (nohistorylayout);
return rootview;
}
开发者ID:MADMUC,项目名称:TAP5050,代码行数:35,代码来源:SalesEventHistoryFragment.cs
示例9: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
SetStyle(DialogFragmentStyle.NoTitle, Android.Resource.Style.ThemeTranslucentNoTitleBar);
Dialog.RequestWindowFeature((int)WindowFeatures.NoTitle);
var view = inflater.Inflate(Resource.Layout.TrickSelectorPreMenuDialogFragmentLayout, container, false);
Dialog.Window.SetBackgroundDrawableResource(Resource.Drawable.shape_roundedRect);
var buttons = new Tuple<ImageView, TrickType>[typeof(TrickType).GetEnumNames().Length + 1];
var trickFilterButtons = Resources.ObtainTypedArray(Resource.Array.TrickSortButtons_TrickSelector);
var trickFilterButtonTexts = Resources.ObtainTypedArray(Resource.Array.TrickSortButtonTexts_TrickSelector);
For(0, buttons.Length, (i) =>
{
buttons[i] = Tuple.Create(view.FindViewById<ImageView>(trickFilterButtons.GetResourceId(i, 0)), (TrickType)i);
view.FindViewById<TextView>(trickFilterButtonTexts.GetResourceId(i, 0)).Typeface = Data.Bowlby_OneSC;
});
ForEach(buttons, (button) => button.Item1.Click += delegate
{
if (IsListEmpty(button.Item2))
{
Toast.MakeText(Activity.BaseContext, Resource.String.NoTricks, ToastLength.Long).Show();
}
else
{
args.PutInt(Flags.TricksToUse, (int)button.Item2);
TrickSelectorDialogFragment.newInstance(args).Show(FragmentManager, "tag");
Dismiss();
}
});
return view;
}
开发者ID:JMHornberg,项目名称:PJ6000-Hovedprosjekt,代码行数:33,代码来源:TrickSelectorPreMenuDialogFragment.cs
示例10: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var ignore = base.OnCreateView(inflater, container, savedInstanceState);
var view = this.BindingInflate(FragmentId, null);
_toolbar = view.FindViewById<Toolbar>(Resource.Id.toolbar);
if (_toolbar != null)
{
((MainActivity)Activity).SetSupportActionBar(_toolbar);
((MainActivity)Activity).SupportActionBar.SetDisplayHomeAsUpEnabled(true);
_drawerToggle = new MvxActionBarDrawerToggle(
Activity, // host Activity
((MainActivity)Activity).DrawerLayout, // DrawerLayout object
_toolbar, // nav drawer icon to replace 'Up' caret
Resource.String.drawer_open, // "open drawer" description
Resource.String.drawer_close // "close drawer" description
);
_drawerToggle.DrawerOpened += (object sender, ActionBarDrawerEventArgs e) => ((MainActivity)Activity).HideSoftKeyboard ();
((MainActivity)Activity).DrawerLayout.SetDrawerListener(_drawerToggle);
}
return view;
}
开发者ID:Ideine,项目名称:MvvmCross-AndroidSupport,代码行数:25,代码来源:BaseFragment.cs
示例11: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
base.OnCreateView (inflater, container, savedInstanceState);
var view = inflater.Inflate (Resource.Layout.DocumentFragmentLayout, null, true);
documentListView = view.FindViewById<ListView> (Resource.Id.documentsListView);
if (Documents != null)
documentListView.Adapter = new DocumentsAdapter (Activity, Resource.Layout.DocumentListItemLayout, Documents);
documentListView.ItemClick += (sender, e) => {
var textView = e.View.FindViewById<TextView> (Resource.Id.documentListItemDocTitle);
var document = Documents.ElementAtOrDefault ((int)textView.Tag);
//start intent with the uri path of the document
var strings = document.Path.Split ('/');
CopyReadAsset (strings [1]);
var intent = new Intent (Intent.ActionView);
var uri = Uri.FromFile (file);
intent.SetDataAndType (uri, "application/pdf");
intent.SetFlags (ActivityFlags.ClearTop);
try {
Activity.StartActivity (intent);
} catch (ActivityNotFoundException exc) {
Log.WriteLine (LogPriority.Error, Constants.LogTag, exc.Message);
}
};
return view;
}
开发者ID:tranuydu,项目名称:prebuilt-apps,代码行数:30,代码来源:DocumentFragment.cs
示例12: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
intent = new Intent(Activity, typeof(MenuFragment));
tabHost = new FragmentTabHost(Activity);
tabHost.Setup(Activity, ChildFragmentManager, Resource.Layout.FragmentTabHost);
View tabIndicator1 = LayoutInflater.From(Activity).Inflate(Resource.Layout.TabIndicator, tabHost.TabWidget, false);
((TextView)tabIndicator1.FindViewById(Resource.Id.TabTitle)).Text = "Bible";
((ImageView)tabIndicator1.FindViewById(Resource.Id.TabIcon)).SetImageResource(Resource.Drawable.bible);
View tabIndicator2 = LayoutInflater.From(Activity).Inflate(Resource.Layout.TabIndicator, tabHost.TabWidget, false);
((TextView)tabIndicator2.FindViewById(Resource.Id.TabTitle)).Text = "Pubs";
((ImageView)tabIndicator2.FindViewById(Resource.Id.TabIcon)).SetImageResource(Resource.Drawable.pubs);
View tabIndicator3 = LayoutInflater.From(Activity).Inflate(Resource.Layout.TabIndicator, tabHost.TabWidget, false);
((TextView)tabIndicator3.FindViewById(Resource.Id.TabTitle)).Text = "Search";
((ImageView)tabIndicator3.FindViewById(Resource.Id.TabIcon)).SetImageResource(Resource.Drawable.search);
tabHost.AddTab(tabHost.NewTabSpec("bible").SetIndicator(tabIndicator1), (new CanonHeaderGridFragment()).Class, null);
tabHost.AddTab(tabHost.NewTabSpec("publications").SetIndicator(tabIndicator2), (new PublicationsFragment()).Class, null);
tabHost.AddTab(tabHost.NewTabSpec("search").SetIndicator(tabIndicator3), (new SearchFragment()).Class, null);
//tabHost.AddTab(tabHost.NewTabSpec("bible").SetIndicator("Bible", Resources.GetDrawable(Resource.Drawable.bible)), (new CanonHeaderGridFragment()).Class, null);
//tabHost.AddTab(tabHost.NewTabSpec("publications").SetIndicator("Pubs", Resources.GetDrawable(Resource.Drawable.pubs)), (new PublicationsFragment()).Class, null);
//tabHost.AddTab(tabHost.NewTabSpec("search").SetIndicator("Search", Resources.GetDrawable(Resource.Drawable.search)), (new SearchFragment()).Class, null);
return tabHost;
}
开发者ID:GuyMicciche,项目名称:SuperNWTBible,代码行数:29,代码来源:MenuFragmentAdvanced.cs
示例13: ForceSetFactory2
// Workaround from Support.v4 v22.1.1 library:
//
// For APIs >= 11 && < 21, there was a framework bug that prevented a LayoutInflater's
// Factory2 from being merged properly if set after a cloneInContext from a LayoutInflater
// that already had a Factory2 registered. We work around that bug here. If we can't we
// log an error.
private static void ForceSetFactory2(LayoutInflater inflater, LayoutInflater.IFactory2 factory)
{
if (!_checkedField)
{
try
{
Class layoutInflaterClass = Class.FromType(typeof(LayoutInflater));
_layoutInflaterFactory2Field = layoutInflaterClass.GetDeclaredField("mFactory2");
_layoutInflaterFactory2Field.Accessible = true;
}
catch (NoSuchFieldException e)
{
Mvx.Error(
"ForceSetFactory2 Could not find field 'mFactory2' on class {0}; inflation may have unexpected results.",
Class.FromType(typeof(LayoutInflater)).Name);
}
_checkedField = true;
}
if (_layoutInflaterFactory2Field != null)
{
try
{
_layoutInflaterFactory2Field.Set(inflater, (Java.Lang.Object)factory);
}
catch (IllegalAccessException e)
{
Mvx.Error("ForceSetFactory2 could not set the Factory2 on LayoutInflater {0} ; inflation may have unexpected results.", inflater);
}
}
}
开发者ID:MvvmCross,项目名称:MvvmCross,代码行数:37,代码来源:MvxLayoutInflaterCompat.cs
示例14: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = inflater.Inflate(Resource.Layout.ListViewWithSwipe, container, false);
SwipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.swipe_refresh_layout);
SwipeRefreshLayout.SetColorSchemeColors(Resource.Color.tenBlue,
Resource.Color.colorPrimary,
Resource.Color.colorAccent,
Resource.Color.colorPrimaryDark);
SwipeRefreshLayout.Refresh += async delegate
{
await FetchTableData();
};
ListView = view.FindViewById<ListView>(Resource.Id.list);
ListView.SetOnScrollListener(new TailFetchListViewListener(this));
ListView.AddFooterView(FooterView, null, false);
ListView.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) =>
{
TenServiceHelper.GoToGuestProfile(FragmentManager, Master.Id, TableItems[e.Position]);
};
BackgroundTextView = (TextView)view.FindViewById<TextView>(Resource.Id.backgroundTextView);
BackgroundTextView.Text = EmptyTableString;
return view;
}
开发者ID:natevarghese,项目名称:XamarinTen,代码行数:29,代码来源:ListOfFeedFragment.cs
示例15: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var root = inflater.Inflate(Resource.Layout.fragment_contacts, container, false);
refresher = root.FindViewById<SwipeRefreshLayout>(Resource.Id.refresher);
refresher.SetColorScheme(Resource.Color.blue);
refresher.Refresh += async delegate
{
if (viewModel.IsBusy)
return;
await viewModel.GetContactsAsync();
Activity.RunOnUiThread(() => { ((BaseAdapter)listView.Adapter).NotifyDataSetChanged(); });
};
viewModel.PropertyChanged += PropertyChanged;
listView = root.FindViewById<ListView>(Resource.Id.list);
listView.Adapter = new ContactAdapter(Activity, viewModel);
listView.ItemLongClick += ListViewItemLongClick;
listView.ItemClick += ListViewItemClick;
var fab = root.FindViewById<FloatingActionButton>(Resource.Id.fab);
fab.AttachToListView(listView);
fab.Click += (sender, args) =>
{
ContactDetailsActivity.ViewModel = null;
var intent = new Intent(Activity, typeof(ContactDetailsActivity));
StartActivity(intent);
};
return root;
}
开发者ID:gxy001,项目名称:Office365-FiveMinuteMeeting,代码行数:35,代码来源:ContactsFragment.cs
示例16: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.Inflate(Resource.Layout.TeamsFragment, container, false);
if(listTeams.Count == 0) {
//display text that there are currently no events and hide list with events
view.FindViewById(Resource.Id.teamsFragmentListTeams).Visibility = ViewStates.Gone;
} else {
//display list with events and hide the text
view.FindViewById(Resource.Id.teamsFragmentNoTeams).Visibility = ViewStates.Gone;
listView = view.FindViewById<ListView>(Resource.Id.teamsFragmentListTeams);
listView.Adapter = new ListTeamsAdapter(this, listTeams);
listView.ItemClick += OnListItemClick;
}
if(DB_Communicator.getInstance().isAtLeast(VBUser.GetUserFromPreferences().getUserType(), UserType.Coremember)) {
view.FindViewById<LinearLayout>(Resource.Id.teamsFragmentBtnAddLine).Visibility = ViewStates.Visible;
} else {
view.FindViewById<LinearLayout>(Resource.Id.teamsFragmentBtnAddLine).Visibility = ViewStates.Gone;
}
view.FindViewById<Button>(Resource.Id.teamsFragmentBtnAdd).Click += (object sender, EventArgs e) => {
ViewController.getInstance().mainActivity.switchFragment(ViewController.TEAMS_FRAGMENT,
ViewController.ADD_TEAM_FRAGMENT, new AddTeamFragment());
};
return view;
}
开发者ID:Tucaen,项目名称:Karlsfeld-Volleyball-App,代码行数:27,代码来源:TeamsFragment.cs
示例17: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
base.OnCreateView(inflater, container, savedInstanceState);
var view = inflater.Inflate(Resource.Layout.CallVoice, container, false);
return view;
}
开发者ID:knervous,项目名称:MemBox1,代码行数:7,代码来源:VoiceFragment.cs
示例18: PostAdapter
public PostAdapter(Context context, ObservableCollection<Post> posts)
{
this.posts = posts;
this.context = context;
inflater = LayoutInflater.From(context);
posts.CollectionChanged += (o,e) => this.NotifyDataSetChanged();
}
开发者ID:paulombcosta,项目名称:mono-mobilis,代码行数:7,代码来源:PostAdapter.cs
示例19: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2)
{
var v = inflater.Inflate(Resource.Layout.hello_world, container, false);
var tv = v.FindViewById<TextView>(Resource.Id.text);
tv.Text = "This is an instance of MyDialogFragment";
return v;
}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:7,代码来源:FragmentDialogOrActivitySupport.cs
示例20: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View v = inflater.Inflate (Resource.Layout.WebViewDialog, container, false);
txtTitle = v.FindViewById<TextView> (Resource.Id.txt_dialog_title);
divider = v.FindViewById<View> (Resource.Id.title_divider);
webView = v.FindViewById<WebView> (Resource.Id.dialog_web_view);
if (title == null || title.Length < 1) {
txtTitle.Visibility = divider.Visibility = ViewStates.Gone;
} else {
txtTitle.Text = title;
}
if (url != null && url.Length > 0) {
webView.LoadUrl (url);
}
if (showOkay) {
btnOk.Visibility = ViewStates.Visible;
btnOk.Click += (object sender, EventArgs e) => {
this.Dismiss ();
};
}
return v;
}
开发者ID:KiranKumarAlugonda,项目名称:TXTSHD,代码行数:27,代码来源:WebViewDialog.cs
注:本文中的Android.Views.LayoutInflater类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论