android-2.3-gingerbread

2 ViewPager not scrolling in Android 2.3

僤鯓⒐⒋嵵緔 提交于 2019-12-01 03:59:06
I am using Navigation Drawer in my app, that contains some Fragments just like in the below picture. Every Fragment Contains another ViewPager that is an ImageSlider, and below that is a Listview and at the top I am using the SwipeRefreshLayout. My problem is the image slider works well on devices that has Android version 3.0 or higher but the swipe left or right doesn't works on devices 2.3 and lower, instead it invokes the Parent ViewPager's swipe that is it navigates the fragment. I am using support Version 4 library for this purpose to support devices lower than 3.0. All functions works

Changing value of R.String Programmatically

若如初见. 提交于 2019-12-01 02:36:23
问题 Can you change the values of a R.string programmatically in an android program? I need to pull some API information (for example battery state, battery percentage, android os version) and would like to save it a R.string value. I know how to read it: String helloValue= getResources().getString(R.string.hello); I've also looked at: Change value of R.string programically? but it seems that only involves changing language and he ended up doing it a different way. Can anyone lend a hand please? I

IDTech Unimag Card Swiper on Android

别来无恙 提交于 2019-11-30 12:09:03
I've been working on Android (v2.3) for a couple of weeks now, and I've stumbled upon some problems with the Unimag Card Swiper from IDTECH . The unit comes with a scarce documentation and the demo app from the SDK implements the firmware update and a few classes for dialogs and such which really offuscate how to achieve basic functionality (added to the few and not so good comments in the code). I have implemented the interface in a basic activity and tried to detect when the unit is connected or disconnected but it seems the listener catches both events (connection/disconnection) as

How do I stop GC_CONCURRENT running so frequently?

こ雲淡風輕ζ 提交于 2019-11-30 07:27:41
I am using a thread which records the audio using AudioRecord class and placed in recorderBUffer (which is a linked list of Short[]) , a separate thread which does the encoding of this data and place it to a playerBuffer(linked list[]). For playing the Audio I am using AudioTrack class and onPeriodicNotification() I read the data from playerBuffer and write it to track. The code is simple and straight forwards as it appears. However it doesnt work the way it should. GC_CONCURRENT eats of all the time and which is causing AudioTrack restart so frequently(I guess!). I get following messages from

IDTech Unimag Card Swiper on Android

≯℡__Kan透↙ 提交于 2019-11-29 18:04:45
问题 I've been working on Android (v2.3) for a couple of weeks now, and I've stumbled upon some problems with the Unimag Card Swiper from IDTECH . The unit comes with a scarce documentation and the demo app from the SDK implements the firmware update and a few classes for dialogs and such which really offuscate how to achieve basic functionality (added to the few and not so good comments in the code). I have implemented the interface in a basic activity and tried to detect when the unit is

Appwidget size calculation

ⅰ亾dé卋堺 提交于 2019-11-28 16:07:28
It might be me, but when I calculate minimum app widget sizes according to the formula given on the android page I don't get the right widget widths; The formula is as follows : width(n) = (70 x n) - 30 When I want to have a 5x1 widget, the correct width would be (5 * 70) - 30 = 320dp. However when testing this on a motorola Xoom it resolves to being a 4x1 widget. I've tested different values and 400dp seems good for 5x1 on the motorola xoom with Honeycomb, but then I'd test it on a regular Galaxy Tab with Gingerbread and then it resolves to a 6x1 (like one would expect). So two questions here

Android browser touch events stop display being updated inc. canvas/elements - How to work around?

北城以北 提交于 2019-11-27 16:24:16
问题 On some android's native browser touching the page seems to stop the display from being updated until the finger is released. This occurs for both html element based animation (switching classes) and for canvas based animation. It does not however stop normal js execution and other events are fired as normal. On devices with this problem the dolphin browser also seems effected (not firefox though). Touchstart/move both have preventDefault() fired as well as stopPropergation(), cancelBubble =

Something's wrong in Corner radius Android

☆樱花仙子☆ 提交于 2019-11-27 15:30:18
I'm making my own search view for Android 2.3. I have. LinearLayout (Horizontal) AutoCompleteTextView ImageButton I added the button and AutoCompleteTextView to LinearLayout . I want to put a corner radius in my own control like the image shown below. I set this drawable to ImageButton <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="true" > <shape> <solid android:color="#27AFE0" /> <stroke android:width="0.5dp" android:color="#000000" /> <corners android:topRightRadius="10dp" android:bottomRightRadius="10dp" android:topLeftRadius="0.1dp"

Tamil fonts in Android

风流意气都作罢 提交于 2019-11-27 13:44:09
I developed a Tamil news application in android version 2.3.3 . However, Tamil fonts have only been properly developed in android versions 4.0 and beyond. I want to display them in all versions of android mobile. I tried to solve the problem with some Tamil fonts, such as bamini and mylai , but they only worked in higher android versions. First of all you have to understand that there is no Tamil Language support in Android OS (except few Samsung & SE mobiles) till ICS(4.0). Even then it had bugs and full support is provided with Jelly Bean (4.2). You will only see boxes if you use Unicode

Read x y z coordinates of android phone using accelerometer

你说的曾经没有我的故事 提交于 2019-11-27 10:58:20
问题 I am going to develop Android application which needs to read x,y,z coordinates of phone on 3D space . I would like to write a simple code and test on the device.. I am using ginger bread on both the device and emulator. 回答1: To get position from acceleration you need to integrate it twice. Integrating acceleration gives you velocity and integrating the velocity gives you the position. Keep in mind that integrating noise creates drift and integrating drift creates A LOT of drift, the android