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


Java LUtils类代码示例

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

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

示例1: MyScheduleAdapter

import com.google.samples.apps.iosched.util.LUtils; //导入依赖的package包/类
public MyScheduleAdapter(Context context, LUtils lUtils) {
    mContext = context;
    mLUtils = lUtils;
    Resources resources = context.getResources();
    mHourColorDefault = resources.getColor(R.color.my_schedule_hour_header_default);
    mHourColorPast = resources.getColor(R.color.my_schedule_hour_header_finished);
    mTitleColorDefault = resources.getColor(R.color.my_schedule_session_title_default);
    mTitleColorPast = resources.getColor(R.color.my_schedule_session_title_finished);
    mIconColorDefault = resources.getColor(R.color.my_schedule_icon_default);
    mIconColorPast = resources.getColor(R.color.my_schedule_icon_finished);
    mColorConflict = resources.getColor(R.color.my_schedule_conflict);
    mColorBackgroundDefault = resources.getColor(android.R.color.white);
    mColorBackgroundPast = resources.getColor(R.color.my_schedule_past_background);
    mListSpacing = resources.getDimensionPixelOffset(R.dimen.element_spacing_normal);
    TypedArray a = context.obtainStyledAttributes(new int[]{R.attr.selectableItemBackground});
    mSelectableItemBackground = a.getResourceId(0, 0);
    a.recycle();
    mIsRtl = UIUtils.isRtl(context);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:20,代码来源:MyScheduleAdapter.java


示例2: onActivityCreated

import com.google.samples.apps.iosched.util.LUtils; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    mLUtils = LUtils.getInstance((AppCompatActivity) getActivity());
    mHandler = new Handler();
    initViews();
    initViewListeners();
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:9,代码来源:SessionDetailFragment.java


示例3: onCreate

import com.google.samples.apps.iosched.util.LUtils; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    RecentTasksStyler.styleRecentTasksEntry(this);

    // Check if the EULA has been accepted; if not, show it.
    if (WelcomeActivity.shouldDisplay(this)) {
        Intent intent = new Intent(this, WelcomeActivity.class);
        startActivity(intent);
        finish();
        return;
    }

    mImageLoader = new ImageLoader(this);
    mHandler = new Handler();

    if (savedInstanceState == null) {
        registerGCMClient();
    }

    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
    sp.registerOnSharedPreferenceChangeListener(this);

    ActionBar ab = getSupportActionBar();
    if (ab != null) {
        ab.setDisplayHomeAsUpEnabled(true);
    }

    mLUtils = LUtils.getInstance(this);
    mThemedStatusBarColor = getResources().getColor(R.color.theme_primary_dark);
    mNormalStatusBarColor = mThemedStatusBarColor;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:33,代码来源:BaseActivity.java


示例4: onCreate

import com.google.samples.apps.iosched.util.LUtils; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        AnalyticsManager.initializeAnalyticsTracker(getApplicationContext());
//        RecentTasksStyler.styleRecentTasksEntry(this);

        PrefUtils.init(this);

        // Check if the EULA has been accepted; if not, show it.
//        if (!PrefUtils.isTosAccepted(this)) {
//            Intent intent = new Intent(this, WelcomeActivity.class);
//            startActivity(intent);
//            finish();
//        }

        mImageLoader = new ImageLoader(this);
        mHandler = new Handler();

        // Enable or disable each Activity depending on the form factor. This is necessary
        // because this app uses many implicit intents where we don't name the exact Activity
        // in the Intent, so there should only be one enabled Activity that handles each
        // Intent in the app.
        UIUtils.enableDisableActivitiesByFormFactor(this);

        if (savedInstanceState == null) {
            registerGCMClient();
        }

        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
        sp.registerOnSharedPreferenceChangeListener(this);

        ActionBar ab = getSupportActionBar();
        if (ab != null) {
            ab.setDisplayHomeAsUpEnabled(true);
        }

        mLUtils = LUtils.getInstance(this);
        mThemedStatusBarColor = getResources().getColor(R.color.theme_primary_dark);
        mNormalStatusBarColor = mThemedStatusBarColor;
    }
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:41,代码来源:BaseActivity.java


示例5: getLUtils

import com.google.samples.apps.iosched.util.LUtils; //导入依赖的package包/类
public LUtils getLUtils() {
    return mLUtils;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:4,代码来源:BaseActivity.java



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