本文整理汇总了Java中android.widget.FrameLayout.MarginLayoutParams方法的典型用法代码示例。如果您正苦于以下问题:Java FrameLayout.MarginLayoutParams方法的具体用法?Java FrameLayout.MarginLayoutParams怎么用?Java FrameLayout.MarginLayoutParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.FrameLayout
的用法示例。
在下文中一共展示了FrameLayout.MarginLayoutParams方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initUIandEvent
import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void initUIandEvent() {
event().addEventHandler(this);
Intent i = getIntent();
String channelName = i.getStringExtra(ConstantApp.ACTION_KEY_CHANNEL_NAME);
worker().joinChannel(channelName, config().mUid);
TextView textChannelName = (TextView) findViewById(R.id.channel_name);
textChannelName.setText(channelName);
optional();
LinearLayout bottomContainer = (LinearLayout) findViewById(R.id.bottom_container);
FrameLayout.MarginLayoutParams fmp = (FrameLayout.MarginLayoutParams) bottomContainer.getLayoutParams();
fmp.bottomMargin = virtualKeyHeight() + 16;
}
示例2: initUIandEvent
import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void initUIandEvent() {
event().addEventHandler(this);
Intent i = getIntent();
String channelName = i.getStringExtra(ConstantApp.ACTION_KEY_CHANNEL_NAME);
final String encryptionKey = getIntent().getStringExtra(ConstantApp.ACTION_KEY_ENCRYPTION_KEY);
final String encryptionMode = getIntent().getStringExtra(ConstantApp.ACTION_KEY_ENCRYPTION_MODE);
doConfigEngine(encryptionKey, encryptionMode);
mGridVideoViewContainer = (GridVideoViewContainer) findViewById(R.id.grid_video_view_container);
mGridVideoViewContainer.setItemEventHandler(new VideoViewEventListener() {
@Override
public void onItemDoubleClick(View v, Object item) {
log.debug("onItemDoubleClick " + v + " " + item + " " + mLayoutType);
if (mUidsList.size() < 2) {
return;
}
UserStatusData user = (UserStatusData) item;
int uid = (user.mUid == 0) ? config().mUid : user.mUid;
if (mLayoutType == LAYOUT_TYPE_DEFAULT && mUidsList.size() != 1) {
switchToSmallVideoView(uid);
} else {
switchToDefaultVideoView();
}
}
});
SurfaceView surfaceV = RtcEngine.CreateRendererView(getApplicationContext());
rtcEngine().setupLocalVideo(new VideoCanvas(surfaceV, VideoCanvas.RENDER_MODE_HIDDEN, 0));
surfaceV.setZOrderOnTop(false);
surfaceV.setZOrderMediaOverlay(false);
mUidsList.put(0, surfaceV); // get first surface view
mGridVideoViewContainer.initViewContainer(this, 0, mUidsList, mIsLandscape); // first is now full view
worker().preview(true, surfaceV, 0);
worker().joinChannel(channelName, config().mUid);
TextView textChannelName = (TextView) findViewById(R.id.channel_name);
textChannelName.setText(channelName);
optional();
LinearLayout bottomContainer = (LinearLayout) findViewById(R.id.bottom_container);
FrameLayout.MarginLayoutParams fmp = (FrameLayout.MarginLayoutParams) bottomContainer.getLayoutParams();
fmp.bottomMargin = virtualKeyHeight() + 16;
initMessageList();
}
示例3: initUIandEvent
import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void initUIandEvent() {
event().addEventHandler(this);
Intent i = getIntent();
String channelName = i.getStringExtra(ConstantApp.ACTION_KEY_CHANNEL_NAME);
final String encryptionKey = getIntent().getStringExtra(ConstantApp.ACTION_KEY_ENCRYPTION_KEY);
final String encryptionMode = getIntent().getStringExtra(ConstantApp.ACTION_KEY_ENCRYPTION_MODE);
doConfigEngine(encryptionKey, encryptionMode);
mGridVideoViewContainer = (GridVideoViewContainer) findViewById(R.id.grid_video_view_container);
mGridVideoViewContainer.setItemEventHandler(new VideoViewEventListener() {
@Override
public void onItemDoubleClick(View v, Object item) {
log.debug("onItemDoubleClick " + v + " " + item + " " + mLayoutType);
if (mUidsList.size() < 2) {
return;
}
UserStatusData user = (UserStatusData) item;
int uid = (user.mUid == 0) ? config().mUid : user.mUid;
if (mLayoutType == LAYOUT_TYPE_DEFAULT && mUidsList.size() != 1) {
switchToSmallVideoView(uid);
} else {
switchToDefaultVideoView();
}
}
});
SurfaceView surfaceV = RtcEngine.CreateRendererView(getApplicationContext());
rtcEngine().setupLocalVideo(new VideoCanvas(surfaceV, VideoCanvas.RENDER_MODE_HIDDEN, 0));
surfaceV.setZOrderOnTop(false);
surfaceV.setZOrderMediaOverlay(false);
mUidsList.put(0, surfaceV); // get first surface view
mGridVideoViewContainer.initViewContainer(getApplicationContext(), 0, mUidsList); // first is now full view
worker().preview(true, surfaceV, 0);
config().mUid = AGApplication.uid;
String channelKey = AGApplication.channelKey;
worker().joinChannel(channelName, config().mUid,channelKey);
TextView textChannelName = (TextView) findViewById(R.id.channel_name);
textChannelName.setText(channelName);
optional();
LinearLayout bottomContainer = (LinearLayout) findViewById(R.id.bottom_container);
FrameLayout.MarginLayoutParams fmp = (FrameLayout.MarginLayoutParams) bottomContainer.getLayoutParams();
fmp.bottomMargin = virtualKeyHeight() + 16;
initMessageList();
}