Java 8 IllegalArgumentException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 IllegalArgumentException class.

This code example shows how to use the following methods:setOnScrollListener, setAdapter, setOnItemClickListener
				View shelf = mDisplayView.findViewWithTag(TAG_SHELF);
				if (shelf != null && shelf instanceof GridView && mItemLayoutResId != 0) {
					mShelfView = (GridView) shelf;
					mShelfAdapter = new ShelfAdapter(mContext, mItemLayoutResId, mImageLoader, (ITableDatabaseController) mDataSet
							.getDatabaseController(mItemTable));
					mShelfView.setAdapter(mShelfAdapter);
					mShelfView.setOnScrollListener(mShelfAdapter);
 
					if (mOnShelfItemClickListener != null) {
						mShelfView.setOnItemClickListener(mOnShelfItemClickListener);
					} 
 
					if (mDefaultBackgroundResId != INVALID_RESOURCE_ID && mSelectedBackgroundResId != INVALID_RESOURCE_ID) {
						mShelfAdapter.setBackgroundDrawable(mDefaultBackgroundResId, mSelectedBackgroundResId);
					} 
				} else { 
					mShelfView = null;
				} 
 
				// create detail area. 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setAdapter
	 
	public void setEmotionGridViewAdapter(EmotionsGridAdapter adapter) {
		if (emotionGrid == null) {
			setEmotionGridView(); 
		} 
		emotionGrid.setAdapter(adapter);
	} 
	 
	public void setEmotionGridViewOnItemClickListener(EditMicroBlogEmotionItemClickListener listener) {
		if (emotionGrid == null) {
			setEmotionGridView(); 
		} 
		emotionGrid.setOnItemClickListener(listener);
	} 
	 
	public int getEmotionViewVisibility() { 
		if (llEmotion == null) {
			setLlEmotion(); 
		} 
		return llEmotion.getVisibility();
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setAdapter, setNumColumns
	public void create() 
	{ 
		setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
		setGravity(Gravity.CENTER);
		 
		grid = new GridView(context);
		adapter = new DesktopSwitcherAdapter(context);
		 
		workspace = myHome.getInstance().getWorkspace();
		desktopCount = workspace.getDesktopCount();
		 
		columnCount = desktopCount;
		if(columnCount > 4)
			columnCount = 4;
		 
		grid.setNumColumns(columnCount);
		grid.setAdapter(adapter);
		 
		addView(grid);
	} 

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setAdapter, getSelectedItemId, setEmptyView, setOnItemClickListener
    /** 
     * Get the cursor row ID of the currently selected grid item. 
     */ 
    public long getSelectedItemId() { 
        ensureGrid(); 
        return mGrid.getSelectedItemId();
    } 
 
    /** 
     * Get the activity's {@link GridView} widget. 
     */ 
    public GridView getGridView() {
        ensureGrid(); 
        return mGrid;
    } 
 
    /** 
     * The default content for a ListFragment has a TextView that can 
     * be shown when the grid is empty.  If you would like to have it 
     * shown, call this method to supply the text it should use. 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setRecyclerListener, setAdapter, setColumnWidth, setHorizontalSpacing, setStretchMode
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(this.getResources().getIdentifier("test_activity_grid", "layout", "pl.polidea.androidflip3d"));
        final GridView gridView = (GridView) findViewById(this.getResources().getIdentifier("GridView", "id",
                "pl.polidea.androidflip3d")); 
        gridView.setHorizontalSpacing(0);
        final int screenWidth = this.getWindow().getWindowManager().getDefaultDisplay().getWidth();
        final int margin = 10;
        Log.v(TAG, "Screen width = " + screenWidth);
        gridView.setColumnWidth(screenWidth / 3 - margin * 2 / 3);
        gridView.setStretchMode(GridView.NO_STRETCH);
        gridView.setHorizontalSpacing(margin / 2);
        gridView.setVerticalSpacing(margin / 2);
        final TestGridAdapter adapter = new TestGridAdapter(this, screenWidth / 3 - margin);
        gridView.setAdapter(adapter);
        gridView.setRecyclerListener(adapter);
    } 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setGravity, setHorizontalSpacing, setNumColumns, setStretchMode, setVerticalSpacing
		this.mResources = context.getResources();
		init(); 
	} 
	 
	private void init() { 
		mGridView = new GridView(mContext);
		mGridView.setNumColumns(4);
		mGridView.setHorizontalSpacing(10);
		mGridView.setVerticalSpacing(10);
		mGridView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
		mGridView.setGravity(Gravity.CENTER);
		mGridView.setOnItemClickListener(this);
		setAdapterData(menu_name, menu_image);
	} 
 
	private void setAdapterData(String[] menus_name,String[] menus_image) {
		/** 数据源  **/ 
		ArrayList<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object>>();
		/** 添加数据 **/ 
		 for (int i = 0; i < menus_name.length; i++) {            
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOverScrollMode, setColumnWidth, setGravity, setNumColumns, setVerticalSpacing
	public GridViewFragment() { 
		super(); 
	} 
 
	public void setUpGridView(GridView gv) {
		gv.setColumnWidth(200);
		gv.setGravity(Gravity.CENTER);
		gv.setOverScrollMode(View.OVER_SCROLL_ALWAYS);
		gv.setNumColumns(GridView.AUTO_FIT);
		gv.setVerticalSpacing(15);
	} 
	 
	@Override 
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	} 
 
	@Override 
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnScrollListener, getAdapter, setAdapter, setOnItemClickListener
            ima.setCatalog(icatalog);
            // notify adapter to change content 
            ima.not();
        } 
        if (null != gridView) {
            if (null == gridView.getAdapter()) {
                gridView.setAdapter(ima);
            } 
            gridView.setOnScrollListener(new GridScrollListener(ima, icatalog));
            gridView.setOnItemClickListener(new OnGalleryItemClick(icatalog));
        } 
        return this;
    } 
 
    public void setFilterSearch(final String filter) {
        if ((filter == null) || "".equals(filter)) {
            return; 
        } 
        if (!filter.equals(LinksHolder.getInstance().getFilter())) {
            LinksHolder.getInstance().setFilter(filter);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setAdapter, getSelectedItemId, setEmptyView, setOnItemClickListener
    /** 
     * Get the cursor row ID of the currently selected grid item. 
     */ 
    public long getSelectedItemId() { 
        ensureGrid(); 
        return mGrid.getSelectedItemId();
    } 
 
    /** 
     * Get the activity's {@link GridView} widget. 
     */ 
    public GridView getGridView() {
        ensureGrid(); 
        return mGrid;
    } 
 
    /** 
     * The default content for a ListFragment has a TextView that can 
     * be shown when the grid is empty.  If you would like to have it 
     * shown, call this method to supply the text it should use. 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setAdapter, setNumColumns
	@Override 
	public Object instantiateItem( ViewGroup container, int position ) {
 
		List<IngredientInfo> infos = AppContext.ingredientMaps.get( "classid" + ( position + 1 ) );
		RelativeLayout relativeLayout = new RelativeLayout( context );
		GridView gridView = new GridView( context );
		relativeLayout.addView( gridView );
		gridView.setNumColumns( 4 );
		IngredientGridViewAdapter adapter = new IngredientGridViewAdapter( handler, relativeLayout, gridView, context, layoutInflater, infos );
		gridView.setAdapter( adapter );
		container.addView( relativeLayout );
		return relativeLayout;
	} 
 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Java 8 IllegalArgumentException Questions & Answers:

Other Java 8 IllegalArgumentException Examples

22:				updateProgressBar();
23:			} catch (IllegalArgumentException e) {
24:				e.printStackTrace();
25:			} catch (IllegalStateException e) {
26:				e.printStackTrace();

Read More

76:	                MAX_ATTEMPTS);
77:	        CommonUtilities.displayMessage(context, message);
78:	    }
79:	
80:	    /**

Read More

252:		}
253:	
254:		/**
255:		 * Receiving song index from playlist view
256:		 * and play the song

Read More

See Code Examples for Java 8 IllegalArgumentException Methods: