English 中文(简体)
Anders Honeycomb Application su ICS (Ice Cream Sandwitch)
原标题:Android Honeycomb application running on ICS (Ice Cream Sandwitch)

我为Honeycomb(最初为3.0)开发了申请,在电算中心发布后,用户可以将其安装到自己的电话中,而不是放在桌上。 我如何过滤这些电话? 我尝试了<代码><support- Screens>,但并未奏效。 同样令人感兴趣的(至少对我而言)我的申请也赢得了小屏幕。 我使用了固定规模的控制,但规模正在缩小。

简言之:

  1. Somebody knows how can I filter the ICS phones? (preferably from code)
  2. What should I do to support ICS phones? (I guess I need to implement a whole new layout for the ICS phones, but it is still a question to me how can I determine what kind of device is it, phone or tablet?
最佳回答
public static boolean isHoneycomb() {
    // Can use static final constants like HONEYCOMB, declared in later versions
    // of the OS since they are inlined at compile time. This is guaranteed behavior.
    return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}

public static boolean isTablet(Context context) {
    return (context.getResources().getConfiguration().screenLayout
            & Configuration.SCREENLAYOUT_SIZE_MASK)
            >= Configuration.SCREENLAYOUT_SIZE_LARGE;
}

public static boolean isHoneycombTablet(Context context) {
    return isHoneycomb() && isTablet(context);
}

https://stackoverflow.com/a/8427523/253583>。

您还可能希望限制安康市场使用户能够在电话上安装。 页: 1

问题回答

可以通过检查

if(Build.VERSION.SDK_INT >= 14) {
    //ics
}

这里的建筑是甲状腺。 1. 造型班级





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签