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
| //Start View | |
| Intent intent = new Intent(context, SearchActivity.class); | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
| ActivityOptions options = ActivityOptions. | |
| makeSceneTransitionAnimation(getActivity(), v, "transition"); | |
| startActivity(intent, options.toBundle()); | |
| }else | |
| startActivity(intent); | |
| //End 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
| public class CustomToast { | |
| public static void showToast(Context context,String message) { | |
| Toast toast = Toast.makeText(context, message, Toast.LENGTH_SHORT); | |
| toast.setGravity(Gravity.BOTTOM, toast.getXOffset() / 3, toast.getYOffset() / 3); | |
| TextView textView = new TextView(context); | |
| textView.setBackgroundColor(Color.DKGRAY); | |
| textView.setTextColor(Color.WHITE); | |
| textView.setTypeface(FontManager.Iransens(context)); |
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
| package com.daimajia.slider.library; | |
| import android.support.v7.widget.RecyclerView; | |
| /** | |
| * Created by Rezaiyan on 9/18/2017. | |
| */ | |
| public abstract class HidingScrollListener extends RecyclerView.OnScrollListener { | |
| private static final int HIDE_THRESHOLD = 20; |
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
| private void addTab(TextView tv) { | |
| View v = tab.getCustomView(); | |
| if (v instanceof TextView) { | |
| tv.setScaleX(0f); | |
| tv.setScaleY(0f); | |
| tv.animate() | |
| .scaleX(1f) | |
| .scaleY(1f) | |
| .setInterpolator(new FastOutSlowInInterpolator()) | |
| .setDuration(450) |
NewerOlder