本文整理匯總了Java中android.widget.LinearLayout.setAnimation方法的典型用法代碼示例。如果您正苦於以下問題:Java LinearLayout.setAnimation方法的具體用法?Java LinearLayout.setAnimation怎麽用?Java LinearLayout.setAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.widget.LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.setAnimation方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import android.widget.LinearLayout; //導入方法依賴的package包/類
public void onCreate() {
activity.getWindow().setBackgroundDrawable(new ColorDrawable(0x4c000000));
initAnims();
LinearLayout llPage = new LinearLayout(activity);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
TextView vTop = new TextView(activity);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lp.weight = 1;
vTop.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
finish();
}
});
llPage.addView(vTop, lp);
llPanel = new LinearLayout(activity);
llPanel.setOrientation(LinearLayout.VERTICAL);
lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
llPanel.setAnimation(animShow);
llPage.addView(llPanel, lp);
MobViewPager mvp = new MobViewPager(activity);
ArrayList<Object> cells = collectCells();
PlatformPageAdapter adapter = newAdapter(cells);
lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, adapter.getPanelHeight());
llPanel.addView(mvp, lp);
IndicatorView vInd = new IndicatorView(activity);
lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, adapter.getBottomHeight());
llPanel.addView(vInd, lp);
vInd.setScreenCount(adapter.getCount());
vInd.onScreenChange(0, 0);
adapter.setIndicator(vInd);
mvp.setAdapter(adapter);
}
示例2: onCreate
import android.widget.LinearLayout; //導入方法依賴的package包/類
public void onCreate() {
activity.getWindow().setBackgroundDrawable(new ColorDrawable(0x4c000000));
initAnims();
LinearLayout llPage = new LinearLayout(activity);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
TextView vTop = new TextView(activity);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lp.weight = 1;
vTop.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
finish();
}
});
llPage.addView(vTop, lp);
llPanel = new LinearLayout(activity);
llPanel.setOrientation(LinearLayout.VERTICAL);
lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
llPanel.setAnimation(animShow);
llPage.addView(llPanel, lp);
MobViewPager mvp = new MobViewPager(activity);
ArrayList<Object> cells = collectCells();
PlatformPageAdapter adapter = newAdapter(cells);
lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, adapter.getPanelHeight());
llPanel.addView(mvp, lp);
com.sharesdk.onekeyshare.themes.classic.IndicatorView vInd = new com.sharesdk.onekeyshare.themes.classic.IndicatorView(activity);
lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, adapter.getBottomHeight());
llPanel.addView(vInd, lp);
vInd.setScreenCount(adapter.getCount());
vInd.onScreenChange(0, 0);
adapter.setIndicator(vInd);
mvp.setAdapter(adapter);
}