hey trekingapp,

tell me how can i set x,y co-ordinate of any view [in my case imagebutton]
from code i.e

dynamically/programatically

-------------

the below code wont work because its part of a application

activity::
<------------------
public class About extends Activity
{
TextView tvDesc = null;
ImageButton ibMap = null;
private countrydata cntrydata = new countrydata(this);
 @Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(R.layout.about2);

        tvDesc = (TextView) findViewById(R.id.tvDesc);
ibMap = (ImageButton)findViewById(R.id.ibMap);
tvDesc.setText("CountryDescription");
        int resId = getResources().getIdentifier("in_map", "drawable",
"pkg.DestMsgs");
        ibMap.setBackgroundResource(resId);


        ibMap.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
                                       //here i have to write code
for enlarging the imagebutton
}
});
}
}
------------------>


this is my xml :

<----------------
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/white"
    >

<AbsoluteLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffffff">
<ScrollView
android:layout_x="20dip"
android:layout_y="20dip"
android:layout_height="141dip"
android:layout_width="280dip">
<TextView
android:id="@+id/tvDesc"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:textColor="@color/black">
</TextView>
</ScrollView>
<ImageButton
android:id="@+id/ibMap"
android:layout_x="20dip"
android:layout_y="180dip"
android:layout_width="280dip"
android:layout_height="140dip">
</ImageButton>
<TextView
android:id="@+id/tvTouch"
android:layout_x="20dip"
android:layout_y="320dip"
android:text="@string/touch"
android:gravity="center"
android:textColor="@color/black">
</TextView>

</AbsoluteLayout>

</RelativeLayout>

------------------->

On Fri, May 7, 2010 at 12:41 AM, TreKing <treking...@gmail.com> wrote:

> On Thu, May 6, 2010 at 1:04 PM, pawan nimje <pawanni...@gmail.com> wrote:
>
>> plz help ...
>
>
> With what? You didn't actually ask a question, indicate which part
> SPECIFICALLY you're having trouble with, or what you have already tried that
> isn't working. There are a myriad of different things you could do depending
> on what EXACTLY you're trying to do (popup, separate activity, enlarge the
> button itself, etc ).
>
> Clarify you question and maybe you'll get a good response.
>
>
> -------------------------------------------------------------------------------------------------
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to