| | |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | import android.content.DialogInterface; |
| | | import android.util.Log; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.FrameLayout; |
| | | |
| | | import com.lcjian.library.util.ManifestDataUtil; |
| | | import com.lcjian.library.util.SystemCommon; |
| | | import com.qq.e.ads.nativ.NativeExpressAD; |
| | | import com.weikou.beibeivideo.R; |
| | |
| | | View layout = inflater.inflate(R.layout.item_exit, null); |
| | | fl_advertisement = layout.findViewById(R.id.fl_advertisement); |
| | | dialog.addContentView(layout, new FrameLayout.LayoutParams( |
| | | FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT)); |
| | | FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT)); |
| | | // set the confirm button |
| | | layout.findViewById(R.id.tv_login) |
| | | .setOnClickListener(new View.OnClickListener() { |
| | |
| | | |
| | | // 1.加载广告,先设置加载上下文环境和条件 |
| | | private void loadAd(boolean show) { |
| | | //vivo无广告 |
| | | if ("vivo".equalsIgnoreCase(ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL"))) { |
| | | return; |
| | | } |
| | | |
| | | expressAdManager.loadAppExitAd(new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void onRenderFail(List<ExpressAdContainer> adList) { |
| | | |
| | | } |
| | | }, null); |
| | | |