commonsware-cwac

ArrayAdapter<HashMap<,,>> with commonsguy EndlessAdapter class

北慕城南 提交于 2020-01-23 13:25:11
问题 How to use ArrayAdapter-HashMap- with EndlessAdapter class? class DemoAdapter extends EndlessAdapter { private RotateAnimation rotate=null; @SuppressWarnings("unchecked") ArrayAdapter<HashMap<String,String>> a=(ArrayAdapter<HashMap<String,String>>)getWrappedAdapter(); DemoAdapter(ArrayList<HashMap<String, String>> items) { super(new ArrayAdapter<HashMap<String, String>>(Base.this, R.layout.row, android.R.id.text1, <------ ???? items)); <------ ???? I have two columns in my row R.layout.text1

ArrayAdapter<HashMap<,,>> with commonsguy EndlessAdapter class

时间秒杀一切 提交于 2020-01-23 13:24:09
问题 How to use ArrayAdapter-HashMap- with EndlessAdapter class? class DemoAdapter extends EndlessAdapter { private RotateAnimation rotate=null; @SuppressWarnings("unchecked") ArrayAdapter<HashMap<String,String>> a=(ArrayAdapter<HashMap<String,String>>)getWrappedAdapter(); DemoAdapter(ArrayList<HashMap<String, String>> items) { super(new ArrayAdapter<HashMap<String, String>>(Base.this, R.layout.row, android.R.id.text1, <------ ???? items)); <------ ???? I have two columns in my row R.layout.text1

Cwac-camera crash when picture taken

牧云@^-^@ 提交于 2020-01-15 12:32:34
问题 When my picture is taken via takePicture() function, Cwac-camera crash (depending device, work well on Desire HD, crash on Nexus S). Referring to this post : camera.setParameters failed in android I would like to know how to do this with Cwac-camera. Backtrace: 07-03 20:58:57.207 24659-24659/com.xxxxxx E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters

Cwac-camera crash when picture taken

扶醉桌前 提交于 2020-01-15 12:31:05
问题 When my picture is taken via takePicture() function, Cwac-camera crash (depending device, work well on Desire HD, crash on Nexus S). Referring to this post : camera.setParameters failed in android I would like to know how to do this with Cwac-camera. Backtrace: 07-03 20:58:57.207 24659-24659/com.xxxxxx E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters

SQLCipher and CWAC-SafeRoom doubling the size of my APK

烈酒焚心 提交于 2020-01-06 07:31:53
问题 The size of these libraries really increase the APK size. It’s almost 50% my App size, taking it to 16.3 MBs and when I analyze the APK, sqlcipher-lib alone is 48.9% of my apk size i.e 7.3MBs!!! Is there any workaround? Edit: Since this is a DB related issue and I believe it's good if the specified tags remain referenced for specificity during search by other developers. I think the answer below addresses it better in order to keep the conversation along specific topics 回答1: This section of

Wakelock implementation in a service

[亡魂溺海] 提交于 2020-01-06 01:54:38
问题 I have a service that executes in 2 phones. They communicate with each other using sockets and execute some script (which may take 1-2 minutes approx.) and exchange files (using HTTP Post) between them. I want this execution to continue, even when the screen is off, i.e acquire a Wakelock. I saw this link, but I'm not sure where to incorporate this in my code(as the device may sleep in the mid of execution). Any guidance is highly appreciated. Thank you. 回答1: I m using same app for 2 phones.

Using MergeAdapter; looking for a way to determine a list item's data type in the ListActivity onListItemClicked method

烂漫一生 提交于 2020-01-03 20:22:37
问题 I'm using the MergeAdapter to create a sectioned list where each section of the list contains a different type of underlying data. All is working pretty much as expected. However, the ListActivity's onListItemClicked method seems more complicated than it should be when it comes to determining the type of data underlying the selected list item. This is the case because I can't find a good way to determine the type of object that underlies the selected item unless I keep a separate map of list

CWAC Camera - Multiple camera views in one layout (and switching between them)

眉间皱痕 提交于 2019-12-25 07:29:47
问题 I am trying to build a camera feature similar to the new Front Back app - where you take two pictures in the same activity and display them each on half of the screen. So, the top half of the screen will be displaying the camera preview while the bottom half is black, you then take one picture, that picture is displayed in place (in the top half), and then the bottom half of the screen would then become the preview, and you can then take another picture which will then be displayed in the

EndlessAdapter not updating with updates in Android CWAC-EndlessAdapter

陌路散爱 提交于 2019-12-25 06:58:35
问题 I'm having a tough time understanding the documentation for endless adapter I tried following these quick steps by Commonsware to no avail: How can I use a custom adapter with the cwac-endless adapter? So, first, you get your custom adapter working correctly on its own. Then, you create your EndlessAdapter subclass (with your implementation of cacheInBackground(), etc.), wrap your custom adapter in an instance of your EndlessAdapter subclass, and put your instance of your EndlessAdapter

Creating a new ArrayPagerAdapter with variety of Fragments

偶尔善良 提交于 2019-12-25 05:47:09
问题 I am trying to create an ArrayAdapter similar to the sample shown in the readme at this github page https://github.com/commonsguy/cwac-pager. I have a variety of Fragments that I want to pass into an ArrayPagerAdapter instead of just one like in the example. I'm confused on how desc.getTitle is supposed to be passed in into the newly created instance of the Fragment in the example. Also how would I be able to do this same thing using android.app.Fragment to create a new instances of Fragments