center View - Android User Interface

Android examples for User Interface:View Center

Description

center View

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    public static void centerView(View view) {
        view.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
        view.requestLayout();/*  www  .java2s  .co m*/
    }
}

Related Tutorials