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
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.Matrix; | |
| import android.graphics.Paint; | |
| import android.graphics.Path; | |
| import android.graphics.Point; |
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 static boolean checkRootMethod1() { | |
| String buildTags = android.os.Build.TAGS; | |
| return buildTags != null && buildTags.contains("test-keys"); | |
| } | |
| private static boolean checkRootMethod2() { | |
| String[] paths = { "/system/app/Superuser.apk", "/sbin/su", "/system/bin/su", "/system/xbin/su", | |
| "/data/local/xbin/su", "/data/local/bin/su", "/system/sd/xbin/su", | |
| "/system/bin/failsafe/su", "/data/local/su", "/su/bin/su"}; | |
| for (String path : paths) { |
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 | |
| public boolean onPrepareOptionsMenu(Menu menu) { | |
| setCount(this, "9"); | |
| } | |
| public void setCount(Context context, String count) { | |
| MenuItem menuItem = defaultMenu.findItem(R.id.ic_group); | |
| LayerDrawable icon = (LayerDrawable) menuItem.getIcon(); | |
| CountDrawable badge; |
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
| package com.bslamc.ifa.customComponent.badgeDrawable; | |
| /** | |
| * Created by rajsuvariya on 17/8/17. | |
| */ | |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Paint; |
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"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item | |
| android:drawable="@drawable/ic_group" | |
| android:gravity="center" /> | |
| <item | |
| android:id="@+id/ic_group_count" | |
| android:drawable="@color/transparent" /> |
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
| protected List<ReactPackage> getPackages() { | |
| return Arrays.<ReactPackage>asList( | |
| new MainReactPackage(), | |
| new SharePreferencePackager()); // <-- Add this line with your package name. | |
| } |
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
| NativeModules.SharefPreference.getMpin((mpin)=>console.log(mpin)) |
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
| mReactInstanceManager = ReactInstanceManager.builder() | |
| .setApplication(getApplication()) | |
| .setBundleAssetName("index.android.bundle") | |
| .setJSMainModuleName("index.android") | |
| .addPackage(new MainReactPackage()) | |
| .addPackage(new SharedPreferencePackager()) | |
| .setUseDeveloperSupport(BuildConfig.DEBUG) | |
| .setInitialLifecycleState(LifecycleState.RESUMED) | |
| .build(); |
NewerOlder