public View getView (int position, View convertView, ViewGroup parent){ if( convertView == null ){ convertView = inflater.inflate(R.layout.my_list_item, parent, false); } //images is a array of bitmap here for(int i =0;i<images.length;i++){ ImageView img = new ImageView(getContext()); img.setImageBitmap(images[i]); convertView.add(img); } return convertView; }
public void createUI() { initialisedContent = true; logger.debug("Creating UI for " + this.getViewName()); setLayout(new BorderLayout(3, 3)); viewComponentHolder = new JPanel(new BorderLayout()); viewBarComponent = new ViewBarComponent(getViewName(), plugin.getBackgroundColor(), viewComponentHolder); add(viewBarComponent); addViewManipulationActions(); createContent(); createViewToolBar(); viewBarComponent.getViewBar().getViewBanner().setPinned(pinned); }
public void createUI() { initialisedContent = true; logger.debug("Creating the UI for the '{}' view", this.getViewName()); setLayout(new BorderLayout(0, 0)); viewComponentHolder = new JPanel(new BorderLayout()); viewBarComponent = new ViewBarComponent(getViewName(), plugin.getBackgroundColor(), viewComponentHolder); add(viewBarComponent); addViewManipulationActions(); createContent(); createViewToolBar(); viewBarComponent.getViewBar().getViewBanner().setPinned(pinned); }
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_dispositivi, container, false); for (int i = 0; i < arrayList.size(); i++) { View tv = inflater.inflate(R.layout.ui_textview, container, false); rootView.add(tv); } return rootView;
public void createUI() { initialisedContent = true; logger.debug("Creating UI for " + this.getViewName()); setLayout(new BorderLayout(3, 3)); viewComponentHolder = new JPanel(new BorderLayout()); viewBarComponent = new ViewBarComponent(getViewName(), plugin.getBackgroundColor(), viewComponentHolder); add(viewBarComponent); addViewManipulationActions(); createContent(); createViewToolBar(); viewBarComponent.getViewBar().getViewBanner().setPinned(pinned); }
public View getView(int position, View convertView, ViewGroup parent) { View v; if (convertView == null) v = LayoutInflater.from(context).inflate(R.layout.row, parent, false); else v = convertView; if(position == 0){ Button button = new Button(); v.add( button ); } return v; }
View parent = (View)findViewById(R.id.yourparent_layout_for_webview); // this WebView webView = new WebView(); parent.add(webView); webView.getSettings().setBuiltInZoomControls(true);