protected internal override android.view.View newChildView(android.content.Context
                                                            context, android.database.Cursor cursor, bool isLastChild, android.view.ViewGroup
                                                            parent)
 {
     return(mInflater.inflate((isLastChild) ? mLastChildLayout : mChildLayout, parent,
                              false));
 }
 public virtual [email protected] getMenuView(android.view.ViewGroup
                                                                 root)
 {
     if (mMenuView == null)
     {
         mMenuView = ([email protected])mSystemInflater.inflate(mMenuLayoutRes
                                                                                   , root, false);
         mMenuView.initialize(mMenu);
         updateMenuView(true);
     }
     return(mMenuView);
 }
Exemple #3
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;
		}
Exemple #5
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);
        }
//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;
		}
Exemple #8
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);
            }
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);
 }
        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());
        }
Exemple #11
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 #12
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 #13
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);
        }
 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);
 }
Exemple #15
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);
 }
Exemple #16
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 #17
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));
        }
Exemple #18
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 #19
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);
 }
        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 #21
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 #22
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 #23
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 #24
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 #25
0
        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 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);
        }
Exemple #29
0
 /// <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);
 }
//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;
		}
Exemple #31
0
        private void printSample2()
        {
            if (mSampleDialog == null)
            {
                LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.view.View view = inflater.inflate(R.layout.dialog_page_mode_sample, null);
                View view = inflater.inflate(R.layout.dialog_page_mode_sample, null);

                mSampleDialog = (new AlertDialog.Builder(PageModeActivity.this)).setView(view).setPositiveButton("OK", new OnClickListenerAnonymousInnerClassHelper(this, view))
                                .setNegativeButton("Cancel", new OnClickListenerAnonymousInnerClassHelper2(this))
                                .create();
            }

            mSampleDialog.show();
        }
        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 #33
0
            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)
		{

			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 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;
		}
Exemple #36
0
 /// <summary>
 /// Inflates the layout resource identified by
 /// <see cref="getLayoutResource()">getLayoutResource()</see>
 /// and replaces this StubbedView in its parent by the inflated layout resource.
 /// </summary>
 /// <returns>The inflated layout resource.</returns>
 public android.view.View inflate()
 {
     android.view.ViewParent viewParent = getParent();
     if (viewParent != null && viewParent is android.view.ViewGroup)
     {
         if (mLayoutResource != 0)
         {
             android.view.ViewGroup      parent  = (android.view.ViewGroup)viewParent;
             android.view.LayoutInflater factory = android.view.LayoutInflater.from(mContext);
             android.view.View           view    = factory.inflate(mLayoutResource, parent, false);
             if (mInflatedId != NO_ID)
             {
                 view.setId(mInflatedId);
             }
             int index = parent.indexOfChild(this);
             parent.removeViewInLayout(this);
             android.view.ViewGroup.LayoutParams layoutParams = getLayoutParams();
             if (layoutParams != null)
             {
                 parent.addView(view, index, layoutParams);
             }
             else
             {
                 parent.addView(view, index);
             }
             mInflatedViewRef = new [email protected] <android.view.View>(view);
             if (mInflateListener != null)
             {
                 mInflateListener.onInflate(this, view);
             }
             return(view);
         }
         else
         {
             throw new System.ArgumentException("ViewStub must have a valid layoutResource");
         }
     }
     else
     {
         throw new System.InvalidOperationException("ViewStub must have a non-null ViewGroup viewParent"
                                                    );
     }
 }
        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(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;
		}