本文整理汇总了Java中com.eftimoff.androipathview.PathView类的典型用法代码示例。如果您正苦于以下问题:Java PathView类的具体用法?Java PathView怎么用?Java PathView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PathView类属于com.eftimoff.androipathview包,在下文中一共展示了PathView类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View inflate = inflater.inflate(R.layout.fragment_issues, container, false);
final PathView pathView = (PathView) inflate.findViewById(R.id.pathView);
pathView.getPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
pathView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pathView.getPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
}
});
return inflate;
}
开发者ID:davyjoneswang,项目名称:AndroidLearnDemos,代码行数:23,代码来源:SvgActivity.java
示例2: onCreate
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
final PathView pathView = (PathView) findViewById(R.id.pathView);
// final Path path = makeConvexArrow(50, 100);
// pathView.setPath(path);
// pathView.setFillAfter(true);
// pathView.useNaturalColors();
pathView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pathView.getPathAnimator().
//pathView.getSequentialPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
}
});
}
开发者ID:geftimov,项目名称:android-pathview,代码行数:22,代码来源:SecondActivity.java
示例3: transformPage
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
public void transformPage(View page, float position) {
if (position < -1 || position > 1) { // [-Infinity,-1)
// This page is way off-screen to the left.
page.setAlpha(0);
return;
}
final float abs = 1 - Math.abs(position);
final PathView pathView = (PathView) page.findViewById(R.id.pathView);
pathView.setPercentage(abs);
}
开发者ID:davyjoneswang,项目名称:AndroidLearnDemos,代码行数:12,代码来源:SvgActivity.java
示例4: onCreate
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().hide();
final PathView pathView = (PathView) findViewById(R.id.pathView);
pathView.getPathAnimator()
.delay(1000)
.duration(1000)
.interpolator(new AccelerateDecelerateInterpolator())
.start();
pathView.useNaturalColors();
pathView.setFillAfter(true);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent i = new Intent(Splash.this, LoginActivity.class);
startActivity(i);
finish();
}
}, 2000);
}
开发者ID:Swati4star,项目名称:Travel-Mate,代码行数:33,代码来源:Splash.java
示例5: assertPathView
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
/**
* Hack to reset the path view internal state, since setting the svg source
* only works when setting it the first time.
*/
private void assertPathView() {
ViewGroup parent = getParent(iconView);
PathView newIconView = (PathView) getLayoutInflater().inflate(R.layout.role_icon, null).findViewById(R.id.img_icon);
final int index = parent.indexOfChild(iconView);
removeView(iconView);
removeView(newIconView);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
getResources().getDimensionPixelSize(R.dimen.role_icon_size),
getResources().getDimensionPixelSize(R.dimen.role_icon_size));
layoutParams.gravity = Gravity.CENTER_HORIZONTAL;
parent.addView(newIconView, index, layoutParams);
iconView = newIconView;
}
开发者ID:FauDroids,项目名称:Werewolf,代码行数:19,代码来源:ShowRolesActivity.java
示例6: transformPage
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
public void transformPage(View page, float position) {
if (position < -1 || position > 1) { // [-Infinity,-1)
// This page is way off-screen to the left.
page.setAlpha(0);
return;
}
final float abs = 1 - Math.abs(position);
final PathView pathView = (PathView) page.findViewById(R.id.pathView);
pathView.setPercentage(abs);
}
开发者ID:geftimov,项目名称:android-pathview,代码行数:12,代码来源:MainActivity.java
示例7: getRefreshView
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
public View getRefreshView() {
pathView = new PathView(getContext());
pathView.setFillAfter(true);
final int width = Utils.convertDpToPixel(getContext(), MAX_DISTANCE);
pathView.setLayoutParams(new LinearLayout.LayoutParams(width, width));
final LinearLayout linearLayout = new LinearLayout(getContext());
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, width));
linearLayout.setGravity(Gravity.CENTER_HORIZONTAL);
linearLayout.addView(pathView);
return linearLayout;
}
开发者ID:MobileSolution,项目名称:android-path-pull-to-refresh,代码行数:14,代码来源:PathPullToRefreshLayout.java
示例8: initAttrs
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
/**
* Method that initializes this custom view's default values and sets listeners
*
* @param context The context used to create this view
* @param attrs The attributes used to initialize fields
*/
private void initAttrs(final Context context, final AttributeSet attrs) {
if (isInEditMode())
return;
final TypedArray typedArray =
context.obtainStyledAttributes(attrs, R.styleable.SlickForm);
try {
mContext = context;
slickButtonForegroundColor = typedArray.getColor(R.styleable.SlickForm_slick_buttonFgColor, context.getResources().getColor(R.color.colorWhite));
slickButtonBackgroundColor = typedArray.getColor(R.styleable.SlickForm_slick_buttonBgColor, context.getResources().getColor(R.color.colorPurple));
isTooltipEnabled = typedArray.getBoolean(R.styleable.SlickForm_slick_tooltipEnabled, true);
LinearLayout mRootView = (LinearLayout) inflate(context, R.layout.library_main_layout, this);
slickFieldContainer = (RelativeLayout) mRootView.findViewById(R.id.slick_form_field_container);
slickFormProgressBar = (ProgressBar) mRootView.findViewById(R.id.slick_form_progress);
slickSVGIcon = (PathView) mRootView.findViewById(R.id.svgIcon);
slickEndAnimationContainer = (RelativeLayout) mRootView.findViewById(R.id.slick_form_end_anim_container);
slickEndAnimationProgressBar = (ProgressBar) mRootView.findViewById(R.id.slick_form_end_progress_bar);
slickFormSubmitButton = (Button) mRootView.findViewById(R.id.slick_form_submit_button);
slickFormSubmitButton.setBackgroundColor(slickButtonBackgroundColor);
slickFormSubmitButton.setTextColor(slickButtonForegroundColor);
slickFormSubmitButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(currentFieldPosition >= formFields.size()) {
return;
}
processFormState();
}
});
} finally {
typedArray.recycle();
}
}
开发者ID:AlburIvan,项目名称:SlickForm,代码行数:48,代码来源:SlickForm.java
示例9: onCreateView
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View imageView = null;
// super.onCreate(bundle);
this.mHandler = new Handler(this);
ViewGroup viewGroup2 = (ViewGroup) layoutInflater.inflate(R.layout.welcome, viewGroup, false);
final PathView pathView = (PathView) viewGroup2.findViewById(R.id.pathViewS);
PathView pathViewJ = (PathView) viewGroup2.findViewById(R.id.pathViewJ);
PathView pathViewT = (PathView) viewGroup2.findViewById(R.id.pathViewT);
PathView pathViewB = (PathView) viewGroup2.findViewById(R.id.pathViewB);
// final Path path = makeConvexArrow(50, 100);
// pathView.setPath(path);
Log.d("ver",Build.VERSION.SDK_INT+"<<<<<");
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB_MR2) {
pathView.setFillAfter(true);
pathView.useNaturalColors();
pathView.getPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
pathViewJ.setFillAfter(true);
pathViewJ.useNaturalColors();
pathViewJ.getPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
pathViewT.setFillAfter(true);
pathViewT.useNaturalColors();
pathViewT.getPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
pathViewB.setFillAfter(true);
pathViewB.useNaturalColors();
pathViewB.getPathAnimator().
delay(100).
duration(1500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
}
init();
return viewGroup2;
}
开发者ID:bunnyblue,项目名称:ACDD,代码行数:49,代码来源:WelcomeFragment.java
示例10: initAboutPathView
import com.eftimoff.androipathview.PathView; //导入依赖的package包/类
private void initAboutPathView()
{
AboutEasterEgg = 0;
findViewById(R.id.kuasap).setVisibility(View.VISIBLE);
findViewById(R.id.EasterEgg).setVisibility(View.GONE);
final PathView pathView = (PathView) findViewById(R.id.pathView);
final ImageView imageView = (ImageView) findViewById(R.id.imageView);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AboutEasterEgg ++;
if (AboutEasterEgg >= 5)
initAboutEasterEgg();
}
});
PathViewCheck = false;
if (Build.VERSION.SDK_INT < 11) // PathView min SDK 11
{
imageView.setImageResource(R.drawable.kuasap);
}
else
{
if (!PathViewCheck)
{
pathView.useNaturalColors();
pathView.getPathAnimator().end();
pathView.getPathAnimator().
listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {
@Override
public void onAnimationEnd() {
pathView.setVisibility(View.GONE);
imageView.setImageResource(R.drawable.kuasap);
PathViewCheck = true;
}
}).
duration(2500).
interpolator(new AccelerateDecelerateInterpolator()).
start();
}
}
}
开发者ID:hearsilent,项目名称:KUAS-AP,代码行数:47,代码来源:MainActivity.java
注:本文中的com.eftimoff.androipathview.PathView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论