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
<set | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:ordering="sequentially"> | |
<!-- first we need to immediately reset state --> | |
<objectAnimator | |
android:duration="0" | |
android:propertyName="trimPathStart" | |
android:valueFrom="0.45" | |
android:valueTo="0.45"/> |
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
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="24dp" | |
android:height="24dp" | |
android:viewportWidth="24" | |
android:viewportHeight="24"> | |
<path | |
android:name="line" | |
android:pathData="M5.705,5.705 L18.295,18.295" | |
android:strokeWidth="2" |
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"?> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="24dp" | |
android:height="24dp" | |
android:viewportWidth="24" | |
android:viewportHeight="24"> | |
<path | |
android:name="line" | |
android:pathData="M5.705,5.705 L18.295,18.295" |
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
Layout: | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/processed_image_background"> | |
<View | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@drawable/image_selector" |
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
fun AppCompatActivity.navigate(frag: Fragment) { | |
val fragmentTransaction = supportFragmentManager.beginTransaction() | |
fragmentTransaction.replace(content.id, frag); | |
fragmentTransaction.commit(); | |
} | |
fun Fragment.userError(msg: String?) { | |
Snackbar.make(view, msg, Snackbar.LENGTH_LONG).show() | |
} | |
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
s?.length ?: -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
if (s != null) ? s.length() : 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
view.setOnClickListener({//click handling}) |
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
view.setOnClickListener({/**click handling*/}) |
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
view.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
//click handling | |
} | |
}); |