π§
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
dependencies { | |
compile 'com.github.bumptech.glide:glide:3.5.2' | |
compile 'com.android.support:support-v4:22.0.0' | |
} |
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
Glide.with(myFragment) | |
.load(url) | |
.centerCrop() | |
.placeholder(R.drawable.loading_spinner) | |
.crossFade() | |
.into(myImageView); |
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
Picasso.with(myFragment) | |
.load(url) | |
.centerCrop() | |
.placeholder(R.drawable.loading_spinner) | |
.into(myImageView); |
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
<meta-data android:name="example.com.myanimation.GlideConfiguration" | |
android:value="GlideModule"/> |
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
Glide.with(context) | |
.load(Url) | |
.thumbnail(0.1f) | |
.into(imageView) |
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
dependencies { | |
compile 'com.kevalpatel2106:userawarevideoview:1.0.1' | |
} |
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
<com.kevalpatel.userawarevieoview.UserAwareVideoView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:id="@+id/video_view"/> |
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
mVideoView = (UserAwareVideoView) findViewById(R.id.video_view); | |
mVideoView.setUserAwarenessListener(new UserAwarenessListener() { | |
@Override | |
public void onErrorOccurred(int errorCode) { | |
//Handle errors. | |
switch (errorCode) { | |
case Errors.UNDEFINED: | |
//Unknown error occured. | |
//This will stop eye tracking, but video will keep playing. | |
break; |
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
dependency{ | |
compile 'com.kevalpatel2106:prevent-screen-off:1.0' | |
} |
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 class MainActivity extends AnalyserActivity //Inherit AnalyseActivity to automatically manage activity callback. | |
implements ScreenListner { //Implement the listener to get the callbacks |