首页 > 代码库 > Android Launcher3的DeviceProfile的改变
Android Launcher3的DeviceProfile的改变
最近真忙,没时间细写blog了。
对比了两个平台的Launcher3项目,虽然都是3,但是代码也不是一成不变的,新版本的Launcher3,DeviceProfile也从DynamicGrid中独立出来了。
之前加的很多属性不再适用,需要重新阅读源码,进行修改。呃,工作量不小。
DeviceProfile.java
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.launcher3; import android.appwidget.AppWidgetHostView; import android.content.ComponentName; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Paint; import android.graphics.Paint.FontMetrics; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; import android.util.DisplayMetrics; import android.view.Display; import android.view.Gravity; import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.LinearLayout; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import android.os.SystemProperties;//add by czq import android.text.TextUtils;//add by czq import android.util.Log; class DeviceProfileQuery { float widthDps; float heightDps; float value; PointF dimens; DeviceProfileQuery(float w, float h, float v) { widthDps = w; heightDps = h; value = http://www.mamicode.com/v;>Android Launcher3的DeviceProfile的改变
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。