TableLayout borders

by Robertico » Mon, 23 Feb 2009 05:20:24 GMT


Sponsored Links
 Hi,

Is there a way to set something like border="1" in a TableLayout?

<TableLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:id="@+id/mitabla">


    <TableRow>
        <TextView
            android:text=""
            android border="1" <<< ???
            android:background="#00000000"
            android:padding="15dip" />

Regards,
Robertico

--~--~---------~--~----~------------~-------~--~----~



TableLayout borders

by neuzou » Sat, 14 Mar 2009 02:11:39 GMT


 I have the same question, I want to display the border on TableLayout,
but Android does't give any method to do this, anybody can help me?
Thanks.

Regards
Dwyane




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. make failed

Discussions about working with the android source code should be held
on the android-platform mailing list, thanks.

JBQ






-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

--~--~---------~--~----~------------~-------~--~----~

2. setContentView Strangeness

The code below works great in that GameView comes up with a simple
image.  After user has selected the one and only menu option, I get
the TextView with "Hello, Earth" as appropriate.

The problem I have is if in onCreate(), I setContentView(TextView)
and not GameView.  In this case, user is shown a "Hello, World"
first.  After the user has selected the menu option, GameView is
active, but I see no images.  The screen is simply blank...any idea
anyone?

Am I using setContentView properly?

Thanks...

public class MainActivity extends Activity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        TextView tv = new TextView(this);
        tv.setText("Hello, World");
        //setContentView(tv);
        setContentView(new GameView(this));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu)
    {
        super.onCreateOptionsMenu(menu);

        menu.add(0, MENU_ONE_PLAYER, 0,
R.string.MAIN_MENU_ONE_PLAYER);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item)
    {
        switch (item.getItemId())
        {
            case MENU_ONE_PLAYER:
                TextView tv = new TextView(this);
                tv.setText("Hello, Earth");
                setContentView(tv);
                //setContentView(new GameView(this));
                return true;
        }

        return false;
    }

    private static final int MENU_ONE_PLAYER = 1;
}

--~--~---------~--~----~------------~-------~--~----~

3. Tutorial Notepad app crashing on Imconming call

4. Different package name than the one in AndroidManifest.xml to the generated resource class

5. XML or CSS for Styles and Theams

6. How to Win Features and Influence Developers (Was: Future of Android)

7. Android or G1 is eating too much battery power?