public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Perform the internal wiring to be able to make use of the BrightcovePlayerFragment.
			View view = inflater.inflate(R.layout.basic_cast_fragment, container, false);
			brightcoveVideoView = (BrightcoveVideoView) view.findViewById(R.id.brightcove_video_view);
			eventEmitter = brightcoveVideoView.EventEmitter;
			base.onCreateView(inflater, container, savedInstanceState);

			// Initialize the android_cast_plugin which requires the application id of your Cast
			// receiver application.
			string applicationId = Resources.getString([email protected]_id);
			googleCastComponent = new GoogleCastComponent(eventEmitter, applicationId, Activity);

			// Initialize the MiniController widget which will allow control of remote media playback.
			miniController = (MiniController) view.findViewById(R.id.miniController1);
			IDictionary<string, object> properties = new Dictionary<string, object>();
			properties[GoogleCastComponent.CAST_MINICONTROLLER] = miniController;
			eventEmitter.emit(GoogleCastEventType.SET_MINI_CONTROLLER, properties);

			// Send the location of the media (url) and its metadata information for remote playback.
			Resources resources = Resources;
			string title = resources.getString([email protected]_title);
			string studio = resources.getString([email protected]_studio);
			string url = resources.getString([email protected]_url);
			string thumbnailUrl = resources.getString([email protected]_thumbnail);
			string imageUrl = resources.getString([email protected]_image);
			eventEmitter.emit(GoogleCastEventType.SET_MEDIA_METADATA, buildMetadataProperties("subTitle", title, studio, thumbnailUrl, imageUrl, url));

			brightcoveVideoView.VideoPath = url;

			return view;
		}
        public View getView(int position, View convertView, ViewGroup parent)
        {
            View             vi = convertView;
            final ViewHolder holder;

            try {
                if (convertView == null)
                {
                    vi     = inflater.inflate(R.layout.yourlayout, null);
                    holder = new ViewHolder();

                    holder.display_name   = (TextView)vi.findViewById(R.id.display_name);
                    holder.display_number = (TextView)vi.findViewById(R.id.display_number);


                    vi.setTag(holder);
                }
                else
                {
                    holder = (ViewHolder)vi.getTag();
                }



                holder.display_name.setText(lProducts.get(position).name);
                holder.display_number.setText(lProducts.get(position).number);
            } catch (Exception e) {
            }
            return(vi);
        }
Exemple #3
0
            public override View getView(int position, View convertView, ViewGroup parent)
            {
                LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                View           rowView  = inflater.inflate(mResource, parent, false);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final com.opentok.android.Subscriber subscriber = mSubscribers.get(position);
                Subscriber subscriber = outerInstance.mSubscribers[position];

                // Set name
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.TextView name = (android.widget.TextView) rowView.findViewById(R.id.subscribername);
                TextView name = (TextView)rowView.findViewById(R.id.subscribername);

                name.Text = subscriber.Stream.Name;

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.ImageView picture = (android.widget.ImageView) rowView.findViewById(R.id.subscriberpicture);
                ImageView picture = (ImageView)rowView.findViewById(R.id.subscriberpicture);

                // Initialize meter view
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final com.opentok.android.demo.ui.MeterView meterView = (com.opentok.android.demo.ui.MeterView) rowView.findViewById(R.id.volume);
                MeterView meterView = (MeterView)rowView.findViewById(R.id.volume);

                meterView.setIcons(BitmapFactory.decodeResource(Resources, R.drawable.unmute_sub), BitmapFactory.decodeResource(Resources, R.drawable.mute_sub));
                subscriber.AudioLevelListener = new AudioLevelListenerAnonymousInnerClassHelper(this, subscriber, meterView);

                meterView.setOnClickListener(new OnClickListenerAnonymousInnerClassHelper(this, subscriber, name, picture));

                return(rowView);
            }
        public override View getView(int i, View convertView, ViewGroup viewGroup)
        {
            int direction = getItemViewType(i);

            if (convertView == null)
            {
                int res = 0;
                if (direction == DIRECTION_INCOMING)
                {
                    res = R.layout.message_right;
                }
                else if (direction == DIRECTION_OUTGOING)
                {
                    res = R.layout.message_left;
                }
                convertView = mInflater.inflate(res, viewGroup, false);
            }

            Message message = mMessages[i].first;
            string  name    = message.SenderId;

            TextView txtSender  = (TextView)convertView.findViewById(R.id.txtSender);
            TextView txtMessage = (TextView)convertView.findViewById(R.id.txtMessage);
            TextView txtDate    = (TextView)convertView.findViewById(R.id.txtDate);

            txtSender.Text  = name;
            txtMessage.Text = message.TextBody;
            txtDate.Text    = mFormatter.format(message.Timestamp);

            return(convertView);
        }
Exemple #5
0
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View rootView = inflater.inflate(R.layout.fragment_thread, container, false);

            dotsView = (DotsView)rootView.findViewById(R.id.dots);
            return(rootView);
        }
Exemple #6
0
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Set view, remember ImageView for icon and setup onclick listener.
            View v = inflater.inflate(R.layout.device_picker, container, false);

            mIcon = (ImageView)v.findViewById(R.id.devicePickerIcon);
            mIcon.OnClickListener = this;
            return(v);
        }
        public virtual void onClick(View v)
        {
            switch (v.Id)
            {
            case R.id.button1:
                string externalStorageState = Environment.ExternalStorageState;
                if (externalStorageState.Equals(Environment.MEDIA_MOUNTED))
                {
                    Intent intent = new Intent(Intent.ACTION_PICK);
                    intent.Type = MediaStore.Images.Media.CONTENT_TYPE;
                    startActivityForResult(intent, REQUEST_CODE_ACTION_PICK);
                }
                break;

            case R.id.button2:
                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_nv_image, null);
                View view = inflater.inflate(R.layout.dialog_nv_image, null);

                (new AlertDialog.Builder(NvImageActivity.this)).setView(view).setPositiveButton("OK", new OnClickListenerAnonymousInnerClassHelper(this, view))
                .setNegativeButton("Cancel", new OnClickListenerAnonymousInnerClassHelper2(this))
                .show();
                break;

            case R.id.button3:
                int checkedItemPosition = mListView.CheckedItemPosition;
                if (checkedItemPosition < 0 || mArrayList.Count == 0)
                {
                    Toast.makeText(ApplicationContext, "Please choose one key code.", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    MainActivity.mBixolonPrinter.printNvImage(int.Parse(mArrayList[checkedItemPosition]), true);
                }
                break;

            case R.id.button4:
                checkedItemPosition = mListView.CheckedItemPosition;
                if (checkedItemPosition < 0 || mArrayList.Count == 0)
                {
                    Toast.makeText(ApplicationContext, "Please choose one key code.", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    MainActivity.mBixolonPrinter.removeNvImage(int.Parse(mArrayList[checkedItemPosition]));
                    mListView.clearChoices();
                }
                break;

            case R.id.button5:
                MainActivity.mBixolonPrinter.removeAllNvImage();
                mListView.clearChoices();
                break;
            }
        }
Exemple #8
0
		public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			View rootView = inflater.inflate(R.layout.fragment_async_query, container, false);
			rootView.findViewById(R.id.translate_button).OnClickListener = this;

			ListView listView = (ListView) rootView.findViewById(android.R.id.list);
			dotAdapter = new DotAdapter(Activity);
			listView.Adapter = dotAdapter;
			return rootView;
		}
		public override View getView(int i, View view, ViewGroup viewGroup)
		{
			if (view == null)
			{
				view = mInflater.inflate(mLayout, viewGroup, false);
			}

			T model = mModels[i];
			// Call out to subclass to marshall this model into the provided view
			populateView(view, model);
			return view;
		}
Exemple #10
0
            public override View getView(int position, View convertView, ViewGroup parent)
            {
                if (convertView == null)
                {
                    convertView = LayoutInflater.inflate(R.layout.device_item, null);
                }

                TextView  label = (TextView)convertView.findViewById(R.id.deviceName);
                ImageView icon  = (ImageView)convertView.findViewById(R.id.deviceIcon);

                SmcDevice device = outerInstance.mDevices[position];

                if (device is SmcImageViewer)
                {
                    label.Text = "[ImageViewer] " + device.Name;
                }
                else if (device is SmcAvPlayer)
                {
                    label.Text = "[AVPlayer] " + device.Name;
                }
                else if (device is SmcProvider)
                {
                    label.Text = "[Provider] " + device.Name;
                }
                else
                {
                    label.Text = device.Name;
                }
                Uri iconPath = device.IconUri;

                icon.Tag = iconPath;
                if (iconPath != null)
                {
                    Bitmap b = mIconsCache.get(iconPath);
                    if (b == null)
                    {
                        // Clear the image so we don't display stale icon.
                        icon.ImageResource = R.drawable.ic_launcher;
                        (new IconLoader(this, icon)).execute(iconPath);
                    }
                    else
                    {
                        icon.ImageBitmap = b;
                    }
                }
                else
                {
                    icon.ImageResource = R.drawable.ic_launcher;
                }

                return(convertView);
            }
            public override View getView(int position, View convertView, ViewGroup parent)
            {
                LayoutInflater inflator          = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                View           messageRecordView = null;

                if (inflator != null)
                {
                    messageRecordView = inflator.inflate(R.layout.message, null);
                    TextView tvData  = (TextView)messageRecordView.findViewById(R.id.tvData);
                    Message  message = (Message)getItem(position);
                    tvData.Text = message.data;
                }
                return(messageRecordView);
            }
        internal static void showCutterPositionSettingDialog(AlertDialog dialog, Context context)
        {
            if (dialog == null)
            {
                LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.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_set_offset, null);
                View view = inflater.inflate(R.layout.dialog_set_offset, null);

                dialog = (new AlertDialog.Builder(context)).setTitle("Cutter position setting").setView(view).setPositiveButton("OK", new OnClickListenerAnonymousInnerClassHelper31(dialog, view))
                         .setNegativeButton("Cancel", new OnClickListenerAnonymousInnerClassHelper32(dialog))
                         .create();
            }
            dialog.show();
        }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: static void showWifiDialog(android.app.AlertDialog dialog, android.content.Context context, final com.bixolon.labelprinter.BixolonLabelPrinter printer)
        internal static void showWifiDialog(AlertDialog dialog, Context context, BixolonLabelPrinter printer)
        {
            if (dialog == null)
            {
                LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.view.View layout = inflater.inflate(R.layout.dialog_wifi, null);
                View layout = inflater.inflate(R.layout.dialog_wifi, null);

                dialog = (new AlertDialog.Builder(context)).setView(layout).setTitle("Wi-Fi Connect").setPositiveButton("OK", new OnClickListenerAnonymousInnerClassHelper4(dialog, printer, layout))
                         .setNegativeButton("Cancel", new OnClickListenerAnonymousInnerClassHelper5(dialog))
                         .create();
            }
            dialog.show();
        }
//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_device_category_list, container, false);

            IList <IDictionary <string, string> >          groupData = new List <IDictionary <string, string> >();
            IList <IList <IDictionary <string, string> > > childData = new List <IList <IDictionary <string, string> > >();

            string[] deviceCategory     = Resources.getStringArray(R.array.device_categories);
            string[] posPrinterChildren = Resources.getStringArray(R.array.pos_printer_children);

            for (int i = 0; i < deviceCategory.Length; i++)
            {
                IDictionary <string, string> groupMap = new Dictionary <string, string>();
                groupData.Add(groupMap);
                groupMap[KEY_TITLE]    = deviceCategory[i];
                groupMap[KEY_SUBTITLE] = "";

                if (deviceCategory[i].Equals(getString([email protected]_printer)))
                {
                    IList <IDictionary <string, string> > children = new List <IDictionary <string, string> >();

                    for (int j = 0; j < posPrinterChildren.Length; j++)
                    {
                        IDictionary <string, string> childMap = new Dictionary <string, string>();
                        children.Add(childMap);
                        childMap[KEY_TITLE]    = posPrinterChildren[j];
                        childMap[KEY_SUBTITLE] = "";
                    }
                    childData.Add(children);
                }
                else
                {
                    IList <IDictionary <string, string> > children = new List <IDictionary <string, string> >();
                    childData.Add(children);
                }
            }

            string[] from = new string[] { KEY_TITLE, KEY_SUBTITLE };
            int[]    to   = new int[] { android.R.id.text1, android.R.id.text2 };
            ExpandableListAdapter adapter = new SimpleExpandableListAdapter(Activity, groupData, android.R.layout.simple_expandable_list_item_1, from, to, childData, android.R.layout.simple_expandable_list_item_2, from, to);

            expandableListView = (ExpandableListView)view;
            expandableListView.OnGroupClickListener = this;
            expandableListView.OnChildClickListener = this;
            expandableListView.Adapter = adapter;

            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_device_category_list, container, false);

			IList<IDictionary<string, string>> groupData = new List<IDictionary<string, string>>();
			IList<IList<IDictionary<string, string>>> childData = new List<IList<IDictionary<string, string>>>();

			string[] deviceCategory = Resources.getStringArray(R.array.device_categories);
			string[] posPrinterChildren = Resources.getStringArray(R.array.pos_printer_children);

			for (int i = 0; i < deviceCategory.Length; i++)
			{
				IDictionary<string, string> groupMap = new Dictionary<string, string>();
				groupData.Add(groupMap);
				groupMap[KEY_TITLE] = deviceCategory[i];
				groupMap[KEY_SUBTITLE] = "";

				if (deviceCategory[i].Equals(getString([email protected]_printer)))
				{
					IList<IDictionary<string, string>> children = new List<IDictionary<string, string>>();

					for (int j = 0; j < posPrinterChildren.Length; j++)
					{
						IDictionary<string, string> childMap = new Dictionary<string, string>();
						children.Add(childMap);
						childMap[KEY_TITLE] = posPrinterChildren[j];
						childMap[KEY_SUBTITLE] = "";
					}
					childData.Add(children);
				}
				else
				{
					IList<IDictionary<string, string>> children = new List<IDictionary<string, string>>();
					childData.Add(children);
				}
			}

			string[] from = new string[] {KEY_TITLE, KEY_SUBTITLE};
			int[] to = new int[] {android.R.id.text1, android.R.id.text2};
			ExpandableListAdapter adapter = new SimpleExpandableListAdapter(Activity, groupData, android.R.layout.simple_expandable_list_item_1, from, to, childData, android.R.layout.simple_expandable_list_item_2, from, to);

			expandableListView = (ExpandableListView) view;
			expandableListView.OnGroupClickListener = this;
			expandableListView.OnChildClickListener = this;
			expandableListView.Adapter = adapter;

			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_general_printing, container, false);

            sendToPrinterEditText = (EditText)view.findViewById(R.id.editTextSendToPrinter);

            view.findViewById(R.id.buttonAddEscapeSequence).OnClickListener = this;
            view.findViewById(R.id.buttonPrintNormal).OnClickListener       = this;
            view.findViewById(R.id.buttonCutPaper).OnClickListener          = this;
            view.findViewById(R.id.buttonCharacterSet).OnClickListener      = this;

            deviceMessagesTextView = (TextView)view.findViewById(R.id.textViewDeviceMessages);
            deviceMessagesTextView.MovementMethod           = new ScrollingMovementMethod();
            deviceMessagesTextView.VerticalScrollBarEnabled = true;
            return(view);
        }
Exemple #17
0
        public View getView(int position, View view, ViewGroup viewGroup)
        {
            if (view == null)
            {
                view = layoutInflater.inflate(android.R.layout.simple_list_item_1, viewGroup, false);
            }

            Model  currentModel = listOfData.get(position);
            String name         = currentModel.getName();


            ((TextView)view.findViewById(android.R.id.text1)).setText(name);


            return(view);
        }
        private void createUI()
        {
            ViewGroup torchButtons = (ViewGroup)findViewById(R.id.torch_buttons_layout);

            torchButtons.removeAllViews();

            mCameraIdViewMap = new Dictionary <>();
            mSCameraManager  = mSCamera.SCameraManager;

            int numberOfCameraWithFlash = 0;

            try
            {
                foreach (string id in mSCameraManager.CameraIdList)
                {
                    ViewGroup torchItem = (ViewGroup)LayoutInflater.inflate(R.layout.torch_item, null);
                    torchButtons.addView(torchItem);

                    ((TextView)torchItem.findViewById(R.id.cameraId_textView)).Text = id;

                    ToggleButton toggleButton = (ToggleButton)torchItem.findViewById(R.id.toggleButton);
                    toggleButton.Tag = id;

                    if (mSCameraManager.getCameraCharacteristics(id).get(SCameraCharacteristics.FLASH_INFO_AVAILABLE))
                    {
                        numberOfCameraWithFlash++;

                        toggleButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
                    }
                    else
                    {
                        toggleButton.Checked = false;
                        toggleButton.Enabled = false;
                    }
                    mCameraIdViewMap[id] = toggleButton;
                }

                mSCameraManager.registerTorchCallback(new TorchCallbackAnonymousInnerClassHelper(this), null);
            }
            catch (CameraAccessException e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            ((TextView)findViewById(R.id.totalNumber_textView)).Text = "Number of camera device with flash unit = " + numberOfCameraWithFlash;
        }
Exemple #19
0
        public override View getView(int position, View currentView, ViewGroup parent)
        {
            if (currentView == null)
            {
                currentView = inflater.inflate(R.layout.city_listitem, parent, false);
            }

            City city = cities[position];

            if (city != null)
            {
                ((TextView)currentView.findViewById(R.id.name)).Text  = city.Name;
                ((TextView)currentView.findViewById(R.id.votes)).Text = Convert.ToString(city.Votes);
            }

            return(currentView);
        }
//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_bitmap, container, false);

			bitmapPathTextView = (TextView) view.findViewById(R.id.textViewBitmapPath);
			widthEditText = (EditText) view.findViewById(R.id.editTextWidth);
			alignmentSpinner = (Spinner) view.findViewById(R.id.spinnerAlignment);

			view.findViewById(R.id.buttonGallery).OnClickListener = this;
			view.findViewById(R.id.buttonPrintBitmap).OnClickListener = this;

			deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages);
			deviceMessagesTextView.MovementMethod = new ScrollingMovementMethod();
			deviceMessagesTextView.VerticalScrollBarEnabled = true;

			brightnessTextView = (TextView) view.findViewById(R.id.textViewBrightness);
			brightnessSeekBar = (SeekBar) view.findViewById(R.id.seekBarBrightness);
			brightnessSeekBar.OnSeekBarChangeListener = this;
			return view;
		}
Exemple #21
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_pos_printer_bitmap, container, false);

            bitmapPathTextView = (TextView)view.findViewById(R.id.textViewBitmapPath);
            widthEditText      = (EditText)view.findViewById(R.id.editTextWidth);
            alignmentSpinner   = (Spinner)view.findViewById(R.id.spinnerAlignment);

            view.findViewById(R.id.buttonGallery).OnClickListener     = this;
            view.findViewById(R.id.buttonPrintBitmap).OnClickListener = this;

            deviceMessagesTextView = (TextView)view.findViewById(R.id.textViewDeviceMessages);
            deviceMessagesTextView.MovementMethod           = new ScrollingMovementMethod();
            deviceMessagesTextView.VerticalScrollBarEnabled = true;

            brightnessTextView = (TextView)view.findViewById(R.id.textViewBrightness);
            brightnessSeekBar  = (SeekBar)view.findViewById(R.id.seekBarBrightness);
            brightnessSeekBar.OnSeekBarChangeListener = this;
            return(view);
        }
        private void initView()
        {
            LayoutInflater inflater = (LayoutInflater)Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            inflater.inflate(R.layout.fc_control_bar, this, true);
            mRoot         = (LinearLayout)findViewById(R.id.control_bar_root_layout);
            mRecyclerView = (RecyclerView)findViewById(R.id.devices_layout);

            FcItemAnimator itemAnimator = new FcItemAnimator(mRecyclerView);

            itemAnimator.AddDuration    = FcConstants.DEFAULT_ANIM_DURATION;
            itemAnimator.ChangeDuration = FcConstants.DEFAULT_ANIM_DURATION;
            itemAnimator.MoveDuration   = FcConstants.DEFAULT_ANIM_DURATION;
            itemAnimator.RemoveDuration = FcConstants.DEFAULT_ANIM_DURATION;

            mRecyclerView.ItemAnimator = itemAnimator;
            mModel   = new FcModel(mFcContext);
            mAdapter = new FcAdapter(mFcContext, mModel);

            //
            // Temporary workaround for a bug in RecyclerView:
            //      https://code.google.com/p/android/issues/detail?id=74772
            //
            // This custom LinearLayoutManager is on Apache 2.0 licence
            //
            // Fix this when it's fixed ("targeted early 2016")
            //
            LinearLayoutManager layoutManager = new LinearLayoutManager(Context);

            layoutManager.Orientation   = LinearLayoutManager.HORIZONTAL;
            mRecyclerView.LayoutManager = layoutManager;
            mRecyclerView.Adapter       = mAdapter;

            mBarHandler = (ImageButton)findViewById(R.id.barhandler);
            mBarHandler.BackgroundResource = R.drawable.arrow_open;
            mBarHandler.OnClickListener    = new OnClickListenerAnonymousInnerClassHelper(this);

            mMainAppImage = (ImageButton)findViewById(R.id.main_app_image);
            mMainAppImage.OnLongClickListener = new FcControlBarLongClickListener(this);
            mFcAnimator = new FcAnimator();
        }
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View rootView = inflater.inflate(R.layout.layout_fragment_sub_quality, container, false);

            mSubQualityContainer = (RelativeLayout)openTokActivity.findViewById(R.id.fragment_sub_quality_container);

            congestionIndicator = (ImageButton)rootView.findViewById(R.id.congestionIndicator);

            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);
        }
        /// <summary>
        /// This method sets layout of floating controller, creates control bar and puts it on its
        /// default position.
        /// </summary>
        /// <param name="barExpanded">
        ///            Whether or not control bar shall be expanded. </param>
        /// <param name="devicesExpanded">
        ///            Map describing which devices shall be expanded and which not. </param>
        private void initializeControl(TypedArray array)
        {
            int            type     = array.getInt(R.styleable.FloatingControler_type, 1);
            LayoutInflater inflater = (LayoutInflater)this.Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            int            resId;

            switch (type)
            {
            case 0:
                resId = R.layout.floating_controller_layout;
                break;

            case 1:
            default:                     // fall-through
                resId = R.layout.floating_controller_layout;
                break;
            }
            inflater.inflate(resId, this, true);
            mControlBar = (FcControlBar)findViewById(R.id.control_bar_layout);
            mControlBar.prepareView(this, array);
        }
Exemple #25
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_msr, 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_MSR, getString([email protected]));

            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.buttonClearFields).OnClickListener   = this;
            view.findViewById(R.id.buttonRefreshFields).OnClickListener = this;

            deviceEnabledCheckBox = (CheckBox)view.findViewById(R.id.checkBoxDeviceEnabled);
            deviceEnabledCheckBox.OnCheckedChangeListener = this;
            autoDisableCheckBox = (CheckBox)view.findViewById(R.id.checkBoxAutoDisable);
            autoDisableCheckBox.OnCheckedChangeListener = this;
            dataEventEnabledCheckBox = (CheckBox)view.findViewById(R.id.checkBoxDataEventEnabled);
            dataEventEnabledCheckBox.OnCheckedChangeListener = this;

            RadioGroup radioGroup = (RadioGroup)view.findViewById(R.id.radioGroupDataEncryptionAlgorithm);

            radioGroup.OnCheckedChangeListener = this;

            track1DataLengthTextView = (TextView)view.findViewById(R.id.textViewTrack1DataLength);
            track1DataTextView       = (TextView)view.findViewById(R.id.textViewTrack1Data);
            track2DataLengthTextView = (TextView)view.findViewById(R.id.textViewTrack2DataLength);
            track2DataTextView       = (TextView)view.findViewById(R.id.textViewTrack2Data);
            track3DataLengthTextView = (TextView)view.findViewById(R.id.textViewTrack3DataLength);
            track3DataTextView       = (TextView)view.findViewById(R.id.textViewTrack3Data);

            stateTextView = (TextView)view.findViewById(R.id.textViewState);
            return(view);
        }
Exemple #26
0
        public override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            ContentView = R.layout.activity_advanced_camera_capturer;

            localMedia        = LocalMedia.create(this);
            videoView         = (VideoView)findViewById(R.id.video_view);
            toggleFlashButton = (Button)findViewById(R.id.toggle_flash_button);
            takePictureButton = (Button)findViewById(R.id.take_picture_button);
            pictureImageView  = (ImageView)LayoutInflater.inflate(R.layout.picture_image_view, null);
            pictureDialog     = (new AlertDialog.Builder(this)).setView(pictureImageView).setTitle(null).setPositiveButton([email protected], new OnClickListenerAnonymousInnerClassHelper(this))
                                .create();

            if (!checkPermissionForCamera())
            {
                requestPermissionForCamera();
            }
            else
            {
                addCameraVideo();
            }
        }
Exemple #27
0
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View rootView = inflater.inflate(R.layout.textchat_fragment_layout, container, false);

            mListView            = (ListView)rootView.findViewById(R.id.msgs_list);
            mSendButton          = (Button)rootView.findViewById(R.id.send_button);
            mMsgCharsView        = (TextView)rootView.findViewById(R.id.characteres_msg);
            mMsgCharsView.Text   = maxTextLength.ToString();
            mMsgNotificationView = (TextView)rootView.findViewById(R.id.new_msg_notification);
            mMsgEditText         = (EditText)rootView.findViewById(R.id.edit_msg);
            mMsgDividerView      = (View)rootView.findViewById(R.id.divider_notification);
            mMsgEditText.addTextChangedListener(mTextEditorWatcher);

            mSendButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);

            mMessageAdapter = new MessageAdapter(Activity, R.layout.sent_msg_row_layout, mMsgsList);

            mListView.Adapter = mMessageAdapter;
            mMsgNotificationView.OnTouchListener = new OnTouchListenerAnonymousInnerClassHelper(this);

            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_pos_printer_bar_code, container, false);

            widthEditText  = (EditText)view.findViewById(R.id.editTextWidth);
            heightEditText = (EditText)view.findViewById(R.id.editTextHeight);

            symbologySpinner = (Spinner)view.findViewById(R.id.spinnerSymbology);
            symbologySpinner.OnItemSelectedListener = this;

            alignmentSpinner    = (Spinner)view.findViewById(R.id.spinnerAlignment);
            textPositionSpinner = (Spinner)view.findViewById(R.id.spinnerTextPosition);

            dataEditText = (EditText)view.findViewById(R.id.editTextBarCodeData);

            view.findViewById(R.id.buttonPrintBarCode).OnClickListener = this;

            deviceMessagesTextView = (TextView)view.findViewById(R.id.textViewDeviceMessages);
            deviceMessagesTextView.MovementMethod           = new ScrollingMovementMethod();
            deviceMessagesTextView.VerticalScrollBarEnabled = true;
            return(view);
        }
        internal static void showAutoCutterDialog(AlertDialog dialog, Context context)
        {
            if (dialog == null)
            {
                LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                View           view     = inflater.inflate(R.layout.dialog_set_auto_cutter, null);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.EditText editText = (android.widget.EditText) view.findViewById(R.id.editText1);
                EditText editText = (EditText)view.findViewById(R.id.editText1);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.RadioGroup radioGroup = (android.widget.RadioGroup) view.findViewById(R.id.radioGroup1);
                RadioGroup radioGroup = (RadioGroup)view.findViewById(R.id.radioGroup1);
                radioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper2(editText);

                dialog = (new AlertDialog.Builder(context)).setTitle([email protected]_action).setView(view).setPositiveButton("OK", new OnClickListenerAnonymousInnerClassHelper33(dialog, editText, radioGroup))
                         .setNegativeButton("Cancel", new OnClickListenerAnonymousInnerClassHelper34(dialog))
                         .create();
            }
            dialog.show();
        }
		public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{

			View rootView = inflater.inflate(R.layout.textchat_fragment_layout, container, false);

			mListView = (ListView) rootView.findViewById(R.id.msgs_list);
			mSendButton = (Button) rootView.findViewById(R.id.send_button);
			mMsgCharsView = (TextView) rootView.findViewById(R.id.characteres_msg);
			mMsgCharsView.Text = maxTextLength.ToString();
			mMsgNotificationView = (TextView) rootView.findViewById(R.id.new_msg_notification);
			mMsgEditText = (EditText) rootView.findViewById(R.id.edit_msg);
			mMsgDividerView = (View) rootView.findViewById(R.id.divider_notification);
			mMsgEditText.addTextChangedListener(mTextEditorWatcher);

			mSendButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);

			mMessageAdapter = new MessageAdapter(Activity, R.layout.sent_msg_row_layout, mMsgsList);

			mListView.Adapter = mMessageAdapter;
			mMsgNotificationView.OnTouchListener = new OnTouchListenerAnonymousInnerClassHelper(this);

			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_msr, 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_MSR, getString([email protected]));

			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.buttonClearFields).OnClickListener = this;
			view.findViewById(R.id.buttonRefreshFields).OnClickListener = this;

			deviceEnabledCheckBox = (CheckBox) view.findViewById(R.id.checkBoxDeviceEnabled);
			deviceEnabledCheckBox.OnCheckedChangeListener = this;
			autoDisableCheckBox = (CheckBox) view.findViewById(R.id.checkBoxAutoDisable);
			autoDisableCheckBox.OnCheckedChangeListener = this;
			dataEventEnabledCheckBox = (CheckBox) view.findViewById(R.id.checkBoxDataEventEnabled);
			dataEventEnabledCheckBox.OnCheckedChangeListener = this;

			RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.radioGroupDataEncryptionAlgorithm);
			radioGroup.OnCheckedChangeListener = this;

			track1DataLengthTextView = (TextView) view.findViewById(R.id.textViewTrack1DataLength);
			track1DataTextView = (TextView) view.findViewById(R.id.textViewTrack1Data);
			track2DataLengthTextView = (TextView) view.findViewById(R.id.textViewTrack2DataLength);
			track2DataTextView = (TextView) view.findViewById(R.id.textViewTrack2Data);
			track3DataLengthTextView = (TextView) view.findViewById(R.id.textViewTrack3DataLength);
			track3DataTextView = (TextView) view.findViewById(R.id.textViewTrack3Data);

			stateTextView = (TextView) view.findViewById(R.id.textViewState);
			return view;
		}
Exemple #32
0
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Perform the internal wiring to be able to make use of the BrightcovePlayerFragment.
            View view = inflater.inflate(R.layout.basic_cast_fragment, container, false);

            brightcoveVideoView = (BrightcoveVideoView)view.findViewById(R.id.brightcove_video_view);
            eventEmitter        = brightcoveVideoView.EventEmitter;
            base.onCreateView(inflater, container, savedInstanceState);

            // Initialize the android_cast_plugin which requires the application id of your Cast
            // receiver application.
            string applicationId = Resources.getString([email protected]_id);

            googleCastComponent = new GoogleCastComponent(eventEmitter, applicationId, Activity);

            // Initialize the MiniController widget which will allow control of remote media playback.
            miniController = (MiniController)view.findViewById(R.id.miniController1);
            IDictionary <string, object> properties = new Dictionary <string, object>();

            properties[GoogleCastComponent.CAST_MINICONTROLLER] = miniController;
            eventEmitter.emit(GoogleCastEventType.SET_MINI_CONTROLLER, properties);

            // Send the location of the media (url) and its metadata information for remote playback.
            Resources resources    = Resources;
            string    title        = resources.getString([email protected]_title);
            string    studio       = resources.getString([email protected]_studio);
            string    url          = resources.getString([email protected]_url);
            string    thumbnailUrl = resources.getString([email protected]_thumbnail);
            string    imageUrl     = resources.getString([email protected]_image);

            eventEmitter.emit(GoogleCastEventType.SET_MEDIA_METADATA, buildMetadataProperties("subTitle", title, studio, thumbnailUrl, imageUrl, url));

            brightcoveVideoView.VideoPath = url;

            return(view);
        }
		public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{

			View rootView = inflater.inflate(R.layout.layout_fragment_sub_quality, container, false);

			mSubQualityContainer = (RelativeLayout) openTokActivity.findViewById(R.id.fragment_sub_quality_container);

			congestionIndicator = (ImageButton) rootView.findViewById(R.id.congestionIndicator);

			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 #34
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_pos_printer_page_mode, container, false);

            pageModeAreaTextView = (TextView)view.findViewById(R.id.textViewPageModeArea);
            try
            {
                pageModeAreaTextView.Text = posPrinter.PageModeArea;
            }
            catch (JposException e)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            pageModeHorizontalPositionEditText = (EditText)view.findViewById(R.id.editTextPageModeHorizontalPosition);
            try
            {
                pageModeHorizontalPositionEditText.Text = Convert.ToString(posPrinter.PageModeHorizontalPosition);
            }
            catch (JposException e)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            pageModeVerticalPositionEditText = (EditText)view.findViewById(R.id.editTextPageModeVerticalPosition);
            try
            {
                pageModeVerticalPositionEditText.Text = Convert.ToString(posPrinter.PageModeVerticalPosition);
            }
            catch (JposException e)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            pageModePrintAreaEditText1 = (EditText)view.findViewById(R.id.editTextPageModePrintArea1);
            pageModePrintAreaEditText2 = (EditText)view.findViewById(R.id.editTextPageModePrintArea2);
            pageModePrintAreaEditText3 = (EditText)view.findViewById(R.id.editTextPageModePrintArea3);
            pageModePrintAreaEditText4 = (EditText)view.findViewById(R.id.editTextPageModePrintArea4);
            try
            {
                string[] pageModePrintArea = posPrinter.PageModePrintArea.split(",");
                pageModePrintAreaEditText1.Text = pageModePrintArea[0];
                pageModePrintAreaEditText2.Text = pageModePrintArea[1];
                pageModePrintAreaEditText3.Text = pageModePrintArea[2];
                pageModePrintAreaEditText4.Text = pageModePrintArea[3];
            }
            catch (JposException e1)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e1.ToString());
                Console.Write(e1.StackTrace);
            }

            pageModePrintDirectionSpinner = (Spinner)view.findViewById(R.id.spinnerPageModePrintDirection);
            try
            {
                switch (posPrinter.PageModePrintDirection)
                {
                case POSPrinterConst.PTR_PD_LEFT_TO_RIGHT:
                    pageModePrintDirectionSpinner.Selection = 0;
                    break;

                case POSPrinterConst.PTR_PD_BOTTOM_TO_TOP:
                    pageModePrintDirectionSpinner.Selection = 1;
                    break;

                case POSPrinterConst.PTR_PD_RIGHT_TO_LEFT:
                    pageModePrintDirectionSpinner.Selection = 2;
                    break;

                case POSPrinterConst.PTR_PD_TOP_TO_BOTTOM:
                    pageModePrintDirectionSpinner.Selection = 3;
                    break;
                }
            }
            catch (JposException e)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            pageModeCommandSpinner = (Spinner)view.findViewById(R.id.spinnerPageModeCommand);

            view.findViewById(R.id.buttonClearPrintArea).OnClickListener      = this;
            view.findViewById(R.id.buttonUpdateProperties).OnClickListener    = this;
            view.findViewById(R.id.buttonSendPageModeCommand).OnClickListener = this;

            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.fragment_thread, container, false);
			dotsView = (DotsView) rootView.findViewById(R.id.dots);
			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 #37
0
        public override View getView(int position, View convertView, ViewGroup parent)
        {
            ImageView icon;
            TextView  name, size, date;

            if (convertView == null)
            {
                convertView = inflater.inflate(R.layout.item, null);
                icon        = (ImageView)convertView.findViewById(R.id.icon);
                name        = (TextView)convertView.findViewById(R.id.name);
                size        = (TextView)convertView.findViewById(R.id.size);
                date        = (TextView)convertView.findViewById(R.id.date);
                convertView.setTag(R.id.icon, icon);
                convertView.setTag(R.id.name, name);
                convertView.setTag(R.id.size, size);
                convertView.setTag(R.id.date, date);
            }
            else
            {
                icon = (ImageView)convertView.getTag(R.id.icon);
                name = (TextView)convertView.getTag(R.id.name);
                size = (TextView)convertView.getTag(R.id.size);
                date = (TextView)convertView.getTag(R.id.date);
            }
            SmcItem item = getItem(position);

            //set title
            name.Text = item.Title;
            //set size
            if (item.MediaType == SmcItem.MEDIA_TYPE_ITEM_FOLDER)
            {
                size.Text = "<DIR>";
            }
            else
            {
                size.Text = getSize(item.FileSize);
            }
            //set date
            if (item.Date != null)
            {
                date.Text = dateFormat.format(item.Date);
            }
            else
            {
                date.Text = null;
            }
            //load icon
            Uri iconPath = item.Thumbnail;

            icon.Tag = iconPath;
            if (iconPath != null)
            {
                Bitmap b = IconCache.Instance.get(iconPath);
                if (b == null)
                {
                    // Clear the image so we don't display stale icon.
                    icon.ImageResource = getIconForItem(item);
                    (new IconLoader(icon)).execute(iconPath);
                }
                else
                {
                    icon.ImageBitmap = b;
                }
            }
            else
            {
                icon.ImageResource = getIconForItem(item);
            }
            return(convertView);
        }
Exemple #38
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            /* Init layout */
            base.onCreate(savedInstanceState);

            /* If no content, nothing to do, super class already called finish */
            if (mContent == null)
            {
                return;
            }

            /* Render questions */
            LinearLayout   questionsLayout = getView("questions");
            JSONArray      questions       = mContent.Questions;
            LayoutInflater layoutInflater  = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            try
            {
                for (int i = 0; i < questions.length(); i++)
                {
                    /* Get question */
                    JSONObject question = questions.getJSONObject(i);

                    /* Inflate question layout */
                    LinearLayout questionLayout = (LinearLayout)layoutInflater.inflate(getLayoutId("engagement_poll_question"), null);

                    /* Set question's title */
                    TextView questionTitle = (TextView)questionLayout.findViewById(getId("question_title"));
                    questionTitle.Text = question.getString("title");

                    /* Set choices */
                    RadioGroup choicesView = (RadioGroup)questionLayout.findViewById(getId("choices"));
                    choicesView.Tag = question;
                    JSONArray choices      = question.getJSONArray("choices");
                    int       choiceViewId = 0;
                    for (int j = 0; j < choices.length(); j++)
                    {
                        /* Get choice */
                        JSONObject choice = choices.getJSONObject(j);

                        /* Inflate choice layout */
                        RadioButton choiceView = (RadioButton)layoutInflater.inflate(getLayoutId("engagement_poll_choice"), null);

                        /* Each choice is a radio button */
                        choiceView.Id      = choiceViewId++;
                        choiceView.Tag     = choice.getString("id");
                        choiceView.Text    = choice.getString("title");
                        choiceView.Checked = choice.optBoolean("isDefault");
                        choicesView.addView(choiceView);
                    }

                    /* Add to parent layouts */
                    questionsLayout.addView(questionLayout);

                    /* Watch state */
                    mRadioGroups.Add(choicesView);
                    choicesView.OnCheckedChangeListener = mRadioGroupListener;
                }
            }
            catch (JSONException)
            {
                /* Drop on parsing error */
                mContent.dropContent(this);
                finish();
                return;
            }

            /* Disable action if a choice is not selected */
            updateActionState();
        }
//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_page_mode, container, false);

			pageModeAreaTextView = (TextView) view.findViewById(R.id.textViewPageModeArea);
			try
			{
				pageModeAreaTextView.Text = posPrinter.PageModeArea;
			}
			catch (JposException e)
			{
				// TODO Auto-generated catch block
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
			}

			pageModeHorizontalPositionEditText = (EditText) view.findViewById(R.id.editTextPageModeHorizontalPosition);
			try
			{
				pageModeHorizontalPositionEditText.Text = Convert.ToString(posPrinter.PageModeHorizontalPosition);
			}
			catch (JposException e)
			{
				// TODO Auto-generated catch block
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
			}

			pageModeVerticalPositionEditText = (EditText) view.findViewById(R.id.editTextPageModeVerticalPosition);
			try
			{
				pageModeVerticalPositionEditText.Text = Convert.ToString(posPrinter.PageModeVerticalPosition);
			}
			catch (JposException e)
			{
				// TODO Auto-generated catch block
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
			}

			pageModePrintAreaEditText1 = (EditText) view.findViewById(R.id.editTextPageModePrintArea1);
			pageModePrintAreaEditText2 = (EditText) view.findViewById(R.id.editTextPageModePrintArea2);
			pageModePrintAreaEditText3 = (EditText) view.findViewById(R.id.editTextPageModePrintArea3);
			pageModePrintAreaEditText4 = (EditText) view.findViewById(R.id.editTextPageModePrintArea4);
			try
			{
				string[] pageModePrintArea = posPrinter.PageModePrintArea.split(",");
				pageModePrintAreaEditText1.Text = pageModePrintArea[0];
				pageModePrintAreaEditText2.Text = pageModePrintArea[1];
				pageModePrintAreaEditText3.Text = pageModePrintArea[2];
				pageModePrintAreaEditText4.Text = pageModePrintArea[3];
			}
			catch (JposException e1)
			{
				// TODO Auto-generated catch block
				Console.WriteLine(e1.ToString());
				Console.Write(e1.StackTrace);
			}

			pageModePrintDirectionSpinner = (Spinner) view.findViewById(R.id.spinnerPageModePrintDirection);
			try
			{
				switch (posPrinter.PageModePrintDirection)
				{
				case POSPrinterConst.PTR_PD_LEFT_TO_RIGHT:
					pageModePrintDirectionSpinner.Selection = 0;
					break;

				case POSPrinterConst.PTR_PD_BOTTOM_TO_TOP:
					pageModePrintDirectionSpinner.Selection = 1;
					break;

				case POSPrinterConst.PTR_PD_RIGHT_TO_LEFT:
					pageModePrintDirectionSpinner.Selection = 2;
					break;

				case POSPrinterConst.PTR_PD_TOP_TO_BOTTOM:
					pageModePrintDirectionSpinner.Selection = 3;
					break;
				}
			}
			catch (JposException e)
			{
				// TODO Auto-generated catch block
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
			}

			pageModeCommandSpinner = (Spinner) view.findViewById(R.id.spinnerPageModeCommand);

			view.findViewById(R.id.buttonClearPrintArea).OnClickListener = this;
			view.findViewById(R.id.buttonUpdateProperties).OnClickListener = this;
			view.findViewById(R.id.buttonSendPageModeCommand).OnClickListener = this;

			deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages);
			deviceMessagesTextView.MovementMethod = new ScrollingMovementMethod();
			deviceMessagesTextView.VerticalScrollBarEnabled = true;
			return view;
		}