Example usage for android.graphics PixelFormat RGBA_8888

List of usage examples for android.graphics PixelFormat RGBA_8888

Introduction

In this page you can find the example usage for android.graphics PixelFormat RGBA_8888.

Prototype

int RGBA_8888

To view the source code for android.graphics PixelFormat RGBA_8888.

Click Source Link

Usage

From source file:Main.java

@SuppressWarnings("deprecation")
public static int getPixelFormat(Bitmap.Config bitmapConfig) {
    switch (bitmapConfig) {
    case ARGB_4444:
        return PixelFormat.RGBA_4444;
    case RGB_565:
        return PixelFormat.RGB_565;
    case ALPHA_8:
        return PixelFormat.A_8;
    default:/*from   ww  w  .  ja  va  2 s. c om*/
        return PixelFormat.RGBA_8888;
    }
}

From source file:org.pixmob.droidlink.ui.AccountsActivity.java

@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    // Enable dithering, ie better gradients.
    getWindow().setFormat(PixelFormat.RGBA_8888);
}

From source file:org.pixmob.freemobile.netstat.ui.MobileNetworkChartActivity.java

@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();

    // Enable "better" gradients:
    // http://stackoverflow.com/a/2932030/422906
    final Window window = getWindow();
    window.setFormat(PixelFormat.RGBA_8888);
    window.getDecorView().getBackground().setDither(true);
}

From source file:com.blork.anpod.activity.HomeActivity.java

@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    Window window = getWindow();//from   w  w w  .  j  a va2  s.  c  o m
    window.setFormat(PixelFormat.RGBA_8888);
    //window.requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
}

From source file:at.alladin.rmbt.android.terms.RMBTTermsActivity.java

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);/* w w  w . j a  v  a 2  s .co  m*/

    boolean showTermsAndConditions = true;

    if (getIntent().getExtras() != null) {
        final String checkTypeName = getIntent().getExtras().getString(EXTRA_KEY_CHECK_TYPE, null);
        if (checkTypeName != null) {
            checkType = CheckType.valueOf(checkTypeName);
        }

        showTermsAndConditions = getIntent().getExtras().getBoolean(EXTRA_KEY_CHECK_TERMS_AND_COND, true);
    }

    final Window window = getWindow();
    window.setFormat(PixelFormat.RGBA_8888);
    window.addFlags(WindowManager.LayoutParams.FLAG_DITHER);

    if (savedInstanceState == null) {
        if (showTermsAndConditions) {
            showTermsCheck();
        } else {
            continueWorkflow();
        }
    }
}

From source file:org.apps8os.logger.android.MainActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    getWindow().setFormat(PixelFormat.RGBA_8888);
    // update the locale
    final String lan = AppManager.getCurrentLocaleLanguage();
    if (!TextUtils.isEmpty(lan)) {
        LoggerApp.getInstance().updateLocale(new Locale(lan));
    }//from   www .j  ava2 s  . c o m
    AppManager.refreshLocale();
    super.onCreate(savedInstanceState);
    setContentView(R.layout.act_main);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    getSupportFragmentManager().addOnBackStackChangedListener(this);
    setupActionBar();
    // root fragment
    onFragmentChanged(R.layout.frag_logger_panel, null);
}

From source file:org.sizzlelab.contextlogger.android.travel.TravelActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    getWindow().setFormat(PixelFormat.RGBA_8888);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_act);//from   w  ww . j ava2 s  . c  o m
    // add back stack changed listener
    getSupportFragmentManager().addOnBackStackChangedListener(this);
    initUI();
    MainPipeline.getSystemPrefs(getApplicationContext()).registerOnSharedPreferenceChangeListener(this);
}

From source file:com.iwedia.activities.DTVActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    sInstance = this;
    /** Set Full Screen Application. */
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
    getWindow().setFormat(PixelFormat.RGBA_8888);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);
    getWindow().getDecorView().getBackground().setDither(true);
    /** Creates DTV manager object and connects it to service. */
    try {//from  w w  w .  j a v  a2 s.  co m
        mDVBManager = DVBManager.getInstance();
    } catch (InternalException e) {
        Log.e(TAG, "There was an error in initializing DVB Manager", e);
        finish();
    }
    mDVBManager.setDVBStatus(mDvbStatusCallBack);
    initializeIpChannels();
}

From source file:org.sizzlelab.contextlogger.android.MainActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_act);// w w w. j  ava 2  s  . c o  m
    getWindow().setFormat(PixelFormat.RGBA_8888);
    initUI();
    MainPipeline.getSystemPrefs(getApplicationContext()).registerOnSharedPreferenceChangeListener(this);
}

From source file:net.networksaremadeofstring.rhybudd.DeviceList.java

@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    try {//  w w w . j a  va2 s  . co m
        Window window = getWindow();
        window.setFormat(PixelFormat.RGBA_8888);
    } catch (Exception e) {

    }
}