当前位置: 首页>>代码示例>>Java>>正文


Java ValueAnimator类代码示例

本文整理汇总了Java中com.actionbarsherlock.internal.nineoldandroids.animation.ValueAnimator的典型用法代码示例。如果您正苦于以下问题:Java ValueAnimator类的具体用法?Java ValueAnimator怎么用?Java ValueAnimator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ValueAnimator类属于com.actionbarsherlock.internal.nineoldandroids.animation包,在下文中一共展示了ValueAnimator类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.actionbarsherlock.internal.nineoldandroids.animation.ValueAnimator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {

    //prefWrapper = new PreferencesWrapper(this);
    prefProviderWrapper = new PreferencesProviderWrapper(this);

    super.onCreate(savedInstanceState);

    setContentView(R.layout.sip_home);

    final ActionBar ab = getSupportActionBar();
    ab.setDisplayShowHomeEnabled(false);
    ab.setDisplayShowTitleEnabled(false);
    ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    // ab.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

    // showAbTitle = Compatibility.hasPermanentMenuKey

    

    Tab dialerTab = ab.newTab()
             .setContentDescription(R.string.dial_tab_name_text)
            .setIcon(R.drawable.ic_ab_dialer_holo_dark);
    Tab callLogTab = ab.newTab()
             .setContentDescription(R.string.calllog_tab_name_text)
            .setIcon(R.drawable.ic_ab_history_holo_dark);
    Tab favoritesTab = null;
    if(CustomDistribution.supportFavorites()) {
        favoritesTab = ab.newTab()
                .setContentDescription(R.string.favorites_tab_name_text)
                .setIcon(R.drawable.ic_ab_favourites_holo_dark);
    }
    Tab messagingTab = null;
    if (CustomDistribution.supportMessaging()) {
        messagingTab = ab.newTab()
                .setContentDescription(R.string.messages_tab_name_text)
                .setIcon(R.drawable.ic_ab_text_holo_dark);
    }
    
    warningTab = ab.newTab().setIcon(android.R.drawable.ic_dialog_alert);
    warningTabfadeAnim = ObjectAnimator.ofInt(warningTab.getIcon(), "alpha", 255, 100);
    warningTabfadeAnim.setDuration(1500);
    warningTabfadeAnim.setRepeatCount(ValueAnimator.INFINITE);
    warningTabfadeAnim.setRepeatMode(ValueAnimator.REVERSE);
    
    mDualPane = getResources().getBoolean(R.bool.use_dual_panes);

    mViewPager = (ViewPager) findViewById(R.id.pager);
    mTabsAdapter = new TabsAdapter(this, getSupportActionBar(), mViewPager);
    mTabsAdapter.addTab(dialerTab, DialerFragment.class, TAB_ID_DIALER);
    mTabsAdapter.addTab(callLogTab, CallLogListFragment.class, TAB_ID_CALL_LOG);
    if(favoritesTab != null) {
        mTabsAdapter.addTab(favoritesTab, FavListFragment.class, TAB_ID_FAVORITES);
    }
    if (messagingTab != null) {
        mTabsAdapter.addTab(messagingTab, ConversationsListFragment.class, TAB_ID_MESSAGES);
    }
    

    hasTriedOnceActivateAcc = false;

    if (!prefProviderWrapper.getPreferenceBooleanValue(SipConfigManager.PREVENT_SCREEN_ROTATION)) {
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
    }

    selectTabWithAction(getIntent());
    Log.setLogLevel(prefProviderWrapper.getLogLevel());
    

    // Async check
    asyncSanityChecker = new Thread() {
        public void run() {
            asyncSanityCheck();
        };
    };
    asyncSanityChecker.start();
    
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:79,代码来源:SipHome.java


注:本文中的com.actionbarsherlock.internal.nineoldandroids.animation.ValueAnimator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。