View

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

View

Postby Peeyush » Sat Jul 11, 2009 11:58 am

Hi,
I want when I open my Activity it shows Built-in Control that is id/metronome_image in given xml. but when i click over it
should replace with my Custom control that is CustomMetronome in given xml. when i click again outside it should replace back to Built-In.


<FrameLayout android:id="@+id/metro" android:layout_width="wrap_content"
android:layout_height="fill_parent">
<ImageView android:id="@+id/metronome_image"
android:layout_width="260dip" android:layout_height="wrap_content"
android:gravity="center" android:paddingLeft="10dip"
android:focusable="false"/>
<!--
<ImageView android:layout_width="260dip"
android:layout_height="wrap_content" android:src="@drawable/metronome"
android:layout_gravity="center" android:paddingLeft="10dip" />
<com.Custom.android.customcontrols.CustomMetronome
android:id="@+id/metronome_image" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:paddingTop="135dip"
android:paddingLeft="15dip" />
-->
</FrameLayout>
Peeyush
Freshman
Freshman
 
Posts: 8
Joined: Tue Jun 30, 2009 10:01 am
Location: India

Top

Postby Abhishek » Sat Jul 11, 2009 2:01 pm

just first invisible the first view on ur click event and visible the desire view and vice versa.....In xml file if ur setting the second view then set it invisible.....
Abhishek
Junior Developer
Junior Developer
 
Posts: 13
Joined: Tue Jun 23, 2009 10:07 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 13 guests