我正在制作一些宗教Android应用程序,我也在我的应用程序中使用广告 - 暴徒广告.有些广告不像Leo隐私保护,因为他们在广告中有性图片.我不想在我的应用中显示此广告.如何屏蔽此特定广告.
在广告投放帐户中,有"允许和屏蔽广告"选项,但我如何找到要阻止的特定广告.请帮忙.
我试图将线性布局或相对布局内的视频视图拉伸到全屏,但应用程序不会将视频视图的宽度拉伸到Android屏幕.左右各有10到15 dp的空间.线性布局以及相对布局也不会拉伸到全屏.我希望它在width.i中填充屏幕也试过"match_parent"代替"fill_parent",但结果是一样的.这是我的代码
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res /android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bgsong"
android:orientation="vertical"
>
<VideoView
android:id="@+id/video_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
Run Code Online (Sandbox Code Playgroud)
video_player_view = (VideoView) findViewById(R.id.video_view);
dm = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(dm);
int height = dm.heightPixels;
int width = dm.widthPixels;
video_player_view.setMinimumWidth(width);
video_player_view.setMinimumHeight(height);
Uri uri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.video);
video_player_view.setVideoURI(uri);
video_player_view.start();
Run Code Online (Sandbox Code Playgroud)