Exemple #1
0
//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);
        }
//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;
		}
//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;
		}
Exemple #4
0
        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 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;
		}
Exemple #7
0
 /// <summary>Standard constructor.</summary>
 /// <remarks>Standard constructor.</remarks>
 /// <param name="context">The context where the ListView associated with this adapter is running
 ///     </param>
 /// <param name="layout">
 /// Resource identifier of a layout file that defines the views
 /// for this list item.  Unless you override them later, this will
 /// define both the item views and the drop down views.
 /// </param>
 /// <param name="c">The cursor from which to get the data.</param>
 /// <param name="flags">
 /// Flags used to determine the behavior of the adapter,
 /// as per
 /// <see cref="CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor, int)
 ///     ">CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor, int)
 ///     </see>
 /// .
 /// </param>
 public ResourceCursorAdapter(android.content.Context context, int layout, android.database.Cursor
                              c, int flags) : base(context, c, flags)
 {
     mLayout   = mDropDownLayout = layout;
     mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
                                                                       .LAYOUT_INFLATER_SERVICE);
 }
Exemple #8
0
        private void initTitle()
        {
            if (mTitleLayout == null)
            {
                android.view.LayoutInflater inflater = android.view.LayoutInflater.from(getContext
                                                                                            ());
                inflater.inflate([email protected]_bar_title_item, this);
                mTitleLayout = (android.widget.LinearLayout)getChildAt(getChildCount() - 1);
                mTitleView   = (android.widget.TextView)mTitleLayout.findViewById([email protected]
                                                                                  .id.action_bar_title);
                mSubtitleView = (android.widget.TextView)mTitleLayout.findViewById([email protected]
                                                                                   .id.action_bar_subtitle);
                if (mTitleStyleRes != 0)
                {
                    mTitleView.setTextAppearance(mContext, mTitleStyleRes);
                }
                if (mSubtitleStyleRes != 0)
                {
                    mSubtitleView.setTextAppearance(mContext, mSubtitleStyleRes);
                }
            }
            mTitleView.setText(mTitle);
            mSubtitleView.setText(mSubtitle);
            bool hasTitle    = !android.text.TextUtils.isEmpty(mTitle);
            bool hasSubtitle = !android.text.TextUtils.isEmpty(mSubtitle);

            mSubtitleView.setVisibility(hasSubtitle ? VISIBLE : GONE);
            mTitleLayout.setVisibility(hasTitle || hasSubtitle ? VISIBLE : GONE);
            if (mTitleLayout.getParent() == null)
            {
                addView(mTitleLayout);
            }
        }
Exemple #9
0
 private android.widget.FrameLayout createContainer()
 {
     android.view.WindowManagerClass.LayoutParams lp = new android.view.WindowManagerClass
                                                       .LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup
                                                                     .LayoutParams.WRAP_CONTENT);
     lp.gravity = android.view.Gravity.TOP | android.view.Gravity.LEFT;
     lp.flags   = android.view.WindowManagerClass.LayoutParams.FLAG_NOT_TOUCHABLE | android.view.WindowManagerClass
                  .LayoutParams.FLAG_NOT_FOCUSABLE | android.view.WindowManagerClass.LayoutParams.
                  FLAG_LAYOUT_NO_LIMITS | android.view.WindowManagerClass.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
     lp.height              = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
     lp.width               = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
     lp.type                = android.view.WindowManagerClass.LayoutParams.TYPE_APPLICATION_PANEL;
     lp.format              = android.graphics.PixelFormat.TRANSLUCENT;
     lp.windowAnimations    = [email protected]_ZoomButtons;
     mContainerLayoutParams = lp;
     android.widget.FrameLayout container = new android.widget.ZoomButtonsController.Container
                                                (this, mContext);
     container.setLayoutParams(lp);
     container.setMeasureAllChildren(true);
     android.view.LayoutInflater inflater = (android.view.LayoutInflater)mContext.getSystemService
                                                (android.content.Context.LAYOUT_INFLATER_SERVICE);
     inflater.inflate([email protected]_container, container);
     mControls = (android.widget.ZoomControls)container.findViewById([email protected]
                                                                     .id.zoomControls);
     mControls.setOnZoomInClickListener(new _OnClickListener_266(this));
     mControls.setOnZoomOutClickListener(new _OnClickListener_272(this));
     return(container);
 }
Exemple #10
0
		public virtual void initForMenu(android.content.Context context, [email protected]
			 menu)
		{
			mContext = context;
			mInflater = android.view.LayoutInflater.from(mContext);
			mMenu = menu;
		}
 public virtual void initForMenu(android.content.Context context, [email protected]
                                 menu)
 {
     mContext  = context;
     mInflater = android.view.LayoutInflater.from(mContext);
     mMenu     = menu;
 }
Exemple #12
0
 private void insertIconView()
 {
     android.view.LayoutInflater inflater = getInflater();
     mIconView = (android.widget.ImageView)inflater.inflate([email protected]
                                                            .list_menu_item_icon, this, false);
     addView(mIconView, 0);
 }
Exemple #13
0
 private void insertRadioButton()
 {
     android.view.LayoutInflater inflater = getInflater();
     mRadioButton = (android.widget.RadioButton)inflater.inflate([email protected]
                                                                 .list_menu_item_radio, this, false);
     addView(mRadioButton);
 }
Exemple #14
0
//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 AlertParams(android.content.Context context)
 {
     mContext    = context;
     mCancelable = true;
     mInflater   = (android.view.LayoutInflater)context.getSystemService(android.content.Context
                                                                         .LAYOUT_INFLATER_SERVICE);
 }
Exemple #16
0
 private void insertCheckBox()
 {
     android.view.LayoutInflater inflater = getInflater();
     mCheckBox = (android.widget.CheckBox)inflater.inflate([email protected].
                                                           list_menu_item_checkbox, this, false);
     addView(mCheckBox);
 }
		/// <summary>
		/// Constructor with default behavior as per
		/// <see cref="CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor, bool)
		/// 	">CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor, bool)
		/// 	</see>
		/// ; it is recommended
		/// you not use this, but instead
		/// <see cref="ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, int)
		/// 	">ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, int)
		/// 	</see>
		/// .
		/// When using this constructor,
		/// <see cref="CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER">CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER
		/// 	</see>
		/// will always be set.
		/// </summary>
		/// <param name="context">The context where the ListView associated with this adapter is running
		/// 	</param>
		/// <param name="layout">
		/// resource identifier of a layout file that defines the views
		/// for this list item.  Unless you override them later, this will
		/// define both the item views and the drop down views.
		/// </param>
		/// <param name="c">The cursor from which to get the data.</param>
		/// <param name="autoRequery">
		/// If true the adapter will call requery() on the
		/// cursor whenever it changes so the most recent
		/// data is always displayed.  Using true here is discouraged.
		/// </param>
		public ResourceCursorAdapter(android.content.Context context, int layout, android.database.Cursor
			 c, bool autoRequery) : base(context, c, autoRequery)
		{
			mLayout = mDropDownLayout = layout;
			mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
				.LAYOUT_INFLATER_SERVICE);
		}
Exemple #18
0
            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);
            }
 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);
 }
 /// <summary>Construct a new BaseMenuPresenter.</summary>
 /// <remarks>Construct a new BaseMenuPresenter.</remarks>
 /// <param name="context">Context for generating system-supplied views</param>
 /// <param name="menuLayoutRes">Layout resource ID for the menu container view</param>
 /// <param name="itemLayoutRes">Layout resource ID for a single item view</param>
 public BaseMenuPresenter(android.content.Context context, int menuLayoutRes, int
                          itemLayoutRes)
 {
     mSystemContext  = context;
     mSystemInflater = android.view.LayoutInflater.from(context);
     mMenuLayoutRes  = menuLayoutRes;
     mItemLayoutRes  = itemLayoutRes;
 }
Exemple #21
0
		/// <summary>Construct a new BaseMenuPresenter.</summary>
		/// <remarks>Construct a new BaseMenuPresenter.</remarks>
		/// <param name="context">Context for generating system-supplied views</param>
		/// <param name="menuLayoutRes">Layout resource ID for the menu container view</param>
		/// <param name="itemLayoutRes">Layout resource ID for a single item view</param>
		public BaseMenuPresenter(android.content.Context context, int menuLayoutRes, int 
			itemLayoutRes)
		{
			mSystemContext = context;
			mSystemInflater = android.view.LayoutInflater.from(context);
			mMenuLayoutRes = menuLayoutRes;
			mItemLayoutRes = itemLayoutRes;
		}
Exemple #22
0
 private android.view.LayoutInflater getInflater()
 {
     if (mInflater == null)
     {
         mInflater = android.view.LayoutInflater.from(mContext);
     }
     return(mInflater);
 }
Exemple #23
0
 public android.view.MenuItem setActionView(int resId)
 {
     android.content.Context     context  = mMenu.getContext();
     android.view.LayoutInflater inflater = android.view.LayoutInflater.from(context);
     setActionView(inflater.inflate(resId, new android.widget.LinearLayout(context), false
                                    ));
     return(this);
 }
Exemple #24
0
        private BaseViewHolder createSpacerHolder(ViewGroup parent)
        {
            LayoutInflater inflater = (LayoutInflater)parent.Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            View view = inflater.inflate(R.layout.fc_item_spacer, parent, false);

            return(new SpacerViewHolder(view));
        }
Exemple #25
0
        /// <summary>
        /// @brief Called when RecyclerView needs a new RecyclerView.ViewHolder of "ordinal application"
        /// type to represent an item.
        ///
        /// Ordinal application means instrument or effect.
        /// </summary>
        /// <param name="parent"> The ViewGroup into which the new View will be added after it is bound to
        ///               an adapter position
        /// </param>
        /// <returns> A new ViewHolder that holds a View of "ordinal application" type </returns>
        private BaseViewHolder createOrdinalAppHolder(ViewGroup parent)
        {
            LayoutInflater inflater = (LayoutInflater)parent.Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            View view = inflater.inflate(R.layout.fc_item_ordinal, parent, false);

            return(new OrdinalAppViewHolder(mContext, view, this));
        }
        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);
        }
Exemple #27
0
		/// <summary>Constructor</summary>
		/// <param name="context">The context where the View associated with this SimpleAdapter is running
		/// 	</param>
		/// <param name="data">
		/// A List of Maps. Each entry in the List corresponds to one row in the list. The
		/// Maps contain the data for each row, and should include all the entries specified in
		/// "from"
		/// </param>
		/// <param name="resource">
		/// Resource identifier of a view layout that defines the views for this list
		/// item. The layout file should include at least those named views defined in "to"
		/// </param>
		/// <param name="from">
		/// A list of column names that will be added to the Map associated with each
		/// item.
		/// </param>
		/// <param name="to">
		/// The views that should display column in the "from" parameter. These should all be
		/// TextViews. The first N views in this list are given the values of the first N columns
		/// in the from parameter.
		/// </param>
		public SimpleAdapter(android.content.Context context, java.util.List<java.util.Map
			<string, object>> data, int resource, string[] from, int[] to)
		{
			mData = data;
			mResource = mDropDownResource = resource;
			mFrom = from;
			mTo = to;
			mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
				.LAYOUT_INFLATER_SERVICE);
		}
		/// <summary>
		/// Creates a new CharacterPickerDialog that presents the specified
		/// <code>options</code> for insertion or replacement (depending on
		/// the sense of <code>insert</code>) into <code>text</code>.
		/// </summary>
		/// <remarks>
		/// Creates a new CharacterPickerDialog that presents the specified
		/// <code>options</code> for insertion or replacement (depending on
		/// the sense of <code>insert</code>) into <code>text</code>.
		/// </remarks>
		public CharacterPickerDialog(android.content.Context context, android.view.View view
			, android.text.Editable text, string options, bool insert) : base(context, [email protected]
			.style.Theme_Panel)
		{
			mView = view;
			mText = text;
			mOptions = options;
			mInsert = insert;
			mInflater = android.view.LayoutInflater.from(context);
		}
Exemple #29
0
 /// <summary>Constructor</summary>
 /// <param name="context">The context where the View associated with this SimpleAdapter is running
 ///     </param>
 /// <param name="data">
 /// A List of Maps. Each entry in the List corresponds to one row in the list. The
 /// Maps contain the data for each row, and should include all the entries specified in
 /// "from"
 /// </param>
 /// <param name="resource">
 /// Resource identifier of a view layout that defines the views for this list
 /// item. The layout file should include at least those named views defined in "to"
 /// </param>
 /// <param name="from">
 /// A list of column names that will be added to the Map associated with each
 /// item.
 /// </param>
 /// <param name="to">
 /// The views that should display column in the "from" parameter. These should all be
 /// TextViews. The first N views in this list are given the values of the first N columns
 /// in the from parameter.
 /// </param>
 public SimpleAdapter(android.content.Context context, java.util.List <java.util.Map
                                                                       <string, object> > data, int resource, string[] from, int[] to)
 {
     mData     = data;
     mResource = mDropDownResource = resource;
     mFrom     = from;
     mTo       = to;
     mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
                                                                       .LAYOUT_INFLATER_SERVICE);
 }
 /// <summary>
 /// Creates a new CharacterPickerDialog that presents the specified
 /// <code>options</code> for insertion or replacement (depending on
 /// the sense of <code>insert</code>) into <code>text</code>.
 /// </summary>
 /// <remarks>
 /// Creates a new CharacterPickerDialog that presents the specified
 /// <code>options</code> for insertion or replacement (depending on
 /// the sense of <code>insert</code>) into <code>text</code>.
 /// </remarks>
 public CharacterPickerDialog(android.content.Context context, android.view.View view
                              , android.text.Editable text, string options, bool insert) : base(context, [email protected]
                                                                                                .style.Theme_Panel)
 {
     mView     = view;
     mText     = text;
     mOptions  = options;
     mInsert   = insert;
     mInflater = android.view.LayoutInflater.from(context);
 }
		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;
		}
Exemple #32
0
 private void init(android.content.Context context, int resource, int textViewResourceId
                   , java.util.List <T> objects)
 {
     mContext  = context;
     mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
                                                                       .LAYOUT_INFLATER_SERVICE);
     mResource = mDropDownResource = resource;
     mObjects  = objects;
     mFieldId  = textViewResourceId;
 }
		/// <summary>Constructor.</summary>
		/// <remarks>Constructor.</remarks>
		/// <param name="context">
		/// The context where the ListView associated with this
		/// SimpleListItemFactory is running
		/// </param>
		/// <param name="cursor">The database cursor</param>
		/// <param name="collapsedGroupLayout">
		/// resource identifier of a layout file that
		/// defines the views for collapsed groups.
		/// </param>
		/// <param name="expandedGroupLayout">
		/// resource identifier of a layout file that
		/// defines the views for expanded groups.
		/// </param>
		/// <param name="childLayout">
		/// resource identifier of a layout file that defines the
		/// views for all children but the last..
		/// </param>
		/// <param name="lastChildLayout">
		/// resource identifier of a layout file that defines
		/// the views for the last child of a group.
		/// </param>
		public ResourceCursorTreeAdapter(android.content.Context context, android.database.Cursor
			 cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int
			 lastChildLayout) : base(cursor, context)
		{
			mCollapsedGroupLayout = collapsedGroupLayout;
			mExpandedGroupLayout = expandedGroupLayout;
			mChildLayout = childLayout;
			mLastChildLayout = lastChildLayout;
			mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
				.LAYOUT_INFLATER_SERVICE);
		}
Exemple #34
0
        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);
        }
Exemple #35
0
        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);
        }
 /// <summary>Constructor.</summary>
 /// <remarks>Constructor.</remarks>
 /// <param name="context">
 /// The context where the ListView associated with this
 /// SimpleListItemFactory is running
 /// </param>
 /// <param name="cursor">The database cursor</param>
 /// <param name="collapsedGroupLayout">
 /// resource identifier of a layout file that
 /// defines the views for collapsed groups.
 /// </param>
 /// <param name="expandedGroupLayout">
 /// resource identifier of a layout file that
 /// defines the views for expanded groups.
 /// </param>
 /// <param name="childLayout">
 /// resource identifier of a layout file that defines the
 /// views for all children but the last..
 /// </param>
 /// <param name="lastChildLayout">
 /// resource identifier of a layout file that defines
 /// the views for the last child of a group.
 /// </param>
 public ResourceCursorTreeAdapter(android.content.Context context, android.database.Cursor
                                  cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int
                                  lastChildLayout) : base(cursor, context)
 {
     mCollapsedGroupLayout = collapsedGroupLayout;
     mExpandedGroupLayout  = expandedGroupLayout;
     mChildLayout          = childLayout;
     mLastChildLayout      = lastChildLayout;
     mInflater             = (android.view.LayoutInflater)context.getSystemService(android.content.Context
                                                                                   .LAYOUT_INFLATER_SERVICE);
 }
Exemple #37
0
 /// <summary>
 /// Creates the item view for the 'More' button which is used to switch to
 /// the expanded menu view.
 /// </summary>
 /// <remarks>
 /// Creates the item view for the 'More' button which is used to switch to
 /// the expanded menu view. This button is a special case since it does not
 /// have a MenuItemData backing it.
 /// </remarks>
 /// <returns>The IconMenuItemView for the 'More' button</returns>
 internal [email protected] createMoreItemView()
 {
     android.content.Context     context  = getContext();
     android.view.LayoutInflater inflater = android.view.LayoutInflater.from(context);
     [email protected] itemView = ([email protected]
                                                              )inflater.inflate([email protected]_menu_item_layout, null);
     android.content.res.Resources r = context.getResources();
     itemView.initialize(r.getText([email protected][email protected]_item_label), mMoreIcon
                         );
     itemView.setOnClickListener(new _OnClickListener_303(this));
     return(itemView);
 }
Exemple #38
0
 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;
 }
Exemple #39
0
 public ZoomControls(android.content.Context context, android.util.AttributeSet attrs
                     ) : base(context, attrs)
 {
     setFocusable(false);
     android.view.LayoutInflater inflater = (android.view.LayoutInflater)context.getSystemService
                                                (android.content.Context.LAYOUT_INFLATER_SERVICE);
     inflater.inflate([email protected]_controls, this, true);
     // we are the parent
     mZoomIn  = (android.widget.ZoomButton)findViewById([email protected]);
     mZoomOut = (android.widget.ZoomButton)findViewById([email protected]
                                                        );
 }
Exemple #40
0
 public override object getSystemService(string name)
 {
     if (LAYOUT_INFLATER_SERVICE.Equals(name))
     {
         if (mInflater == null)
         {
             mInflater = android.view.LayoutInflater.from(mBase).cloneInContext(this);
         }
         return(mInflater);
     }
     return(mBase.getSystemService(name));
 }
Exemple #41
0
		public MenuPopupHelper(android.content.Context context, [email protected]
			 menu, android.view.View anchorView, bool overflowOnly)
		{
			mContext = context;
			mInflater = android.view.LayoutInflater.from(context);
			mMenu = menu;
			mOverflowOnly = overflowOnly;
			android.content.res.Resources res = context.getResources();
			mPopupMaxWidth = System.Math.Max(res.getDisplayMetrics().widthPixels / 2, res.getDimensionPixelSize
				([email protected]_prefDialogWidth));
			mAnchorView = anchorView;
			menu.addMenuPresenter(this);
		}
		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;
		}
Exemple #46
0
		public virtual void initForMenu(android.content.Context context, [email protected]
			 menu)
		{
			if (mThemeRes != 0)
			{
				mContext = new android.view.ContextThemeWrapper(context, mThemeRes);
				mInflater = android.view.LayoutInflater.from(mContext);
			}
			else
			{
				if (mContext != null)
				{
					mContext = context;
					if (mInflater == null)
					{
						mInflater = android.view.LayoutInflater.from(mContext);
					}
				}
			}
			mMenu = menu;
		}
		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 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 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;
		}
Exemple #50
0
		/// <summary>Construct a new ListMenuPresenter.</summary>
		/// <remarks>Construct a new ListMenuPresenter.</remarks>
		/// <param name="context">
		/// Context to use for theming. This will supersede the context provided
		/// to initForMenu when this presenter is added.
		/// </param>
		/// <param name="itemLayoutRes">Layout resource for individual item views.</param>
		public ListMenuPresenter(android.content.Context context, int itemLayoutRes) : this
			(itemLayoutRes, 0)
		{
			mContext = context;
			mInflater = android.view.LayoutInflater.from(mContext);
		}
Exemple #51
0
		private android.view.LayoutInflater getInflater()
		{
			if (mInflater == null)
			{
				mInflater = android.view.LayoutInflater.from(mContext);
			}
			return mInflater;
		}