ListView ignoring wrap_content

I have a problem with the ListView in Android. When I set android:layout_height=”wrap_content”, ListView stays just one or two rows long and I can’t find a way to make him “wrapped”. <FrameLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent”> <ScrollView android:layout_width=”fill_parent” android:layout_height=”fill_parent”> <LinearLayout android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:orientation=”vertical” android:gravity=”center”> <TextView android:id=”@+id/question” android:layout_width=”fill_parent” android:layout_height=”wrap_content” /> <ListView android:id=”@+id/ListView01″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” /> </LinearLayout> […]

Check android.graphics.path intersection with itself

I’d like to check if (and if yes, where the collission is(x,y) – just for highlighting) a path does intersect itself. It would also be very interesting how i do check if a path does intersect with another path. Here is a screenshot to better explain what i mean: http://i.stack.imgur.com/JrEmN.png

Android Studio not rendering layout

I have started a new android studio project and on opening of the main activity, the design view shows this error and does not show the layout on the emulator: org.jetbrains.android.uipreview.RenderingException: Failed to load the LayoutLib: com/android/layoutlib/bridge/Bridge : Unsupported major.minor version 52.0 at org.jetbrains.android.uipreview.LayoutLibraryLoader.load(LayoutLibraryLoader.java:90) at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:180) at com.android.tools.idea.rendering.RenderService.createTask(RenderService.java:166) at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:475) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310) at […]

How to use JarJar with Android to change package names of external jars?

I can’t seem to find any clear instructions on how to use JarJar with an Android project. I’ve got a scenario where my application project relies on two separate libraries, which both happen to use the same external .jar files. If I try to compile the application I get “Conversion to Dalvik format failed with […]

Check Widget is Placed on Android Screen

Can someone tell me how to check that my widget have been placed on the homescreen? I have some code in my app that should run only if the widget is placed on the homescreen.

Single Configuration Activity for multiple Homescreen Widgets

I have one Configuration Activity for different Hoomescreen Widgets for my Android App. I get the WidgetId in the Configuration Activity like this: widgetid = extras.getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); But later in the code I want to know which WidgetProvider class has called the Configuration Activity. How can i do this? P.S. I’ve found the answer: […]

Why is my JsonObjectRequest not working?

I have been fiddling with this for a few days now. Couldn’t get it right. Android studio won’t let me compile it with this error. So, I have this application where I have two tabs and two fragments. One fragment is called new, and that fragment fetches json. But I couldn’t get to do it […]

Where can I get a JAR to import libcore.io?

I want to handle an GaiException in my App. The debugger tells me, it lives in the libcore.io package, but importing it yields an error. I guess I need to add an additional JAR to my projct to correctly resolve this type. I’ve been digging a bit in my android sdk folder, but don’t seem […]

How to prevent items from getting duplicated when scrolling recycler view

I have created a row inside recycler view and inside that I have inflated two rows or more but when I scroll the items are getting used again. I am not getting where to recycle view or remove them dynamically I need a feed and their comments.For comments I need to inflate layouts to display […]

Integrating videolan in Android for live streaming

I have integrated videolan in my android app. I followed the steps in the videolan wiki page to compile the vlc source. I am streaming live content and I can hear the audio but no video. I’ve been trying to find a solution online/videolan forums but no luck. any help will be very much appreciated. […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.