[英]AndroidResideMenu: how to make not transparent background
In my learning process I created a dashboard screen with AndroidResideMenu animation from GitHub SpecialCyCi/AndroidResideMenu. 在学习过程中,我使用GitHub SpecialCyCi / AndroidResideMenu的AndroidResideMenu动画创建了仪表板屏幕。
But I have a problem with transparency. 但是我对透明度有疑问。 On my screenshots there is a gray or black blurred rectangle.
在我的屏幕截图中,有一个灰色或黑色的模糊矩形。 That rectangle is what I don't want to see.
那个矩形是我不想看到的。 There should be a white background instead of that blurred transparent black.
应该有一个白色背景,而不是那种模糊的透明黑色。 That green leather is total background.
那绿色的皮革是整个背景。
PS. PS。 the graphics is just for testing and learning.
图形仅用于测试和学习。 Not beautiful, I know.
不知道,我知道。
main dashboard showed on fullscreen moving on the side 全屏显示的主仪表板 在侧面移动
DashboardActivity.java DashboardActivity.java
//ResideMenu
// attach to current activity;
resideMenu = new ResideMenu(this);
resideMenu.setBackground(R.drawable.background);
resideMenu.attachToActivity(this);
// create menu items;
String titles[] = { "Home", "Gallery", "Calendar", "Settings" };
int icon[] = { R.drawable.run, R.drawable.run, R.drawable.run, R.drawable.run };
for (int i = 0; i < titles.length; i++){
ResideMenuItem item = new ResideMenuItem(this, icon[i], titles[i]);
final int position = i;
item.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
switch (position){
}
}
});
resideMenu.addMenuItem(item, ResideMenu.DIRECTION_LEFT); // or ResideMenu.DIRECTION_RIGHT
}
I solved this problem by adding a background color into activity_dashboard.xml file 我通过将背景色添加到activity_dashboard.xml文件中解决了这个问题
android:background="@color/white"
android:background =“ @ color / white”
problem solved thx Diego for help 问题解决了迭戈寻求帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.