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. [I'd android] wta market gtab

Sesuai subject, market gtab kok ga bs download..
Ada yg pernah alami ga? Thx
blue is hope

-- 
===============

2. How to manage the memory when loading lots of bitmaps?

I am working on streaming a video from web. Where I decode the video/
audio stuff in native code and get the raw pixels for video

I create a bitmap in java code, with surfaceholder and canvas and
update pixels for each bitmap from native code and then stream the
bitmaps as video. My problem here is, the video crashes after a few
seconds because of low memory.

I want to know whether there is anything that i need to make sure to
not to crash app and use low memory.

Here is my code.

public CanvasThread(SurfaceHolder surfaceHolder, Panel panel) {
        _surfaceHolder = surfaceHolder;
        _panel = panel;     }
    public void setRunning(boolean run) {
        _run = run;    }

    @Override
    public void run() {
        Canvas c;
        while (_run) {
            c = null;
            try {
                c = _surfaceHolder.lockCanvas(null);
                synchronized (_surfaceHolder) {
                    _panel.onDraw(c);
                }
            } finally {
                    if (c != null) {
                    _surfaceHolder.unlockCanvasAndPost(c);
                }
           }

public class Panel extends SurfaceView implements
SurfaceHolder.Callback{
                private CanvasThread canvasthread;
                private static Bitmap mBitmap;
                private static boolean ii=false;
               public Panel(Context context, AttributeSet attrs) {
                        super(context, attrs);
                getHolder().addCallback(this);
                    canvasthread = new CanvasThread(getHolder(), this);
                    setFocusable(true);

                }

                 public Panel(Context context) {
                           super(context);
                            getHolder().addCallback(this);
                            canvasthread = new CanvasThread(getHolder(), this);
                            setFocusable(true);
                    }

                 private static native void renderbitmap(Bitmap bitmap); 
//native
function
                @Override
                public void onDraw(Canvas canvas) {
                        mBitmap=Bitmap.createBitmap(480, 320, 
Bitmap.Config.RGB_565);
                        renderbitmap(mBitmap); //Update pixels from native code
                        canvas.drawBitmap(mBitmap, 0,0,null);
        }

                @Override
                public void surfaceChanged(SurfaceHolder holder, int format, int
width,int height) {             }
                @Override
                public void surfaceCreated(SurfaceHolder holder) {
                    canvasthread.setRunning(true);
                    canvasthread.start();               }
                @Override
                public void surfaceDestroyed(SurfaceHolder holder) {
                        boolean retry = true;
                        canvasthread.setRunning(false);
                        while (retry) {
                                try {
                                        canvasthread.join();
                                        retry = false;
                                } catch (InterruptedException e) {              
                }
                }

-- 

3. Install failure

4. Pop-message

5. Android Honeycomb's new memory system -- will we see it on phones?

6. multitouch on buttons

7. USB devices and /dev/bus/usb Available in standard android???