commonsware-cwac

TouchListView is not working when parent activity finishes

左心房为你撑大大i 提交于 2019-12-12 02:22:49
问题 I'm using a TouchListView by CommonWare and so far it's working fine, But it fails in the following case: activity A has a TouchListView and button to add an item , now when i click over a button, activity B opens up and once the user choose the item i am calling finish to end activity B and it comes back to activity A . Now here drag n drop in TouchListView doesn't work I mean items are getting dragged but not able to be placed where a user wants, I tried a lot but could not find a way to

Scheduling several alarms with WakefulIntentService

我的梦境 提交于 2019-12-12 02:06:49
问题 I am trying to schedule several alarms to publish posts to twitter. I am not sure of the usage, because i am getting a NullPointerException. i have a list with posts and i would like to post them to twitter, so this is what i did. In the scheduleAlarms method of WakefulIntentService class i have a for loop iterating over the posts List and adding a post object to the putExtra method: public static void scheduleAlarms(AlarmListener listener, Context ctxt, boolean force) { SharedPreferences

Problems with TouchListView and Drag and Drop (commonsware)

强颜欢笑 提交于 2019-12-11 08:42:52
问题 CommonsWare, I got some problems with your Touchlist. Starting the Demo in a sperate project isnt any problem. But when i try to import the files in my exsisting project, in the xml file where i declare your TouchListView it says this: error: No resource identifier found for attribute 'normal_height' in package 'it.sec' - error: No resource identifier found for attribute 'expanded_height' in package 'it.sec' - error: No resource identifier found for attribute 'grabber' in package 'it.sec' -

Detect when video file has been really written?

限于喜欢 提交于 2019-12-11 01:34:34
问题 The cwac-camera library has event hooks that are called before a photo is saved: @Override public void saveImage(PictureTransaction xact, byte[] image) {} Have I just overlooked this or is there no sink which tells me when a video file has been saved? Some more background info: There are two ways to end a video. One is by calling .stopRecording(); the other is by configuring the recorder for a max duration/max filesize (in which case recording stops without the explicit call to stopRecording(

How to set two different WakefulIntentService AlarmListeners?

混江龙づ霸主 提交于 2019-12-08 13:41:51
问题 I'm using Commonsware's WakefulIntentService (https://github.com/commonsguy/cwac-wakeful) to trigger a periodic job in my Android application (updating a cache of images). So far so good, but I want to add a different WakefulIntentService, to do a different job, at a different time interval. I'm not sure if I can do this and how. At the moment, I'm scheduling an alarm like this: WakefulIntentService.scheduleAlarms(new CacheAlarmListener(), mContext, true); The implementation of

Click events from views inside MergeAdapter items only fired after scrolling

徘徊边缘 提交于 2019-12-08 12:08:55
问题 I'm currently using cwac-merge in my app and I'm facing an issue. So I have this listview with different parts. The first ones or static views added to the MergeAdapter. They are directly added without activating/deactivating them. Then I'm adding other adapters to my MergeAdapter and hiding them straight away with setActive() . These are filled asynchronously but added before listView.setAdapter(adapter) . So I'm doing this for each adapter: add the adapter to the MergeAdapter with adapter

Accessing a Loader created in one fragment from another fragment

大城市里の小女人 提交于 2019-12-06 11:09:02
问题 I have an app with a fairly standard fragment layout. An expandable listview fragment on the left and a panel on the right that is used for different things depending on what the user chooses to do with the list on the left (displaying data, adding new data, etc). I'm using the LoaderManager (first time using loaders) with CommonWare's loaderex library as I have no need or desire to create a Content Provider for my database just so I can use a standard CursorLoader. This setup works great for

Preview mode must have started before you can take a picture

假装没事ソ 提交于 2019-12-06 08:42:41
问题 We are getting such stacktraces in our application using cwac-camera: java.lang.IllegalStateException: Preview mode must have started before you can take a picture at com.commonsware.cwac.camera.CameraView.takePicture(CameraView.java:329) at com.commonsware.cwac.camera.CameraView.takePicture(CameraView.java:277) at com.github.randoapp.camera.RandoCameraHost.onAutoFocus(RandoCameraHost.java:119) at com.commonsware.cwac.camera.CameraView.onAutoFocus(CameraView.java:411) at android.hardware

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

荒凉一梦 提交于 2019-12-06 08:35:27
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 and R.layout.text2. I saw few examples with PROJECTION_COLUMNS and VIEW_MAPPINGS but don't know how to

How to share an image file to WhatsApp and Viber on Android 7.1.1?

折月煮酒 提交于 2019-12-06 06:42:29
问题 Background Similar to issues I've recently had with sharing/opening APK files (here, here and here) , I now have an issue of sending an image file (in assets, res/raw or even from a URL) to specific apps: WhatsApp and Viber. I need to be able to share an image file to all apps, especially popular ones such as WhatsApp and Viber. The problem Both WhatsApp and Viber have issues when I try to share the image files on Andorid 7.1.1 . On other apps, and on previous versions of Android, it worked