0

I'm trying make a flashlight application for my galaxy nexus, but according to this question and it's answer, the Samsung Galaxy Nexus has a hard time using the code that makes other phones work. I don't know if I'm properly adding a surface view. This is my xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <Button
        android:id="@+id/buttonFlashlight"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:text="Torch-ON"  />
    <SurfaceView 
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:visibility="gone"/>
</RelativeLayout>
Community
  • 1
  • 1
EGHDK
  • 17,818
  • 45
  • 129
  • 204
  • Why do you set visibility to false? surface won't be attached this way – Inon Stelman Oct 21 '12 at 16:15
  • I'm not sure how to set it at all. No idea if my code above is even remotely close. In my question, I have a link to another question, and that one seems to tell me that I need a surfaceview. I just don't know how to do it. And no one ever responded to that linked question. – EGHDK Oct 22 '12 at 14:24

0 Answers0