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


Java Axis.DEFAULT_TEXT_SIZE_SP属性代码示例

本文整理汇总了Java中lecho.lib.hellocharts.model.Axis.DEFAULT_TEXT_SIZE_SP属性的典型用法代码示例。如果您正苦于以下问题:Java Axis.DEFAULT_TEXT_SIZE_SP属性的具体用法?Java Axis.DEFAULT_TEXT_SIZE_SP怎么用?Java Axis.DEFAULT_TEXT_SIZE_SP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在lecho.lib.hellocharts.model.Axis的用法示例。


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

示例1: BgGraphBuilder

public BgGraphBuilder(Context context, long start, long end, int numValues){
    end_time = end;
    start_time = start;
    bgReadings = BgReading.latestForGraph( numValues, start, end);
    calibrations = Calibration.latestForGraph( numValues, start, end);
    this.context = context;
    this.prefs = PreferenceManager.getDefaultSharedPreferences(context);
    this.highMark = Double.parseDouble(prefs.getString("highValue", "170"));
    this.lowMark = Double.parseDouble(prefs.getString("lowValue", "70"));
    this.doMgdl = (prefs.getString("units", "mgdl").equals("mgdl"));
    defaultMinY = unitized(40);
    defaultMaxY = unitized(250);
    pointSize = isXLargeTablet(context) ? 5 : 3;
    axisTextSize = isXLargeTablet(context) ? 20 : Axis.DEFAULT_TEXT_SIZE_SP;
    previewAxisTextSize = isXLargeTablet(context) ? 12 : 5;
    hoursPreviewStep = isXLargeTablet(context) ? 2 : 1;
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:17,代码来源:BgGraphBuilder.java

示例2: BgGraphBuilder

public BgGraphBuilder(Context context){
    this.context = context;
    this.prefs = PreferenceManager.getDefaultSharedPreferences(context);
    this.highMark = Double.parseDouble(prefs.getString("highValue", "170"));
    this.lowMark = Double.parseDouble(prefs.getString("lowValue", "70"));
    this.doMgdl = (prefs.getString("units", "mgdl").compareTo("mgdl") == 0);
    defaultMinY = unitized(40);
    defaultMaxY = unitized(250);
    pointSize = isXLargeTablet() ? 5 : 3;
    axisTextSize = isXLargeTablet() ? 20 : Axis.DEFAULT_TEXT_SIZE_SP;
    previewAxisTextSize = isXLargeTablet() ? 12 : 5;
    hoursPreviewStep = isXLargeTablet() ? 2 : 1;
}
 
开发者ID:StephenBlackWasAlreadyTaken,项目名称:NightWatch,代码行数:13,代码来源:BgGraphBuilder.java

示例3: BgGraphBuilder

public BgGraphBuilder(Context context, long start, long end, int numValues, boolean show_prediction) {
    // swap argument order if needed
    if (start > end) {
        long temp = end;
        end = start;
        start = temp;
        if (d) Log.d(TAG, "Swapping timestamps");
    }
    if (d)
        Log.d(TAG, "Called timestamps: " + JoH.dateTimeText(start) + " -> " + JoH.dateTimeText(end));
    this.prefs = PreferenceManager.getDefaultSharedPreferences(context);
    prediction_enabled = show_prediction;
    if (prediction_enabled)
        simulation_enabled = prefs.getBoolean("simulations_enabled", true);
    end_time = end / FUZZER;
    start_time = start / FUZZER;

    readings_lock.lock();
    try {
        // store the initialization values used for this instance
        loaded_numValues=numValues;
        loaded_start=start;
        loaded_end=end;
        bgReadings = BgReading.latestForGraph(numValues, start, end);
        plugin_adjusted = false;
    } finally {
        readings_lock.unlock();
    }

    if ((end - start) > 80000000) {
        try {
            capturePercentage = ((bgReadings.size() * 100) / ((end - start) / 300000));
            //Log.d(TAG, "CPTIMEPERIOD: " + Long.toString(end - start) + " percentage: " + JoH.qs(capturePercentage));
        } catch (Exception e) {
            capturePercentage = -1; // invalid reading
        }
    }
    bloodtests = BloodTest.latestForGraph(numValues, start, end);
    // get extra calibrations so we can use them for historical readings
    calibrations = Calibration.latestForGraph(numValues, start - (3 * Constants.DAY_IN_MS), end);
    treatments = Treatments.latestForGraph(numValues, start, end + (120 * 60 * 1000));
    this.context = context;
    this.highMark = tolerantParseDouble(prefs.getString("highValue", "170"));
    this.lowMark = tolerantParseDouble(prefs.getString("lowValue", "70"));
    this.doMgdl = (prefs.getString("units", "mgdl").equals("mgdl"));
    defaultMinY = unitized(40);
    defaultMaxY = unitized(250);
    pointSize = isXLargeTablet(context) ? 5 : 3;
    axisTextSize = isXLargeTablet(context) ? 20 : Axis.DEFAULT_TEXT_SIZE_SP;
    previewAxisTextSize = isXLargeTablet(context) ? 12 : 5;
    hoursPreviewStep = isXLargeTablet(context) ? 2 : 1;
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:52,代码来源:BgGraphBuilder.java


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