EXIF orientation tag value always 0 for image taken with portrait camera app android

I also faced same issue in Samsung devices, later I implemented ExifInterface and solved successfully. In any mode images will be shot it will always store in portrait mode only, and while fetching too returning in portrait mode. below of code I used to achieve my goal, I implemented within back camera, not sure about … Read more

Controlling the camera to take pictures in portrait doesn’t rotate the final images

The problem is when I saved the image I didn’t do well. @Override public void onPictureTaken(byte[] data, Camera camera) { String timeStamp = new SimpleDateFormat( “yyyyMMdd_HHmmss”).format( new Date( )); output_file_name = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + File.separator + timeStamp + “.jpeg”; File pictureFile = new File(output_file_name); if (pictureFile.exists()) { pictureFile.delete(); } try { FileOutputStream fos = new FileOutputStream(pictureFile); … Read more

Changing number of columns with GridLayoutManager and RecyclerView

If you have more than one condition or use the value in multiple places this can go out of hand pretty fast. I suggest to create the following structure: res – values – integers.xml – values-land – integers.xml with res/values/integers.xml being: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <integer name=”gallery_columns”>2</integer> </resources> and res/values-land/integers.xml being: <?xml version=”1.0″ encoding=”utf-8″?> <resources> … Read more

Restoring state of TextView after screen rotation?

If you want to force your TextView to save its state you must add freezesText attribute: <TextView … android:freezesText=”true” /> From documentation on freezesText : If set, the text view will include its current complete text inside of its frozen icicle in addition to meta-data such as the current cursor position. By default this is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)