private void init(android.view.View decor) { mContext = decor.getContext(); mActionView = ([email protected])decor.findViewById([email protected] .id.action_bar); mContextView = ([email protected])decor.findViewById( [email protected]_context_bar); mContainerView = ([email protected])decor.findViewById( [email protected]_bar_container); mSplitView = ([email protected])decor.findViewById([email protected] .id.split_action_bar); if (mActionView == null || mContextView == null || mContainerView == null) { throw new System.InvalidOperationException(GetType().Name + " can only be used " + "with a compatible window decor layout"); } mActionView.setContextView(mContextView); mContextDisplayMode = mActionView.isSplitActionBar() ? CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL; // Older apps get the home button interaction enabled by default. // Newer apps need to enable it explicitly. setHomeButtonEnabled(mContext.getApplicationInfo().targetSdkVersion < android.os.Build .VERSION_CODES.ICE_CREAM_SANDWICH); setHasEmbeddedTabs(mContext.getResources().getBoolean([email protected][email protected]_bar_embed_tabs )); }
private static android.view.View getPermissionItemView(android.content.Context context , android.view.LayoutInflater inflater, java.lang.CharSequence grpName, java.lang.CharSequence permList, bool dangerous, android.graphics.drawable.Drawable icon) { android.view.View permView = inflater.inflate([email protected]_permission_item , null); android.widget.TextView permGrpView = (android.widget.TextView)permView.findViewById ([email protected]_group); android.widget.TextView permDescView = (android.widget.TextView)permView.findViewById ([email protected]_list); android.widget.ImageView imgView = (android.widget.ImageView)permView.findViewById ([email protected]_icon); imgView.setImageDrawable(icon); if (grpName != null) { permGrpView.setText(grpName); permDescView.setText(permList); } else { permGrpView.setText(permList); permDescView.setVisibility(android.view.View.GONE); } return(permView); }
public override Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(Activity); LayoutInflater inflater = Activity.LayoutInflater; View view = inflater.inflate(R.layout.dialog_file_list, (ViewGroup)Activity.findViewById(android.R.id.content).RootView, false); ListView listView = (ListView)view.findViewById(R.id.listView1); listView.OnItemClickListener = this; fileAdapter = new FileAdapter(this, Activity); listView.Adapter = fileAdapter; pathTextView = (TextView)view.findViewById(R.id.textViewTitle); pathTextView.OnClickListener = this; okButton = (Button)view.findViewById(R.id.buttonOk); okButton.OnClickListener = this; view.findViewById(R.id.buttonCancel).OnClickListener = this; builder.setView(view).setTitle(getString([email protected])); updateFileList(new File(Environment.ExternalStorageDirectory.AbsolutePath)); return(builder.create()); }
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); }
public virtual android.view.View createIndicatorView() { android.content.Context context = this._enclosing.getContext(); android.view.LayoutInflater inflater = (android.view.LayoutInflater)context.getSystemService (android.content.Context.LAYOUT_INFLATER_SERVICE); android.view.View tabIndicator = inflater.inflate(this._enclosing.mTabLayoutId, this ._enclosing.mTabWidget, false); // tab widget is the parent // no inflate params android.widget.TextView tv = (android.widget.TextView)tabIndicator.findViewById([email protected] .id.title); android.widget.ImageView iconView = (android.widget.ImageView)tabIndicator.findViewById ([email protected]); // when icon is gone by default, we're in exclusive mode bool exclusive = iconView.getVisibility() == android.view.View.GONE; bool bindIcon = !exclusive || android.text.TextUtils.isEmpty(this.mLabel); tv.setText(this.mLabel); if (bindIcon && this.mIcon != null) { iconView.setImageDrawable(this.mIcon); iconView.setVisibility(android.view.View.VISIBLE); } if (context.getApplicationInfo().targetSdkVersion <= android.os.Build.VERSION_CODES .DONUT) { // Donut apps get old color scheme tabIndicator.setBackgroundResource([email protected]_indicator_v4); tv.setTextColor(context.getResources().getColorStateList([email protected] .tab_indicator_text_v4)); } return(tabIndicator); }
public override android.view.View getView(int position, android.view.View convertView , android.view.ViewGroup parent) { int itemViewType = this.getItemViewType(position); switch (itemViewType) { case ITEM_VIEW_TYPE_FOOTER: { if (convertView == null || convertView.getId() != ITEM_VIEW_TYPE_FOOTER) { convertView = android.view.LayoutInflater.from(this._enclosing.getContext()).inflate ([email protected]_chooser_view_list_item, parent, false); convertView.setId(ITEM_VIEW_TYPE_FOOTER); android.widget.TextView titleView = (android.widget.TextView)convertView.findViewById ([email protected]); titleView.setText(java.lang.CharSequenceProxy.Wrap(this._enclosing.mContext.getString ([email protected][email protected]_chooser_view_see_all))); } return(convertView); } case ITEM_VIEW_TYPE_ACTIVITY: { if (convertView == null || convertView.getId() != [email protected]_item) { convertView = android.view.LayoutInflater.from(this._enclosing.getContext()).inflate ([email protected]_chooser_view_list_item, parent, false); } android.content.pm.PackageManager packageManager = this._enclosing.mContext.getPackageManager (); // Set the icon android.widget.ImageView iconView = (android.widget.ImageView)convertView.findViewById ([email protected]); android.content.pm.ResolveInfo activity = (android.content.pm.ResolveInfo) this.getItem (position); iconView.setImageDrawable(activity.loadIcon(packageManager)); // Set the title. android.widget.TextView titleView_1 = (android.widget.TextView)convertView.findViewById ([email protected]); titleView_1.setText(activity.loadLabel(packageManager)); // Highlight the default. if (this.mShowDefaultActivity && position == 0 && this.mHighlightDefaultActivity) { convertView.setActivated(true); } else { convertView.setActivated(false); } return(convertView); } default: { throw new System.ArgumentException(); } } }
public ChildViewCache(android.view.View v) { mText1 = (android.widget.TextView)v.findViewById([email protected]); mText2 = (android.widget.TextView)v.findViewById([email protected]); mIcon1 = (android.widget.ImageView)v.findViewById([email protected]); mIcon2 = (android.widget.ImageView)v.findViewById([email protected]); mIconRefine = (android.widget.ImageView)v.findViewById([email protected]_query ); }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_asynctask, container, false); logsView = (LinearLayout)rootView.findViewById(R.id.logs); progressView = (ProgressBar)rootView.findViewById(R.id.progressBar); progressView.Visibility = View.GONE; rootView.findViewById(R.id.start_button).OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); return(rootView); }
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); }
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) { // 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); }
/// <summary> /// Bind an instance of the <code>Chat</code> class to our view. This method is called by <code>FirebaseListAdapter</code> /// when there is a data change, and we are given an instance of a View that corresponds to the layout that we passed /// to the constructor, as well as a single <code>Chat</code> instance that represents the current data to bind. /// </summary> /// <param name="view"> A view instance corresponding to the layout we passed to the constructor. </param> /// <param name="chat"> An instance representing the current state of a chat message </param> protected internal override void populateView(View view, Chat chat) { // Map a Chat object to an entry in our listview string author = chat.Author; TextView authorText = (TextView)view.findViewById(R.id.author); authorText.Text = author + ": "; // If the message was sent by this user, color it differently if (author != null && author.Equals(mUsername)) { authorText.TextColor = Color.RED; } else { authorText.TextColor = Color.BLUE; } ((TextView)view.findViewById(R.id.message)).Text = chat.Message; }
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 virtual void initForMode(android.view.ActionMode mode) { if (mClose == null) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext); mClose = inflater.inflate([email protected]_mode_close_item, this , false); addView(mClose); } else { if (mClose.getParent() == null) { addView(mClose); } } android.view.View closeButton = mClose.findViewById([email protected]_mode_close_button ); closeButton.setOnClickListener(new _OnClickListener_212(mode)); [email protected] menu = ([email protected] )mode.getMenu(); mActionMenuPresenter = new [email protected](mContext ); mActionMenuPresenter.setReserveOverflow(true); android.view.ViewGroup.LayoutParams layoutParams = new android.view.ViewGroup.LayoutParams (android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams .MATCH_PARENT); if (!mSplitActionBar) { menu.addMenuPresenter(mActionMenuPresenter); mMenuView = ([email protected])mActionMenuPresenter.getMenuView (this); mMenuView.setBackgroundDrawable(null); addView(mMenuView, layoutParams); } else { // Allow full screen width in split mode. mActionMenuPresenter.setWidthLimit(getContext().getResources().getDisplayMetrics( ).widthPixels, true); // No limit to the item count; use whatever will fit. mActionMenuPresenter.setItemLimit(int.MaxValue); // Span the whole width layoutParams.width = android.view.ViewGroup.LayoutParams.MATCH_PARENT; layoutParams.height = mContentHeight; menu.addMenuPresenter(mActionMenuPresenter); mMenuView = ([email protected])mActionMenuPresenter.getMenuView (this); mMenuView.setBackgroundDrawable(mSplitBackground); mSplitView.addView(mMenuView, layoutParams); } mAnimateInOnLayout = true; }
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 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 ActionBarImpl(android.app.Activity activity) { mHideListener = new _AnimatorListenerAdapter_108(this); mShowListener = new _AnimatorListenerAdapter_125(this); mActivity = activity; android.view.Window window = activity.getWindow(); android.view.View decor = window.getDecorView(); init(decor); if (!mActivity.getWindow().hasFeature(android.view.Window.FEATURE_ACTION_BAR_OVERLAY )) { mContentView = decor.findViewById(android.R.id.content); } }
public override void onClick(DialogInterface dialog, int which) { RelativeLayout layout = (RelativeLayout)view.findViewById(R.id.relativeLayout1); layout.buildDrawingCache(); Bitmap bitmap = layout.DrawingCache; MainActivity.mBixolonPrinter.setPageMode(); MainActivity.mBixolonPrinter.PrintDirection = BixolonPrinter.DIRECTION_180_DEGREE_ROTATION; MainActivity.mBixolonPrinter.setPrintArea(0, 0, 384, 840); MainActivity.mBixolonPrinter.AbsoluteVerticalPrintPosition = 100; MainActivity.mBixolonPrinter.printBitmap(bitmap, BixolonPrinter.ALIGNMENT_CENTER, BixolonPrinter.BITMAP_WIDTH_FULL, 88, false); MainActivity.mBixolonPrinter.formFeed(true); }
/// <summary>Make a standard toast that just contains a text view.</summary> /// <remarks>Make a standard toast that just contains a text view.</remarks> /// <param name="context"> /// The context to use. Usually your /// <see cref="android.app.Application">android.app.Application</see> /// or /// <see cref="android.app.Activity">android.app.Activity</see> /// object. /// </param> /// <param name="text">The text to show. Can be formatted text.</param> /// <param name="duration"> /// How long to display the message. Either /// <see cref="LENGTH_SHORT">LENGTH_SHORT</see> /// or /// <see cref="LENGTH_LONG">LENGTH_LONG</see> /// </param> public static android.widget.Toast makeText(android.content.Context context, java.lang.CharSequence text, int duration) { android.widget.Toast result = new android.widget.Toast(context); android.view.LayoutInflater inflate = (android.view.LayoutInflater)context.getSystemService (android.content.Context.LAYOUT_INFLATER_SERVICE); android.view.View v = inflate.inflate([email protected]_notification , null); android.widget.TextView tv = (android.widget.TextView)v.findViewById([email protected] .id.message); tv.setText(text); result.mNextView = v; result.mDuration = duration; return(result); }
public virtual android.view.View getPermissionsView() { mInflater = (android.view.LayoutInflater)mContext.getSystemService(android.content.Context .LAYOUT_INFLATER_SERVICE); mPermsView = (android.widget.LinearLayout)mInflater.inflate([email protected] .app_perms_summary, null); mShowMore = mPermsView.findViewById([email protected]_more); mShowMoreIcon = (android.widget.ImageView)mShowMore.findViewById([email protected] .id.show_more_icon); mShowMoreText = (android.widget.TextView)mShowMore.findViewById([email protected] .id.show_more_text); mDangerousList = (android.widget.LinearLayout)mPermsView.findViewById([email protected] .id.dangerous_perms_list); mNonDangerousList = (android.widget.LinearLayout)mPermsView.findViewById([email protected] .id.non_dangerous_perms_list); mNoPermsView = mPermsView.findViewById([email protected]_permissions); // Set up the LinearLayout that acts like a list item. mShowMore.setClickable(true); mShowMore.setOnClickListener(this); mShowMore.setFocusable(true); // Pick up from framework resources instead. mDefaultGrpLabel = mContext.getString([email protected][email protected]_permission_group ); mPermFormat = mContext.getString([email protected][email protected]_format); mNormalIcon = mContext.getResources().getDrawable([email protected]_text_dot ); mDangerousIcon = mContext.getResources().getDrawable([email protected] .ic_bullet_key_permission); mShowMaxIcon = mContext.getResources().getDrawable([email protected]_close_holo_dark ); mShowMinIcon = mContext.getResources().getDrawable([email protected]_open_holo_dark ); // Set permissions view setPermissions(mPermsList); return(mPermsView); }
public override void bindView(android.view.View view, android.content.Context context , android.database.Cursor cursor) { android.widget.SimpleCursorAdapter.ViewBinder binder = mViewBinder; int count = mTo.Length; int[] from = mFrom; int[] to = mTo; { for (int i = 0; i < count; i++) { android.view.View v = view.findViewById(to[i]); if (v != null) { bool bound = false; if (binder != null) { bound = binder.setViewValue(v, cursor, from[i]); } if (!bound) { string text = cursor.getString(from[i]); if (text == null) { text = string.Empty; } if (v is android.widget.TextView) { setViewText((android.widget.TextView)v, text); } else { if (v is android.widget.ImageView) { setViewImage((android.widget.ImageView)v, text); } else { throw new System.InvalidOperationException(v.GetType().FullName + " is not a " + " view that can be bounds by this SimpleCursorAdapter"); } } } } } } }
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); }
private void bindView(android.view.View view, android.content.Context context, android.database.Cursor cursor, int[] from, int[] to) { android.widget.SimpleCursorTreeAdapter.ViewBinder binder = mViewBinder; { for (int i = 0; i < to.Length; i++) { android.view.View v = view.findViewById(to[i]); if (v != null) { bool bound = false; if (binder != null) { bound = binder.setViewValue(v, cursor, from[i]); } if (!bound) { string text = cursor.getString(from[i]); if (text == null) { text = string.Empty; } if (v is android.widget.TextView) { setViewText((android.widget.TextView)v, text); } else { if (v is android.widget.ImageView) { setViewImage((android.widget.ImageView)v, text); } else { throw new System.InvalidOperationException("SimpleCursorTreeAdapter can bind values" + " only to TextView and ImageView!"); } } } } } } }
public override View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder; if (convertView == null) { convertView = inflater.inflate(android.R.layout.simple_list_item_1, parent, false); viewHolder = new ViewHolder(); viewHolder.timestamp = (TextView)convertView.findViewById(android.R.id.text1); convertView.Tag = viewHolder; } else { viewHolder = (ViewHolder)convertView.Tag; } TimeStamp item = realmResults.get(position); viewHolder.timestamp.Text = item.getTimeStamp(); return(convertView); }
public virtual android.view.View createIndicatorView() { android.content.Context context = this._enclosing.getContext(); android.view.LayoutInflater inflater = (android.view.LayoutInflater)context.getSystemService (android.content.Context.LAYOUT_INFLATER_SERVICE); android.view.View tabIndicator = inflater.inflate(this._enclosing.mTabLayoutId, this ._enclosing.mTabWidget, false); // tab widget is the parent // no inflate params android.widget.TextView tv = (android.widget.TextView)tabIndicator.findViewById([email protected] .id.title); tv.setText(this.mLabel); if (context.getApplicationInfo().targetSdkVersion <= android.os.Build.VERSION_CODES .DONUT) { // Donut apps get old color scheme tabIndicator.setBackgroundResource([email protected]_indicator_v4); tv.setTextColor(context.getResources().getColorStateList([email protected] .tab_indicator_text_v4)); } return(tabIndicator); }
public override View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = layoutInflater.inflate(R.layout.file_list_item, parent, false); } File file = outerInstance.files[position]; TextView textView = (TextView)convertView.findViewById(R.id.textView1); if (file.Directory) { textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_directory, 0, 0, 0); } else { textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_file, 0, 0, 0); } textView.Text = file.Name; return(convertView); }
public override void bindView(android.view.View view, android.content.Context context , android.database.Cursor cursor) { android.widget.CheckedTextView text = (android.widget.CheckedTextView)view.findViewById ([email protected]); text.setText(java.lang.CharSequenceProxy.Wrap(cursor.getString(this.mLabelIndex)) ); listView.setItemChecked(cursor.getPosition(), cursor.getInt(this.mIsCheckedIndex) == 1); }
private void bindView(int position, android.view.View view) { java.util.Map <string, object> dataSet = mData.get(position); if (dataSet == null) { return; } android.widget.SimpleAdapter.ViewBinder binder = mViewBinder; string[] from = mFrom; int[] to = mTo; int count = to.Length; { for (int i = 0; i < count; i++) { android.view.View v = view.findViewById(to[i]); if (v != null) { object data = dataSet.get(from[i]); string text = data == null ? string.Empty : data.ToString(); if (text == null) { text = string.Empty; } bool bound = false; if (binder != null) { bound = binder.setViewValue(v, data, text); } if (!bound) { if (v is android.widget.Checkable) { if (data is bool) { ((android.widget.Checkable)v).setChecked((bool)data); } else { if (v is android.widget.TextView) { // Note: keep the instanceof TextView check at the bottom of these // ifs since a lot of views are TextViews (e.g. CheckBoxes). setViewText((android.widget.TextView)v, text); } else { throw new System.InvalidOperationException(v.GetType().FullName + " should be bound to a Boolean, not a " + (data == null ? "<unknown type>" : data.GetType().ToString())); } } } else { if (v is android.widget.TextView) { // Note: keep the instanceof TextView check at the bottom of these // ifs since a lot of views are TextViews (e.g. CheckBoxes). setViewText((android.widget.TextView)v, text); } else { if (v is android.widget.ImageView) { if (data is int) { setViewImage((android.widget.ImageView)v, (int)data); } else { setViewImage((android.widget.ImageView)v, text); } } else { throw new System.InvalidOperationException(v.GetType().FullName + " is not a " + " view that can be bounds by this SimpleAdapter"); } } } } } } } }
//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); }
//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); }