This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private List<MediaImage> queryStorage(String relativePath) { | |
| List<MediaImage> mediaImages = new ArrayList<>(); | |
| // query items | |
| String[] projection = new String[] { | |
| MediaStore.Images.Media._ID, | |
| MediaStore.Images.Media.DISPLAY_NAME, | |
| MediaStore.Images.Media.HEIGHT, | |
| MediaStore.Images.Media.WIDTH, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| setSupportActionBar(toolbar) | |
| bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | |
| if (savedInstanceState == null) { | |
| initFragments() | |
| } else { | |
| atHome = savedInstanceState.getBoolean("atHome") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Basic ISO Date Format for Simple Date Format */ | |
| public static final String ISO_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; | |
| SimpleDateFormat format = new SimpleDateFormat(ISO_DATE_FORMAT,Locale.ENGLISH); | |
| String dateTimeString = format.format(new Date()); | |
| Log.d(TAG, "onCreate: dateTimeString = " + dateTimeString); | |
| try { | |
| Date date = format.parse(dateTimeString); | |
| if (date!=null){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // General Bitmap Function to Merge Respective Array of Images | |
| public Bitmap combineBitmaps(List<Bitmap> bitmapList) { | |
| Bitmap collage; | |
| int width = 0, height=bitmapList.get(0).getHeight(); | |
| for (Bitmap bitmap : bitmapList){ | |
| width+=bitmap.getWidth(); | |
| Log.d(TAG, "combineBitmaps: height = " + bitmap.getHeight()); | |
| Log.d(TAG, "combineBitmaps: width = " + bitmap.getWidth()); | |
| if (bitmap.getHeight()>height){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <array name="material_colors"> | |
| <item name="red_50" type="color">#fde0dc</item> | |
| <item name="red_100" type="color">#f9bdbb</item> | |
| <item name="red_200" type="color">#f69988</item> | |
| <item name="red_300" type="color">#f36c60</item> | |
| <item name="red_400" type="color">#e84e40</item> | |
| <item name="red_500" type="color">#e51c23</item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private String loadJSONFromAsset() { | |
| String json; | |
| try { | |
| InputStream is = mContext.getAssets().open("banners.json"); | |
| int size = is.available(); | |
| byte[] buffer = new byte[size]; | |
| int status = is.read(buffer); | |
| Log.d(TAG, "loadJSONFromAsset: status = " + status); | |
| is.close(); | |
| json = new String(buffer, StandardCharsets.UTF_8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ArrayList<ImagesFolder> SearchStorage() { | |
| folders.clear(); | |
| int position = 0; | |
| Uri uri; | |
| Cursor cursor; | |
| int column_index_data, column_index_folder_name; | |
| String absolutePathOfImage = null; | |
| uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void GenerateCheckSum(){ | |
| String txnAmount = feeEditText.getText().toString().trim(); | |
| //creating payTM object | |
| //containing all the values required | |
| final PayTM payTM = new PayTM( | |
| M_ID, | |
| CHANNEL_ID, |