Log in or register to post comments

About @strings/about_text in IT vuforia 2.0

March 16, 2013 - 7:18am #1

Hi everyone, i want to make about text in my app like in @strings/about_text vuforia 2.0. Exactly, i want to make the text like in that @strings/about_text.

Here is the code in the @strings/about_text :

<string name="about_text">This sample app illustrates how to use the Vuforia ImageTargets feature. The app detects certain images and augments a 3D teapot on top of them. &lt;br />&lt;br />To use this app:&lt;br />1. Print the image targets located at &lt;a href="https://developer.vuforia.com/resources/samples/files">developer.vuforia.com/resources/samples/files&lt;/a>&lt;br />&lt;br />2. Point your device at any of the images&lt;br />&lt;br />3. See the teapot augmented on  top of the image&lt;br />&lt;br />© 2010 &#8211; 2012 Qualcomm Austria Research Center GmbH. All rights reserved.&lt;br />Subject to agreements at &lt;a href="http://developer.vuforia.com/legal/EULA">developer.vuforia.com/legal/EULA &lt;/a>&lt;&lt;br />&lt;br /></string>

I have been written that code in my xml file, but the result in my app doesn't like in IT vuforia 2.0 sample. So, where's my fault ? is there any setting in my textview or else ?

thanks before. :D

Warm Regards.

About @strings/about_text in IT vuforia 2.0

March 17, 2013 - 1:31pm #6

Glad to help ;-)

About @strings/about_text in IT vuforia 2.0

March 17, 2013 - 1:29pm #5

oooooh O_o

I forget to add fromHtml function into my class.haha XD

oke, let me try. thanks for helping alessandro. :D

About @strings/about_text in IT vuforia 2.0

March 17, 2013 - 1:44am #4

Ok, have you used the fromHtml function, like in the IT sample code ?

mAboutText.setText(Html.fromHtml(getString(R.string.about_text)));

That should be all you need to make your HTML text look as expected.

 

About @strings/about_text in IT vuforia 2.0

March 16, 2013 - 2:13pm #3

thanks for quick reply allesanndro :D

yeah, but that's not my question.hehe

I mean, i want to make html code like in @strings/about_text (instruction about to use IT 2.0). For example, "&lt;br /> &lt;br /> To use this app: &lt;br />" . i have been written the html code in my @strings but when i launch my app, the instruction doesn't like in IT 2.0. I think that code doesn't works in my app.

So, what can i do to fix that ? :D :D

thanks.

About @strings/about_text in IT vuforia 2.0

March 16, 2013 - 7:59am #2

There might be some difference in the layout; the About screen in the IT sample makes use of the following layout, that I report here for convenience:

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/black"
    android:orientation="vertical" >
 
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:padding="10dip"
        android:text="@string/about_title"
        android:textColor="@color/holo_light_blue"
        android:textSize="@dimen/about_title" />
 
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginTop="10dp"
        android:background="@color/holo_light_blue" />
 
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal"
        android:layout_weight="1" >
 
        <TextView
            android:id="@+id/about_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="20dp"
            android:textColor="@color/white"
            android:textSize="@dimen/about_text" />
    </ScrollView>
 
    <Button
        android:id="@+id/button_start"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:gravity="center_horizontal|center_vertical"
        android:text="@string/button_start" />
 
</LinearLayout>
 
Log in or register to post comments