This file contains 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(); |
This file contains 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 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 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 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 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; |
OlderNewer