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
//... | |
//FAB animation | |
private static final int ANIM_DURATION_FAB = 400; | |
private void startContentAnimation() { | |
btnCreate.animate() | |
.translationY(0) | |
.setInterpolator(new OvershootInterpolator(1.f)) | |
.setStartDelay(300) | |
.setDuration(ANIM_DURATION_FAB) |
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
public class CommentsActivity extends ActionBarActivity { | |
public static final String ARG_DRAWING_START_LOCATION = "arg_drawing_start_location"; | |
@InjectView(R.id.toolbar) | |
Toolbar toolbar; | |
@InjectView(R.id.contentRoot) | |
LinearLayout contentRoot; | |
@InjectView(R.id.rvComments) | |
RecyclerView rvComments; | |
@InjectView(R.id.llAddComment) |
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
public class MainActivity extends ActionBarActivity implements FeedAdapter.OnFeedItemClickListener { | |
//... | |
private void setupFeed() { | |
//Increase the amount of extra space that should be laid out by LayoutManager. | |
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this) { | |
@Override | |
protected int getExtraLayoutSpace(RecyclerView.State state) { | |
return 300; |
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
private void animatePhotoLike(final CellFeedViewHolder holder) { | |
if (!likeAnimations.containsKey(holder)) { | |
holder.vBgLike.setVisibility(View.VISIBLE); | |
holder.ivLike.setVisibility(View.VISIBLE); | |
holder.vBgLike.setScaleY(0.1f); | |
holder.vBgLike.setScaleX(0.1f); | |
holder.vBgLike.setAlpha(1f); | |
holder.ivLike.setScaleY(0.1f); | |
holder.ivLike.setScaleX(0.1f); |
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
public class CircleTransformation implements Transformation { | |
private static final int STROKE_WIDTH = 6; | |
@Override | |
public Bitmap transform(Bitmap source) { | |
int size = Math.min(source.getWidth(), source.getHeight()); | |
int x = (source.getWidth() - size) / 2; | |
int y = (source.getHeight() - size) / 2; |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="io.github.froger.instamaterial"> | |
<!--...--> | |
<uses-permission android:name="android.permission.CAMERA" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-feature | |
android:name="android.hardware.camera" |
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
// MainActivity.java | |
@Override | |
protected void onNewIntent(Intent intent) { | |
super.onNewIntent(intent); | |
if (ACTION_SHOW_LOADING_ITEM.equals(intent.getAction())) { | |
showFeedLoadingItemDelayed(); | |
} | |
} |
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
@Scope | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface ActivityScope { | |
} |
OlderNewer