use of com.my.targetDemoApp.fragments.NativeAdFragment in project mytarget-android by myTargetSDK.
the class NativeAdActivity method onCreate.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_native_ads);
toolbar = findViewById(R.id.toolbar);
topContainer = findViewById(R.id.top_container);
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
bottomNavigationView = findViewById(R.id.bottom_navigation);
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
hideBottomView();
}
bottomNavigationView.setOnNavigationItemSelectedListener(this);
ArrayList<View> touchables = bottomNavigationView.getTouchables();
for (int i = 0; i < touchables.size(); i++) {
View view = touchables.get(i);
view.setContentDescription("Bottom_" + i);
}
fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
NativeAdFragment nativeAdFragment = NativeAdFragment.newInstance(slotId, R.id.action_native_static);
fragmentTransaction.add(R.id.fragment_container, nativeAdFragment);
fragmentTransaction.commit();
}
Aggregations