Hi everybody,(^_^)/
My problem is this: I'm creating a component, a button switch.
The switch button moves up and down switching ON / OFF.
I have a scroll in the top of this scroll button to move and change of
number of 1 ~ 5 for example.

I hope I understand is more or less like this:
http://www.flickr.com/photos/79729802 @ N04 /

I want not to distort the image when used in different types of screen
resolutions.
Now I was making is this:

button_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:id="@+id/layout"
    android:layout_width="120dp"
    android:layout_height="295dp"
    android:background="@drawable/button_bg" >

    <com.view.UIButtonSwitch
        android:id="@+id/imgVBtnOnOff"
        android:layout_width="125dp"
        android:layout_height="180dp"
        android:adjustViewBounds="true"
        android:contentDescription="@string/desc"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:scaleType="fitXY" />

 </RelativeLayout>

then I created a Button class that is only the button moves up and
down and the other way round
UIButton.java
public class UIButton extends ImageButton {

    public UIButton(Context context) {
        super(context);
        init();
    }
    //----------------------------------------------------------
    public UIButton(Context context, AttributeSet attrs, int defStyle)
{
        super(context, attrs, defStyle);
        init();
    }
    //----------------------------------------------------------
    public UIButton(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    private void init() {
        this.setBackgroundColor(Color.TRANSPARENT);
        this.setImageResource(R.drawable.onoffbtn);
    }

}

I created a class I ButtonSwitch.java even works well in this class
but I am implementing both the movements and the scroll button.
Essentially I am make a taggle button but custom and with more
movement.

I am doing well?
have other suggestions?
thank you in advance for your assistance.
m (__) m

Sorry mi english is not good. (~_~'?)

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

Reply via email to