1

i created following layout,

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:id="@+id/levelcam" android:orientation="vertical">

<com.tes.VisGo.CamcorderView
    android:focusable="true" android:clickable="true" android:id="@+id/camcorder_preview"
    android:layout_height="fill_parent" android:layout_width="wrap_content"
    android:layout_marginLeft="0dp"></com.tes.VisGo.CamcorderView>
<ImageView android:id="@+id/red" android:layout_width="25dp"
    android:layout_height="25dp" android:layout_x="30dp" android:layout_y="230dp"
    android:layout_alignParentRight="true" android:layout_marginTop="-30dp"
    android:layout_marginLeft="20dp">

</ImageView>

<TextView android:id="@+id/timer" android:text=""
    android:layout_marginTop="-23dp" android:layout_height="20dp"
    android:layout_width="60dp" android:layout_marginLeft="35dp">
</TextView>
<TextView android:id="@+id/camera_categories"
    android:textColor="#FF0033" android:layout_height="wrap_content"
    android:layout_width="wrap_content" android:textSize="17dp"
    android:textStyle="bold" android:layout_gravity="center_horizontal"
    android:text="xcv" android:layout_marginLeft="-20dp"
    android:layout_marginTop="-25dp"></TextView>
<ImageView android:id="@+id/rcount"
    android:layout_marginLeft="220dp" android:layout_height="120dp"
    android:layout_width="120dp" android:layout_marginTop="-200dp">
</ImageView>
<Button android:id="@+id/widget34" android:background="@drawable/camrecord"
    android:layout_height="60dp" android:layout_width="60dp"
    android:layout_gravity="right" android:layout_marginRight="5dp">
</Button>
<Button android:id="@+id/widget33" android:background="@drawable/stoprecord"
    android:layout_gravity="right" android:layout_height="60dp"
    android:layout_width="60dp" android:layout_marginRight="5dp"
    android:layout_marginTop="-60dp">
</Button>
<net.androgames.level.view.LevelView
    android:id="@+id/level" android:layout_height="50dp"
    android:layout_gravity="center" android:layout_marginLeft="10dp"
    android:layout_width="160dp" android:keepScreenOn="true"></net.androgames.level.view.LevelView>

in this layout Camcorder View is surface view and recording has been made using media recorder, and another LevelView which is the custom class available in google source, it is Preference activity class.

when use LevelView as overlay with camcorder view it is not appearing , but when i use the LevelView at the bottom of camcorder its appear. But i need LevelView as overlay in camcorder View,What has to be made?

If anyone knows the solution help me out.

Thanks

2 Answers 2

0

Try and use a FrameLoyout or a RelativeLayout. Make sure you draw CancorderView 'before' you draw LevelView otherwise LevelView would get behind the CamcorderView (This is because of the way android handles z-index)

0

If your activity extends PreferenceActivity and you want to load your layout from xml file, your root element has to be PreferenceScreen. In PreferenceScreen you can use elements like CheckBoxPreference, EditTextPreference, ListPreference, etc. Here is an example and documentation.

In your case it would be better to extend Activity and use your layout. Then you can use SharedPreferences to store settings you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.