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 abstract class AuthFragment extends Fragment { | |
| protected Callback callback; | |
| @Nullable | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |
| View root = inflater.inflate(authLayout(), container, false); | |
| ButterKnife.bind(this, root); | |
| return root; |
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
| //load a very big image and resize it, so it fits our needs | |
| Glide.with(this) | |
| .load(R.drawable.busy) | |
| .asBitmap() | |
| .override(screenSize[0]*2,screenSize[1]) | |
| .diskCacheStrategy(DiskCacheStrategy.RESULT) | |
| .into(new ImageViewTarget<Bitmap>(background) { | |
| @Override | |
| protected void setResource(Bitmap resource) { | |
| background.setImageBitmap(resource); |
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 AuthActivity extends AppCompatActivity { | |
| @BindViews(value = {R.id.logo, R.id.first, R.id.second, R.id.last}) | |
| protected List<ImageView> sharedElements; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_login); | |
| ButterKnife.bind(this); |
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 AnimatedViewPager extends ViewPager { | |
| private int duration; | |
| public AnimatedViewPager(Context context) { | |
| super(context); | |
| postInitViewPager(); | |
| } | |
| public AnimatedViewPager(Context context, AttributeSet attrs) { |
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
| @Override | |
| public boolean onTouchEvent(MotionEvent ev) { | |
| return false; | |
| } |
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
| <android.support.constraint.ConstraintLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:id="@+id/root" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context="com.vpaliy.loginconcept.LoginActivity"> | |
| <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
| <resources> | |
| <!-- Base application theme. --> | |
| <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| <item name="windowActionBar">false</item> | |
| <item name="windowNoTitle">true</item> | |
| <item name="android:windowFullscreen">true</item> | |
| <item name="colorPrimary">@color/colorPrimary</item> | |
| <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
| <item name="colorAccent">@color/colorAccent</item> | |
| <item name="colorControlActivated">@color/color_input_hint</item> |
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 static class Adapter extends FragmentStatePagerAdapter{ | |
| //our factor value | |
| private float factor; | |
| public Adapter(FragmentManager manager, final ViewPager pager){ | |
| super(manager); | |
| final float textSize = pager.getResources().getDimension(R.dimen.folded_size); | |
| final float textPadding = pager.getResources().getDimension(R.dimen.folded_label_padding); | |
| factor = 1 - (textSize + textPadding) / (pager.getWidth()); | |
| } |
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 abstract class AuthFragment extends Fragment { | |
| protected Callback callback; | |
| @BindView(R.id.caption) | |
| protected VerticalTextView caption; | |
| @BindView(R.id.root) | |
| protected ViewGroup parent; |
NewerOlder