How to get the Layout in Which the extension is placed? Declare Activity Someway


(Abhijith) #1

Hi,
I am Trying to make an Extension and It need to know the layout in which it is placed how do i know that?

This is the code of what i am trying to do :
// Get the Main relative layout of the entire activity
RelativeLayout mainLayout = (RelativeLayout)findViewById(R.id.mainLayout);

// Define StartApp Mrec
Mrec startAppMrec = new Mrec(this);
RelativeLayout.LayoutParams mrecParameters =
new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
mrecParameters.addRule(RelativeLayout.CENTER_HORIZONTAL);
mrecParameters.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);

// Add to main Layout
mainLayout.addView(startAppMrec, mrecParameters);

How do i declare a activity in the Android Manifest too? any Ideas Thanks
Thanks


Extension Causing Bug report Bug event
(Pavitra Golchha) #2

Do you want to make an extension with views?


(Abhijith) #3

Yes it’s like a banner ad