本文整理汇总了Java中com.flaviofaria.kenburnsview.KenBurnsView类的典型用法代码示例。如果您正苦于以下问题:Java KenBurnsView类的具体用法?Java KenBurnsView怎么用?Java KenBurnsView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KenBurnsView类属于com.flaviofaria.kenburnsview包,在下文中一共展示了KenBurnsView类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPause
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
protected void onPause() {
super.onPause();
if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean(getString(R.string.pref_overlay), false) && !goingToSettings)
if (isSystemAlertPermissionGranted(this)) {
Intent i = new Intent(context, FlyingChopper.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startService(i);
}
boolean daynightTheme = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(getString(R.string.pref_daynight_theme), false);
if(daynightTheme)
{
KenBurnsView bgImg = (KenBurnsView) findViewById(R.id.mainBgImage);
bgImg.pause();
}
goingToSettings = false;
}
示例2: onCreate
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
generator();
FacebookSdk.sdkInitialize(getApplicationContext());
callbackManager = CallbackManager.Factory.create();
AppEventsLogger.activateApp(this);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
LogSaver.appendLog(TAG);
logoiv = (ImageView) findViewById(R.id.imageView);
TextView tv2016= (TextView) findViewById(R.id.l2016);
Typeface typeface1=Typeface.createFromAsset(getAssets(),"canaro_extra_bold.otf");
tv2016.setTypeface(typeface1);
Typeface typeface=Typeface.createFromAsset(getAssets(),"canaro_extra_bold.otf");
ShimmerTextView textView = (ShimmerTextView) findViewById(R.id.shimmertv);
KenBurnsView kenBurnsView= (KenBurnsView) findViewById(R.id.kbview);
kenBurnsView.animate().setDuration(500).start();
if (textView != null) {
textView.setTypeface(typeface);
}
Shimmer shimmer = new Shimmer();
shimmer.start(textView);
nextActivity();
}
示例3: init
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
private void init(){
kenBurnsView = (KenBurnsView)findViewById(R.id.image);
kenBurnsView.setImageResource(R.drawable.loading);
rl_background = (RelativeLayout)findViewById(R.id.rl_background);
initLoginForm();
tv_signupSupporterBtn = (TextView)findViewById(R.id.tv_signup_supporter);
tv_signupSupporterBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(StartActivity.this, RegisterSupporterActivity.class);
startActivity(intent);
}
});
progressDialog = new MaterialDialog.Builder(this)
.content(R.string.please_wait)
.progress(true, 0)
.progressIndeterminateStyle(true)
.theme(Theme.LIGHT)
.build();
findViewById(R.id.rl_background).setVisibility(View.GONE);
}
示例4: findViews
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
private void findViews() {
mToolbar = (Toolbar) findViewById(R.id.toolbar);
mToolbarTextView = (TextView) findViewById(R.id.toolbar_title);
mCollapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar);
mTabLayout = (TabLayout) findViewById(R.id.tabLayout);
mHeaderImageView = (KenBurnsView) findViewById(R.id.imageView_header);
mContainerView = findViewById(R.id.view_container);
mViewPager = (ViewPager) findViewById(R.id.viewPager);
}
示例5: findViews
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
private void findViews() {
mToolbar = (Toolbar) findViewById(R.id.toolbar);
mToolbarTextView = (TextView) findViewById(R.id.toolbar_title);
mCollapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar);
mTabLayout = (TabLayout) findViewById(R.id.tabLayout);
mHeaderImageView = (KenBurnsView) findViewById(R.id.imageView_header);
mViewPager = (ViewPager) findViewById(R.id.viewPager);
}
示例6: onViewCreated
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
//set the header stuff
header = new KenBurnsView(getActivity());
getListView().addHeaderView(header, null, false);
header.setImageBitmap(StretchedImage());
//set the list adapter
setListAdapter(arrayAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, new String[] {"Conway's Game of Life", "Evolution of Color" /*, "Boids"*/}));
}
示例7: setupImageBackground
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
private void setupImageBackground(View view) {
kenBurnsView = (KenBurnsView) view.findViewById(R.id.kenBurnsView_Background);
phoneMode = (kenBurnsView == null);
//height and width of screen
final int MAX_HEIGHT = getResources().getDisplayMetrics().heightPixels;
final int MAX_WIDTH = getResources().getDisplayMetrics().widthPixels;
try {
new AsyncTask<Void, Void, Integer>(){
@Override
protected Integer doInBackground(Void... params) {
if (phoneMode) {
return getPhoneBackground();
} else {
return getTabletBackground();
}
}
@Override
protected void onPostExecute(Integer resID) {
RequestCreator requestCreator = Picasso.with(getActivity())
.load(resID)
.transform(new BitmapTransform(MAX_WIDTH, MAX_HEIGHT));
if(phoneMode){
requestCreator.into(phoneBackgroundImage);
} else {
requestCreator.into(kenBurnsView);
}
}
}.execute();
} catch (Exception e) {
Crashlytics.logException(e);
}
}
示例8: onCreate
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.from_url);
mImg = (KenBurnsView) findViewById(R.id.img);
mProgressBar = (ProgressBar) findViewById(android.R.id.progress);
loadImage();
}
示例9: onCreate
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.multi_image);
mViewSwitcher = (ViewSwitcher) findViewById(R.id.viewSwitcher);
KenBurnsView img1 = (KenBurnsView) findViewById(R.id.img1);
img1.setTransitionListener(this);
KenBurnsView img2 = (KenBurnsView) findViewById(R.id.img2);
img2.setTransitionListener(this);
}
示例10: onCreate
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.single_image);
mImg = (KenBurnsView) findViewById(R.id.img);
}
示例11: onPlayClick
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
protected void onPlayClick() {
KenBurnsView currentImage = (KenBurnsView) mViewSwitcher.getCurrentView();
currentImage.resume();
}
示例12: onPauseClick
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
@Override
protected void onPauseClick() {
KenBurnsView currentImage = (KenBurnsView) mViewSwitcher.getCurrentView();
currentImage.pause();
}
示例13: startImageAnim
import com.flaviofaria.kenburnsview.KenBurnsView; //导入依赖的package包/类
public void startImageAnim(KenBurnsView images);