android.view.Window.setFormat()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中android.view.Window.setFormat()方法的一些代码示例,展示了Window.setFormat()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setFormat()方法的具体详情如下:
包路径:android.view.Window
类名称:Window
方法名:setFormat

Window.setFormat介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: ankidroid/Anki-Android

@Override
public void onAttachedToWindow() {
  if (!mFragmented) {
    Window window = getWindow();
    window.setFormat(PixelFormat.RGBA_8888);
  }
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
 public void onReady(Bundle state) {
  getWindow().setFormat(PixelFormat.TRANSLUCENT);
  setContentView(R.layout.main);
 
  File clip=new File(Environment.getExternalStorageDirectory(),
            "test.mp4");
  
  if (clip.exists()) {
   video=(VideoView)findViewById(R.id.video);
   video.setVideoPath(clip.getAbsolutePath());
   
   ctlr=new MediaController(this);
   ctlr.setMediaPlayer(video);
   video.setMediaController(ctlr);
   video.requestFocus();
   video.start();
  }
 }
}

代码示例来源:origin: ukanth/afwall

private void init(int color) {
  // To fight color banding.
  getWindow().setFormat(PixelFormat.RGBA_8888);
  setUp(color);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

/** -- Eliminates color banding -- **/

@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
Window window = getWindow();
window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow()
{
  // TODO Auto-generated method stub
  super.onAttachedToWindow();
  Window window = getWindow();
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow() {
 super.onAttachedToWindow();
 Window window = getWindow();
 // Eliminates color banding
 window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  // Eliminates color banding
  window.setFormat(PixelFormat.RGBA_8888);
}

代码示例来源:origin: lshAndroid/WebviewTBS

public void initTBSActivity(Activity ac){   //二次封装
    if (ac!=null){
      ac.getWindow().setFormat(PixelFormat.TRANSLUCENT);
      ac.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE | WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
    }

  }
}

代码示例来源:origin: PrivacyApps/document-viewer

private void init(int color) {
  // To fight color branding.
  getWindow().setFormat(PixelFormat.RGBA_8888);
  setUp(color);
}

代码示例来源:origin: wasdennnoch/AndroidN-ify

private void init(int color) {
  // To fight color banding.
  getWindow().setFormat(PixelFormat.RGBA_8888);
  setUp(color);
}

代码示例来源:origin: arminha/worldclockwidget

private void init(int color) {
  // To fight color banding.
  getWindow().setFormat(PixelFormat.RGBA_8888);
  setUp(color);
}

代码示例来源:origin: grzegorznittner/chanu

private void init(int color) {
  // To fight color branding.
  getWindow().setFormat(PixelFormat.RGBA_8888);
  setUp(color);
}

代码示例来源:origin: lycha/augmented-reality-example

private void setupLayout() {
  descriptionTextView = (TextView) findViewById(R.id.cameraTextView);
  getWindow().setFormat(PixelFormat.UNKNOWN);
  SurfaceView surfaceView = (SurfaceView) findViewById(R.id.cameraview);
  mSurfaceHolder = surfaceView.getHolder();
  mSurfaceHolder.addCallback(this);
  mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}

代码示例来源:origin: Justson/AgentWebX5

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_common);
  getWindow().setFormat(PixelFormat.TRANSLUCENT);
  mFrameLayout = (FrameLayout) this.findViewById(R.id.container_framelayout);
  int key = getIntent().getIntExtra(TYPE_KEY, -1);
  mFragmentManager = this.getSupportFragmentManager();
  openFragment(key);
}

代码示例来源:origin: lfkdsk/JustWeEngine

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  Logger.d("engine onCreate start");
  this.Engine();
  this.requestWindowFeature(Window.FEATURE_NO_TITLE);
  this.getWindow().setFormat(PixelFormat.TRANSLUCENT);
  setContentView(layerEngineScreenLayout);
  layerEngineScreen.createScreen();
  Logger.d("engine onCreate end");
}

相关文章

Window类方法