本文整理了Java中android.widget.ListView.setAlpha()
方法的一些代码示例,展示了ListView.setAlpha()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setAlpha()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setAlpha
暂无
代码示例来源:origin: hejunlin2013/DragVideo
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
Log.d(TAG, ">> onSurfaceTextureSizeChanged width=" + width + ", height=" + height);
if (width == 540 && height == 303) {
mProgramListView.setAlpha(1.0f);
} else {
float f = (float) ((1.0 - ((float)width/1080))* 1.0f);
Log.d(TAG, ">> onSurfaceTextureSizeChanged f=" + f );
mProgramListView.setAlpha(f);
}
mProgramListView.setVisibility(View.VISIBLE);
}
代码示例来源:origin: klinker24/Android-Blur-Launcher
public void setUpWindow() {
//requestWindowFeature(Window.FEATURE_ACTION_BAR);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND,
WindowManager.LayoutParams.FLAG_DIM_BEHIND);
// Params for the window.
// You can easily set the alpha and the dim behind the window from here
WindowManager.LayoutParams params = getWindow().getAttributes();
params.alpha = .85f; // lower than one makes it more transparent
params.dimAmount = .6f; // set it higher if you want to dim behind the window
getWindow().setAttributes(params);
getListView().setAlpha(.85f);
// Gets the display size so that you can set the window to a percent of that
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
// You could also easily used an integer value from the shared preferences to set the percent
if (height > width) {
getWindow().setLayout((int) (width * .85), (int) (height * .66));
} else {
getWindow().setLayout((int) (width * .5), (int) (height * .8));
}
}
代码示例来源:origin: stackoverflow.com
listView.setAlpha(0.0f);
listView.setBackgroundColor(0x55fe4444);
内容来源于网络,如有侵权,请联系作者删除!