Home

Android: Dynamic column number in GridView and Gridlayout manager

If you want to change grid item dynamically then follow these steps. This will help you to achieve your goal. For GridView just do : final GridView gridView = (GridView) rootView.findViewById(R.id.gridView); int gridViewEntrySize = getResources().getDimensionPixelSize(R.dimen.grip_view_entry_size); int gridViewSpacing = getResources().getDimensionPixelSize(R.dimen.grip_view_spacing); WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); int numColumns = (display.getWidth() – gridViewSpacing) / […]

READ MORE

How to solve SSLHandshake exception in android with OkHttp

Here is how to handle SSL handshake error in android with Okhttp. This tutorial includes links from android developer site and the details information given at https://developer.android.com/training/articles/security-ssl.html If you got this kind of error while network operation then this demo will help you to save your time : javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not […]

READ MORE

How to append or write data into text file in android?

Here is demo for creating text file and append text to that file in JAVA. For this in Android you have to ask for WRITE_EXTERNAL_STORAGE permission. you can check this : if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (ContextCompat.checkSelfPermission(getBaseContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_STORAGE_INT); return; } } Please handle this request in onRequestPermissionsResult.   Finally actual […]

READ MORE

Outing justo morbi wild

Aliquam sed in egestas gravida amet mattis sagittis, semper morbi vitae, egestas blandit duis facilisis adipiscing fermentum aenean nunc nibh accumsan, ornare enim at interdum mi arcu, ut magna ultrices odio dictumst aliquam tincidunt dictum pharetra vestibulum aliquam aliquet suspendisse. Sed et aliquam tincidunt ut sed porttitor nunc et etiam molestie arcu donec venenatis nulla […]

READ MORE

Eget elementum on train

Aliquam sed in egestas gravida amet mattis sagittis, semper morbi vitae, egestas blandit duis facilisis adipiscing fermentum aenean nunc nibh accumsan, ornare enim at interdum mi arcu, ut magna ultrices odio dictumst aliquam tincidunt dictum pharetra vestibulum aliquam aliquet suspendisse. Sed et aliquam tincidunt ut sed porttitor nunc et etiam molestie arcu donec venenatis nulla […]

READ MORE

Visit sagittis malesuada vestibulum

Aliquam sed in egestas gravida amet mattis sagittis, semper morbi vitae, egestas blandit duis facilisis adipiscing fermentum aenean nunc nibh accumsan, ornare enim at interdum mi arcu, ut magna ultrices odio dictumst aliquam tincidunt dictum pharetra vestibulum aliquam aliquet suspendisse. Sed et aliquam tincidunt ut sed porttitor nunc et etiam molestie arcu donec venenatis nulla […]

READ MORE