//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState) public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_smart_card_rw, container, false); SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE); logicalNameEditText = (EditText) view.findViewById(R.id.editTextLogicalName); logicalNameEditText.Text = settings.getString(MainActivity.KEY_LOGICAL_NAME_SMART_CARD_RW, getString([email protected]_card_rw)); view.findViewById(R.id.buttonOpen).OnClickListener = this; view.findViewById(R.id.buttonClaim).OnClickListener = this; view.findViewById(R.id.buttonRelease).OnClickListener = this; view.findViewById(R.id.buttonClose).OnClickListener = this; view.findViewById(R.id.buttonInfo).OnClickListener = this; view.findViewById(R.id.buttonCheckHealth).OnClickListener = this; view.findViewById(R.id.buttonReadData).OnClickListener = this; CheckBox checkBox = (CheckBox) view.findViewById(R.id.checkBoxDeviceEnabled); checkBox.OnCheckedChangeListener = this; RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.radioGroup1); radioGroup.OnCheckedChangeListener = this; radioGroup = (RadioGroup) view.findViewById(R.id.radioGroup2); radioGroup.OnCheckedChangeListener = this; readDataTextView = (TextView) view.findViewById(R.id.textViewReadData); stateTextView = (TextView) view.findViewById(R.id.textViewState); return view; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(com.opentok.android.demo.opentoksamples.R.layout.layout_fragment_sub_control, container, false); mSubContainer = (RelativeLayout) openTokActivity.findViewById(com.opentok.android.demo.opentoksamples.R.id.fragment_sub_container); showSubscriberWidget(mSubscriberWidgetVisible, false); mSubscriberMute = (ImageButton) rootView.findViewById(com.opentok.android.demo.opentoksamples.R.id.muteSubscriber); mSubscriberMute.OnClickListener = this; mSubscriberName = (TextView) rootView.findViewById(com.opentok.android.demo.opentoksamples.R.id.subscriberName); if (openTokActivity.Resources.Configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) { RelativeLayout.LayoutParams @params = (RelativeLayout.LayoutParams) container.LayoutParams; DisplayMetrics metrics = new DisplayMetrics(); openTokActivity.WindowManager.DefaultDisplay.getMetrics(metrics); @params.width = metrics.widthPixels - openTokActivity.dpToPx(48); container.LayoutParams = @params; } return rootView; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState) public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_cash_drawer, container, false); SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE); logicalNameEditText = (EditText) view.findViewById(R.id.editTextLogicalName); logicalNameEditText.Text = settings.getString(MainActivity.KEY_LOGICAL_NAME_POS_PRINTER, getString([email protected]_drawer)); view.findViewById(R.id.buttonOpen).OnClickListener = this; view.findViewById(R.id.buttonClaim).OnClickListener = this; view.findViewById(R.id.buttonRelease).OnClickListener = this; view.findViewById(R.id.buttonClose).OnClickListener = this; view.findViewById(R.id.buttonInfo).OnClickListener = this; view.findViewById(R.id.buttonCheckHealth).OnClickListener = this; deviceEnabledCheckBox = (CheckBox) view.findViewById(R.id.checkBoxDeviceEnabled); deviceEnabledCheckBox.OnCheckedChangeListener = this; view.findViewById(R.id.buttonOpenDrawer).OnClickListener = this; view.findViewById(R.id.buttonGetDrawerOpened).OnClickListener = this; stateTextView = (TextView) view.findViewById(R.id.textViewState); deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages); deviceMessagesTextView.MovementMethod = new ScrollingMovementMethod(); deviceMessagesTextView.VerticalScrollBarEnabled = true; return view; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { TextView v = new TextView(Activity); v.Gravity = Gravity.CENTER; v.TextSize = 40; v.TextColor = Color.BLACK; v.BackgroundColor = colour; v.Text = "Fragment ID: " + identifier; return v; }
public override object instantiateItem(ViewGroup container, int position) { Context context = container.Context; LayoutInflater inflater = LayoutInflater.from(context); View view = inflater.inflate(R.layout.item_font, container, false); RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView); int nbColumns = AndroidUtils.getScreenSize((Activity) context).width / context.Resources.getDimensionPixelSize(R.dimen.item_width); recyclerView.LayoutManager = new GridLayoutManager(context, nbColumns); recyclerView.Adapter = new IconAdapter(fonts[position].Font.characters()); container.addView(view); return view; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_pos_printer_firmware, container, false); fileNameEditText = (EditText) view.findViewById(R.id.editTextFileName); view.findViewById(R.id.buttonBrowse).OnClickListener = this; view.findViewById(R.id.buttonGo).OnClickListener = this; deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages); return view; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState) public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_pos_printer_common, container, false); SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE); logicalNameEditText = (EditText) view.findViewById(R.id.editTextLogicalName); logicalNameEditText.Text = settings.getString(MainActivity.KEY_LOGICAL_NAME_POS_PRINTER, getString([email protected]_printer)); view.findViewById(R.id.buttonOpen).OnClickListener = this; view.findViewById(R.id.buttonClaim).OnClickListener = this; view.findViewById(R.id.buttonRelease).OnClickListener = this; view.findViewById(R.id.buttonClose).OnClickListener = this; view.findViewById(R.id.buttonInfo).OnClickListener = this; view.findViewById(R.id.buttonCheckHealth).OnClickListener = this; deviceEnabledCheckBox = (CheckBox) view.findViewById(R.id.checkBoxDeviceEnabled); deviceEnabledCheckBox.OnCheckedChangeListener = this; asyncModeCheckBox = (CheckBox) view.findViewById(R.id.checkBoxAsyncMode); asyncModeCheckBox.OnCheckedChangeListener = this; try { deviceEnabledCheckBox.Checked = posPrinter.DeviceEnabled; } catch (JposException e) { // TODO Auto-generated catch block Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); } try { asyncModeCheckBox.Checked = posPrinter.AsyncMode; } catch (JposException e) { // TODO Auto-generated catch block Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); } stateTextView = (TextView) view.findViewById(R.id.textViewState); deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages); deviceMessagesTextView.MovementMethod = new ScrollingMovementMethod(); deviceMessagesTextView.VerticalScrollBarEnabled = true; return view; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_pos_printer_direct_io, container, false); view.findViewById(R.id.buttonDirectIO).OnClickListener = this; view.findViewById(R.id.buttonBatteryStatus).OnClickListener = this; dataSpinner = (Spinner) view.findViewById(R.id.spinnerData); ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(Activity, android.R.layout.simple_spinner_item, DATA_STRING); adapter.DropDownViewResource = android.R.layout.simple_spinner_dropdown_item; dataSpinner.Adapter = adapter; deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages); deviceMessagesTextView.MovementMethod = new ScrollingMovementMethod(); deviceMessagesTextView.VerticalScrollBarEnabled = true; return view; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(com.opentok.android.demo.opentoksamples.R.layout.layout_fragment_pub_control, container, false); mPublisherContainer = (RelativeLayout) openTokActivity.findViewById(com.opentok.android.demo.opentoksamples.R.id.fragment_pub_container); mPublisherMute = (ImageButton) rootView.findViewById(com.opentok.android.demo.opentoksamples.R.id.mutePublisher); mPublisherMute.OnClickListener = this; mSwapCamera = (ImageButton) rootView.findViewById(com.opentok.android.demo.opentoksamples.R.id.swapCamera); mSwapCamera.OnClickListener = this; mEndCall = (Button) rootView.findViewById(com.opentok.android.demo.opentoksamples.R.id.endCall); mEndCall.OnClickListener = this; return rootView; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.layout_fragment_pub_status, container, false); mPubStatusContainer = (RelativeLayout) openTokActivity.findViewById(R.id.fragment_pub_status_container); archiving = (ImageButton) rootView.findViewById(R.id.archiving); statusText = (TextView) rootView.findViewById(R.id.statusLabel); if (openTokActivity.Resources.Configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) { RelativeLayout.LayoutParams @params = (RelativeLayout.LayoutParams) container.LayoutParams; DisplayMetrics metrics = new DisplayMetrics(); openTokActivity.WindowManager.DefaultDisplay.getMetrics(metrics); @params.width = metrics.widthPixels - openTokActivity.dpToPx(48); container.LayoutParams = @params; } return rootView; }
public override android.view.View getItemView([email protected] item, android.view.View convertView, android.view.ViewGroup parent) { android.view.View actionView = item.getActionView(); if (actionView == null || item.hasCollapsibleActionView()) { if (!(convertView is [email protected])) { convertView = null; } actionView = base.getItemView(item, convertView, parent); } actionView.setVisibility(item.isActionViewExpanded() ? android.view.View.GONE : android.view.View .VISIBLE); [email protected] menuParent = ([email protected] )parent; android.view.ViewGroup.LayoutParams lp = actionView.getLayoutParams(); if (!menuParent.checkLayoutParams(lp)) { actionView.setLayoutParams((([email protected] )menuParent.generateLayoutParams(lp))); } return(actionView); }
public virtual global::android.view.View inflate(org.xmlpull.v1.XmlPullParser arg0, android.view.ViewGroup arg1, bool arg2) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::android.view.LayoutInflater._inflate8848, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2))) as android.view.View); } else { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.view.LayoutInflater.staticClass, global::android.view.LayoutInflater._inflate8848, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2))) as android.view.View); } }
private int measureContentWidth(android.widget.ListAdapter adapter) { // Menus don't tend to be long, so this is more sane than it looks. int width = 0; android.view.View itemView = null; int itemType = 0; int widthMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View .MeasureSpec.UNSPECIFIED); int heightMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View .MeasureSpec.UNSPECIFIED); int count = adapter.getCount(); { for (int i = 0; i < count; i++) { int positionType = adapter.getItemViewType(i); if (positionType != itemType) { itemType = positionType; itemView = null; } if (mMeasureParent == null) { mMeasureParent = new android.widget.FrameLayout(mContext); } itemView = adapter.getView(i, itemView, mMeasureParent); itemView.measure(widthMeasureSpec, heightMeasureSpec); width = System.Math.Max(width, itemView.getMeasuredWidth()); } } return width; }
public override bool flagActionItems() { java.util.ArrayList <*****@*****.**> visibleItems = mMenu .getVisibleItems(); int itemsSize = visibleItems.size(); int maxActions = mMaxItems; int widthLimit = mActionItemWidthLimit; int querySpec = android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View .MeasureSpec.UNSPECIFIED); android.view.ViewGroup parent = (android.view.ViewGroup)mMenuView; int requiredItems = 0; int requestedItems = 0; int firstActionWidth = 0; bool hasOverflow = false; { for (int i = 0; i < itemsSize; i++) { [email protected] item = visibleItems.get(i); if (item.requiresActionButton()) { requiredItems++; } else { if (item.requestsActionButton()) { requestedItems++; } else { hasOverflow = true; } } if (mExpandedActionViewsExclusive && item.isActionViewExpanded()) { // Overflow everything if we have an expanded action view and we're // space constrained. maxActions = 0; } } } // Reserve a spot for the overflow item if needed. if (mReserveOverflow && (hasOverflow || requiredItems + requestedItems > maxActions )) { maxActions--; } maxActions -= requiredItems; android.util.SparseBooleanArray seenGroups = mActionButtonGroups; seenGroups.clear(); int cellSize = 0; int cellsRemaining = 0; if (mStrictWidthLimit) { cellsRemaining = widthLimit / mMinCellSize; int cellSizeRemaining = widthLimit % mMinCellSize; cellSize = mMinCellSize + cellSizeRemaining / cellsRemaining; } { // Flag as many more requested items as will fit. for (int i_1 = 0; i_1 < itemsSize; i_1++) { [email protected] item = visibleItems.get(i_1); if (item.requiresActionButton()) { android.view.View v = getItemView(item, mScrapActionButtonView, parent); if (mScrapActionButtonView == null) { mScrapActionButtonView = v; } if (mStrictWidthLimit) { cellsRemaining -= [email protected] (v, cellSize, cellsRemaining, querySpec, 0); } else { v.measure(querySpec, querySpec); } int measuredWidth = v.getMeasuredWidth(); widthLimit -= measuredWidth; if (firstActionWidth == 0) { firstActionWidth = measuredWidth; } int groupId = item.getGroupId(); if (groupId != 0) { seenGroups.put(groupId, true); } item.setIsActionButton(true); } else { if (item.requestsActionButton()) { // Items in a group with other items that already have an action slot // can break the max actions rule, but not the width limit. int groupId = item.getGroupId(); bool inGroup = seenGroups.get(groupId); bool isAction = (maxActions > 0 || inGroup) && widthLimit > 0 && (!mStrictWidthLimit || cellsRemaining > 0); if (isAction) { android.view.View v = getItemView(item, mScrapActionButtonView, parent); if (mScrapActionButtonView == null) { mScrapActionButtonView = v; } if (mStrictWidthLimit) { int cells = [email protected](v, cellSize , cellsRemaining, querySpec, 0); cellsRemaining -= cells; if (cells == 0) { isAction = false; } } else { v.measure(querySpec, querySpec); } int measuredWidth = v.getMeasuredWidth(); widthLimit -= measuredWidth; if (firstActionWidth == 0) { firstActionWidth = measuredWidth; } if (mStrictWidthLimit) { isAction &= widthLimit >= 0; } else { // Did this push the entire first item past the limit? isAction &= widthLimit + firstActionWidth > 0; } } if (isAction && groupId != 0) { seenGroups.put(groupId, true); } else { if (inGroup) { // We broke the width limit. Demote the whole group, they all overflow now. seenGroups.put(groupId, false); { for (int j = 0; j < i_1; j++) { [email protected] areYouMyGroupie = visibleItems.get(j); if (areYouMyGroupie.getGroupId() == groupId) { // Give back the action slot if (areYouMyGroupie.isActionButton()) { maxActions++; } areYouMyGroupie.setIsActionButton(false); } } } } } if (isAction) { maxActions--; } item.setIsActionButton(isAction); } } } } return(true); }
global::android.view.View android.widget.ExpandableListAdapter.getChildView(int arg0, int arg1, bool arg2, android.view.View arg3, android.view.ViewGroup arg4) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::android.widget.ExpandableListAdapter_._getChildView11223, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4))) as android.view.View); } else { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.widget.ExpandableListAdapter_.staticClass, global::android.widget.ExpandableListAdapter_._getChildView11223, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4))) as android.view.View); } }
public virtual View getGroupView(int groupPosition, bool isExpanded, View convertView, ViewGroup parent) { return null; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Set view, remember ImageView for icon and setup onclick listener. View v = inflater.inflate(R.layout.device_picker, container, false); mIcon = (ImageView) v.findViewById(R.id.devicePickerIcon); mIcon.OnClickListener = this; return v; }
public override void destroyItem(ViewGroup container, int position, object @object) { container.removeView((View) @object); }
protected override global::android.view.View newGroupView(android.content.Context arg0, android.database.Cursor arg1, bool arg2, android.view.ViewGroup arg3) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::android.widget.ResourceCursorTreeAdapterScopeChangeShim._newGroupView11832, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3))) as android.view.View); } else { return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.widget.ResourceCursorTreeAdapterScopeChangeShim.staticClass, global::android.widget.ResourceCursorTreeAdapterScopeChangeShim._newGroupView11832, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3))) as android.view.View); } }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_main, container, false); TextView textView = (TextView) rootView.findViewById(R.id.textViewVersion); try { textView.Text = "v" + Activity.PackageManager.getPackageInfo(Activity.PackageName, 0).versionName; } catch (NameNotFoundException e) { // TODO Auto-generated catch block Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); } return rootView; }
public virtual android.view.View getDropDownView(int position, android.view.View convertView, android.view.ViewGroup parent) { return(mAdapter == null ? null : mAdapter.getDropDownView(position, convertView, parent)); }
public virtual android.view.View getView(int position, android.view.View convertView , android.view.ViewGroup parent) { return(getDropDownView(position, convertView, parent)); }
public virtual View getChildView(int groupPosition, int childPosition, bool isLastChild, View convertView, ViewGroup parent) { return null; }
public virtual View getView(int position, View convertView, ViewGroup parent) { return null; }
internal Slider(android.view.ViewGroup parent, int tabId, int barId, int targetId ) { throw new System.NotImplementedException(); }
public override void updateMenuView(bool cleared) { base.updateMenuView(cleared); if (mMenu != null) { java.util.ArrayList <*****@*****.**> actionItems = mMenu .getActionItems(); int count = actionItems.size(); { for (int i = 0; i < count; i++) { android.view.ActionProvider provider = actionItems.get(i).getActionProvider(); if (provider != null) { provider.setSubUiVisibilityListener(this); } } } } java.util.ArrayList <*****@*****.**> nonActionItems = mMenu != null?mMenu.getNonActionItems() : null; bool hasOverflow = false; if (mReserveOverflow && nonActionItems != null) { int count = nonActionItems.size(); if (count == 1) { hasOverflow = !nonActionItems.get(0).isActionViewExpanded(); } else { hasOverflow = count > 0; } } if (hasOverflow) { if (mOverflowButton == null) { mOverflowButton = new android.view.@internal.menu.ActionMenuPresenter.OverflowMenuButton (this, mSystemContext); } android.view.ViewGroup parent = (android.view.ViewGroup)mOverflowButton.getParent (); if (parent != mMenuView) { if (parent != null) { parent.removeView(mOverflowButton); } [email protected] menuView = ([email protected] )mMenuView; menuView.addView(mOverflowButton, menuView.generateOverflowButtonLayoutParams()); } } else { if (mOverflowButton != null && mOverflowButton.getParent() == mMenuView) { ((android.view.ViewGroup)mMenuView).removeView(mOverflowButton); } } (([email protected])mMenuView).setOverflowReserved(mReserveOverflow ); }