Hi all,
I would like to do Windget, with dynamic strings (notActivityApplication!)
from template, template should be combined(mixed), like: img text text,
need to generating more strings from one template on widget.
My template should be as (for example) 10 times/rows or 39 times/rows or
more... and it's depends from size of widget.
Size of widget can be any and should be selected by user, by finger-taping.
I want to generate content (inside of form, on main LenearLayout), as
content should be my template where Image+TextView+TextView.
Obviously it need generate from Java code. but I cant understood how to do
it is correct.

...my current template is:

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:minWidth="300dp"
        android:minHeight="229dp"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:paddingTop="2dip"
        android:paddingLeft="2dip"
        android:paddingRight="2dip"
        android:paddingBottom="2dip"
        android:layout_weight="2"
        android:gravity="fill|top"
        android:singleLine="false"
        >

        <LinearLayout
            android:id="@+id/relativeLayout01"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="top|left"
            android:orientation="horizontal"
            android:scaleType="fitXY"
            >

            <LinearLayout
                android:id="@+id/relativeLayout001"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center|left"
                android:scaleType="fitXY"
                android:padding="2dp"
                >
                <ImageButton
                    android:id="@+id/ImageButton001"
                    android:src="@drawable/ic_red_dot"
                    android:layout_width="7dp"
                    android:layout_height="6dp"
                    android:layout_marginLeft="0dp"
                    android:layout_marginRight="0dp"
                    android:layout_gravity="center|left"
                    android:background="@android:color/transparent"
                    android:padding="0dp"
                    android:scaleType="fitXY"
                    android:gravity="center|left"
                    />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/relativeLayout001"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center|left|fill_horizontal"
                android:scaleType="fitXY"
                android:orientation="vertical"
                >

                <TextView
                    android:id="@+id/textView00"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="left"
                    android:focusable="false"
                    android:paddingLeft="0dip"
                    android:text="First string, hello! 4x3 - sdfgds fgds
1234567890"
                    android:textColor="#ffffffff"
                    android:textSize="10dp"
                    android:layout_marginLeft="0dp"
                    android:layout_marginRight="0dp"
                    android:singleLine="false"
                    android:lines="3"
                    android:minLines="1"
                    android:maxLines="2"
                    android:gravity="top|left"
                    android:scrollbars="vertical"
                    android:layout_weight="0"
                    android:orientation="vertical"
                    android:scaleType="fitXY"
                    />
           </LinearLayout>

            <LinearLayout
                android:id="@+id/relativeLayout0002"
                android:layout_width="5dp"
                android:layout_height="14dp"
                android:layout_weight="0"
                android:gravity="right|top"
                android:orientation="horizontal"
                >
            </LinearLayout>

            <LinearLayout
                android:id="@+id/relativeLayout002"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginRight="2dp"
                android:layout_weight="0"
                android:gravity="right"
                android:orientation="horizontal"
                >

                <TextView
                    android:id="@+id/textView01"
                    android:layout_width="fill_parent"
                    android:layout_height="14dp"
                    android:focusable="true"
                    android:text="(23:55)"
                    android:textColor="#ffffffff"
                    android:textSize="10dp"
                    android:gravity="right"
                    android:layout_gravity="right"
                    />
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>


1 марта 2012 г. 12:18 пользователь Chalavadi Sagar <[email protected]
> написал:

> I am suggesting you to use custom adapter that will solve your problem.....
>
>
> Ch.B.Sagar
>
>
> On Thu, Mar 1, 2012 at 11:11 AM, moktarul anam <[email protected]> wrote:
>
>> hi Stan,
>> its not clear... can u send me ur sample template ir images ? or can u
>> clearly explain
>>
>> Moktarul
>>
>>
>>
>> On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
>>>
>>> HI,
>>>
>>> I'm now develop my first widget (not application) and I want to generate
>>> dynamically strings, there each string should be as:
>>> "image(left)+text(left)+text(**right)".
>>> I has been prepared this string in layout,  and I want to use my
>>> template-string as "template" to generate all strings a few times, as list.
>>> But I can't understood how it do.
>>>
>>> Could you please explain how do correct my idea?
>>> (Or may be key words to search in google...)
>>>
>>> Thanks.
>>>
>>>
>>>
>> On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
>>>
>>> HI,
>>>
>>> I'm now develop my first widget (not application) and I want to generate
>>> dynamically strings, there each string should be as:
>>> "image(left)+text(left)+text(**right)".
>>> I has been prepared this string in layout,  and I want to use my
>>> template-string as "template" to generate all strings a few times, as list.
>>> But I can't understood how it do.
>>>
>>> Could you please explain how do correct my idea?
>>> (Or may be key words to search in google...)
>>>
>>> Thanks.
>>>
>>>
>>>
>> On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
>>>
>>> HI,
>>>
>>> I'm now develop my first widget (not application) and I want to generate
>>> dynamically strings, there each string should be as:
>>> "image(left)+text(left)+text(**right)".
>>> I has been prepared this string in layout,  and I want to use my
>>> template-string as "template" to generate all strings a few times, as list.
>>> But I can't understood how it do.
>>>
>>> Could you please explain how do correct my idea?
>>> (Or may be key words to search in google...)
>>>
>>> Thanks.
>>>
>>>
>>>
>> On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
>>>
>>> HI,
>>>
>>> I'm now develop my first widget (not application) and I want to generate
>>> dynamically strings, there each string should be as:
>>> "image(left)+text(left)+text(**right)".
>>> I has been prepared this string in layout,  and I want to use my
>>> template-string as "template" to generate all strings a few times, as list.
>>> But I can't understood how it do.
>>>
>>> Could you please explain how do correct my idea?
>>> (Or may be key words to search in google...)
>>>
>>> Thanks.
>>>
>>>
>>>  --
>> 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
>>
>
>  --
> 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
>



-- 
Stanislav G. Prihodko
ICQ # 83332014 // Jabber # `~*-v-*~`@jabber.ru // mailto:
[email protected]
http://www.projects.org.ua

-- 
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