本文整理汇总了Java中com.eftimoff.androipathview.PathView.useNaturalColors方法的典型用法代码示例。如果您正苦于以下问题:Java PathView.useNaturalColors方法的具体用法?Java PathView.useNaturalColors怎么用?Java PathView.useNaturalColors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.eftimoff.androipathview.PathView
的用法示例。
在下文中一共展示了PathView.useNaturalColors方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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;
}
示例3: 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();
}
}
}