android-4.0-ice-cream-sandwich

Android CursorAdapter not refreshing on first load

喜夏-厌秋 提交于 2020-01-06 08:29:11
问题 EDIT I didn't add my XML I am writing a dialog for tagging selections. The first view is applying tags they have in their db. The next screen is a dialog for adding new tags to their db. I am supplying suggestions for them to use for their tags. I want to filter the list when they begin typing in their tag. I am using two custom CursorAdapters for each screen but they share the same ListView. I am also using a CursorLoader to run my queries in the background both are extended from the support

Call wireless settings screen with back button

陌路散爱 提交于 2020-01-06 08:00:33
问题 If there is no wireless connection and no logged in google account when you open Play Market and choose new or existing account it opens specific wireless settings screen with back button at the bottom. How to open same screen from my app? Thanks 回答1: Intent intent = new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK); intent.putExtra("only_access_points", true); intent.putExtra("extra_prefs_show_button_bar", true); intent.putExtra("wifi_enable_next_on_connect", true); startActivityForResult

Application not installing in android 4.0 ICS

三世轮回 提交于 2020-01-06 06:56:47
问题 When I try to install my application on Android 4.0.3 OS, I get following errors: 09-19 12:31:56.331: W/ActivityManager(107): No content provider found for permission revoke: file:///data/local/tmp/Sample.apk 09-19 12:31:56.340: W/ActivityManager(107): No content provider found for permission revoke: file:///data/local/tmp/Sample.apk 09-19 12:31:56.780: I/PackageManager(107): Running dexopt on: com.src.sample 09-19 12:31:57.060: I/ActivityManager(107): Force stopping package com.src.sample

Unexpected behaviour while setting a image from res folder to an image view in android

你离开我真会死。 提交于 2020-01-05 16:11:47
问题 I am using an imageview in my xml and setting an image from res/drawable-xhdpi to it. My image is of 354x404 in size and when i am running the code on a 10" samsung tablet, it showing the image as 177x202. Here is the code which i am using: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:baselineAligned="false" > <ImageView android:id="@+id

android - working with broadcastReceiver on android ICS (version 4)

允我心安 提交于 2020-01-04 09:01:46
问题 i'm having a problem on android ICS (version 4) and broadcastReceiver . please help: i'm trying to listen to a simple intent of network connectivity change . i've tried the next tutorial (with the broadcastReceiver defined in the manifest alone - the first part of the website ) : http://www.xinotes.org/notes/note/1526/ on ICS , it doesn't capture any intent , and on any other version it works just fine . can anyone please tell me what's wrong? do i need to add a new intent filter other than

Android 4.0: setting SYSTEM_UI_FLAG_LOW_PROFILE & SYSTEM_UI_FLAG_HIDE_NAVIGATION from Activity instead of View

时光总嘲笑我的痴心妄想 提交于 2020-01-02 10:29:14
问题 I am playing around with controlling the UI Navigation buttons in ICS. The current mechanism for suppressing the Nav Buttons is to call setSystemUiVisibility from a View using the SYSTEM_UI_FLAG_HIDE_NAVIGATION or SYSTEM_UI_FLAG_LOW_PROFILE flags. This seems like a strange place for setting these flags, as most other related settings (such as hiding the status bar) have been done through window LayoutParams properties. My question is if any of you have ideas for a good way to do it from an

My App works on Gingerbread… Crash on ICS and HC

谁说胖子不能爱 提交于 2020-01-02 07:08:11
问题 I need your help. My App works fine on GingerBread, but on ICS and HC crash. This is the logcat 01-14 20:26:51.831: E/AndroidRuntime(698): FATAL EXCEPTION: main 01-14 20:26:51.831: E/AndroidRuntime(698): android.os.NetworkOnMainThreadException 01-14 20:26:51.831: E/AndroidRuntime(698): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099) 01-14 20:26:51.831: E/AndroidRuntime(698): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) 01-14 20:26:51.831: E

Long text goes to next line on ICS, but not on GB and below

淺唱寂寞╮ 提交于 2020-01-02 03:25:33
问题 The first time I noticed this was with AlertDialogs putting the entire message on the first line, even when I specified a new line("\n"). On ICS it displays the correct way, but for the life of me, I couldn't get it to work on GB. Recently I've run into it again. I don't see any reason for it working fine on ICS but not GB and below. EXAMPLE Project Heres an example project with a textview, alertdialog, and two standard textviews. https://github.com/T3hh4xx0r/Text-Example EDIT Heres the

Videos not playing in fullscreen mode

ⅰ亾dé卋堺 提交于 2020-01-01 05:06:48
问题 I am getting a NPE when trying to play embeded video in webview in FULLSCREEN. It is working fine with 3.0 honeycomb but not with ICS 4.0+. Any idea how this can be resolved? java.lang.NullPointerException at android.webkit.PluginFullScreenHolder.show(PluginFullScreenHolder.java:85) at android.webkit.WebView$PrivateHandler.handleMessage(WebView.java:8849) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main

Roboto font for Android 4+?

天涯浪子 提交于 2019-12-31 12:13:10
问题 Do I need to use Roboto font and put it to asset folder if my app will support only Android 4+ devices? I would greatly appreciate for your help. Alex. P.S. Sorry for my English:) 回答1: You can use Roboto natively from Android 4.1+ like this: android:fontFamily="sans-serif" // roboto regular android:fontFamily="sans-serif-light" // roboto light android:fontFamily="sans-serif-condensed" // roboto condensed For any version below that, you have to load the font yourself. Look at this answer I