android - Zxing using custom layout -


i'm using zxing library way:

repositories {     mavencentral()      maven {         url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/"     } } dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.google.zxing:core:2.2'     compile 'com.embarkmobile:zxing-android-minimal:1.2.1@aar' } 

and in activity:

intentintegrator.initiatescan(this);  @override protected void onactivityresult(int requestcode, int resultcode, intent data) {     intentresult result = intentintegrator.parseactivityresult(requestcode, resultcode, data);     if(result != null) {         if(result.getcontents() == null) {             toast.maketext(this, "cancelled", toast.length_long).show();         } else {             toast.maketext(this, "scanned: " + result.getcontents(), toast.length_long).show();         }     } else {         // important, otherwise result not passed fragment         super.onactivityresult(requestcode, resultcode, data);     } } 

and looks this: enter image description here

but don't know how add button on camera preview. how can create custom layout camera on background , button on front?

i had problem while borrowed , customised code andreas schildbach bitcoin wallet. create small camera view in screen while have other views.

i put gist here.

its qrcode scanner , there buttons , edittext around it. has overlay rectangle better finding middle of screen.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -