本文整理汇总了Java中com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter类的典型用法代码示例。如果您正苦于以下问题:Java SwingBottomInAnimationAdapter类的具体用法?Java SwingBottomInAnimationAdapter怎么用?Java SwingBottomInAnimationAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SwingBottomInAnimationAdapter类属于com.nhaarman.listviewanimations.swinginadapters.prepared包,在下文中一共展示了SwingBottomInAnimationAdapter类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Google Card");
setContentView(R.layout.activity_googlecards);
ListView listView = (ListView) findViewById(R.id.activity_googlecards_listview);
mGoogleCardsAdapter = new GoogleCardsAdapter(this);
SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(new SwipeDismissAdapter(mGoogleCardsAdapter, this));
swingBottomInAnimationAdapter.setInitialDelayMillis(300);
swingBottomInAnimationAdapter.setAbsListView(listView);
listView.setAdapter(swingBottomInAnimationAdapter);
mGoogleCardsAdapter.addAll(getItems());
}
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:18,代码来源:GoogleCardsActivity.java
示例2: onCreate
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@SuppressLint("InlinedApi")
@Override
protected void onCreate(final Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getWindow()
.addFlags(
android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
super.onCreate(savedInstanceState);
setTitle("Gridview动画");
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.activity_gridview_gv);
SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(
new MyAdapter(this, getItems()));
swingBottomInAnimationAdapter.setAbsListView(gridView);
swingBottomInAnimationAdapter.setInitialDelayMillis(300);
gridView.setAdapter(swingBottomInAnimationAdapter);
}
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:GridViewActivity.java
示例3: getNewListViewAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private BaseAdapter getNewListViewAdapter() throws AuthenticationError {
final int resultsPerPage = getResources().getInteger(R.integer.results_per_page);
addListViewListeners(resultsPerPage / 2);
this.listAdapter = new PhotoAdapter(this);
this.listAdapter.setResultsPerPage(resultsPerPage);
final SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(this.listAdapter);
swingBottomInAnimationAdapter.setInitialDelayMillis(getResources().getInteger(R.integer.transition_delay_duration_in_millis));
swingBottomInAnimationAdapter.setAbsListView(this.listView);
if(this.bundle!=null) {
this.listAdapter.setCurrentPage(this.bundle.getLong(CURRENT_PAGE));
this.listAdapter.setMaxPages(this.bundle.getLong(MAX_PAGES));
final ArrayList<FiveHundredPxPhoto> photos = this.bundle.getParcelableArrayList(LIST_ITEMS);
this.listAdapter.addAll(photos);
swingBottomInAnimationAdapter.setShouldAnimate(false);
}
return swingBottomInAnimationAdapter;
}
开发者ID:fsiu,项目名称:dw2020,代码行数:23,代码来源:MainActivity.java
示例4: onCreate
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_googlecards);
ListView listView = (ListView) findViewById(R.id.activity_googlecards_listview);
mGoogleCardsAdapter = new GoogleCardsAdapter(this);
SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(new SwipeDismissAdapter(mGoogleCardsAdapter, this));
swingBottomInAnimationAdapter.setInitialDelayMillis(300);
swingBottomInAnimationAdapter.setAbsListView(listView);
listView.setAdapter(swingBottomInAnimationAdapter);
mGoogleCardsAdapter.addAll(getItems());
}
开发者ID:dakshit,项目名称:upes-academics,代码行数:17,代码来源:GoogleCardsActivity.java
示例5: onCreate
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@SuppressLint("InlinedApi")
@Override
protected void onCreate(final Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.activity_gridview_gv);
SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(new MyAdapter(this, getItems()));
swingBottomInAnimationAdapter.setAbsListView(gridView);
swingBottomInAnimationAdapter.setInitialDelayMillis(300);
gridView.setAdapter(swingBottomInAnimationAdapter);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
开发者ID:dakshit,项目名称:upes-academics,代码行数:18,代码来源:GridViewActivity.java
示例6: onCreate
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
/**
* Called when the activity is created. Setup the data
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tasker);
// Show the Up button in the action bar.
setupActionBar();
ArrayList<Card> cards = new ArrayList<Card>();
for (TaskerCommand command : TaskerCommands.getTaskerCommands(this)) {
cards.add(new TaskerCard(this, command));
}
if (cards.size() == 0) {
Card card = new Card(this, R.layout.no_tasker_commands_inner);
CardHeader header = new CardHeader(this);
header.setTitle("No Tasker Commands");
card.addCardHeader(header);
cards.add(card);
}
CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(this, cards);
final CardGridView listView = (CardGridView) findViewById(R.id.card_list_view);
animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
animCardArrayAdapter.setAbsListView(listView);
listView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
}
开发者ID:RSenApps,项目名称:Commandr-Android,代码行数:31,代码来源:TaskerActivity.java
示例7: onCreate
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.most_wanted);
setupActionBar();
AdView adView = (AdView) this.findViewById(R.id.adView);
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("ads", true)) {
adView.setVisibility(View.VISIBLE);
Bundle bundle = new Bundle();
bundle.putString("color_bg", "4285f4");
bundle.putString("color_bg_top", "4285f4");
bundle.putString("color_border", "4285f4");
bundle.putString("color_link", "EEEEEE");
bundle.putString("color_text", "FFFFFF");
bundle.putString("color_url", "EEEEEE");
AdMobExtras extras = new AdMobExtras(bundle);
AdRequest adRequest = new AdRequest.Builder().addTestDevice("E9439BFF2245E1BC1DD0FDB28EA467F9").addTestDevice("49924C4BF3738C69A7497A524D092901").addNetworkExtras(extras).build();
adView.loadAd(adRequest);
} else {
adView.setVisibility(View.GONE);
}
ArrayList<Card> cards = new ArrayList<Card>();
for (MostWantedCommand command : MostWantedCommands.getCommands(this)) {
cards.add(new MostWantedCard(this, command));
}
CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(this, cards);
final CardGridView listView = (CardGridView) findViewById(R.id.card_list_view);
((FloatingActionButton)findViewById(R.id.vote)).attachToListView(listView);
SwingBottomInAnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
animCardArrayAdapter.setAbsListView(listView);
listView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
findViewById(R.id.vote).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MostWantedCommandsActivity.this, VotingActivity.class));
}
});
}
开发者ID:RSenApps,项目名称:Commandr-Android,代码行数:40,代码来源:MostWantedCommandsActivity.java
示例8: setBottomRightAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomRightAdapter() {
AnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(new SwingRightInAnimationAdapter(mCardArrayAdapter));
animCardArrayAdapter.setAbsListView(mListView);
if (mListView != null) {
mListView.setExternalAdapter(animCardArrayAdapter,mCardArrayAdapter);
}
}
开发者ID:tajchert,项目名称:CEEHack,代码行数:8,代码来源:ListViewAnimationsFragment.java
示例9: populateRecipesList
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void populateRecipesList() {
mRecipesAdapter = new HomeScreenRecipesAdapter(getActivity(), new RecipesModel(getActivity()));
SwingBottomInAnimationAdapter animBottomAdapter = new SwingBottomInAnimationAdapter(mRecipesAdapter);
animBottomAdapter.setAbsListView(mRecipeList);
mRecipeList.setAdapter(animBottomAdapter);
}
开发者ID:levibostian,项目名称:PantryPirate,代码行数:8,代码来源:MainFragment.java
示例10: setBottomAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomAdapter() {
AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(
mAdapter);
animAdapter.setAbsListView(getListView());
getListView().setAdapter(animAdapter);
}
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:7,代码来源:ItemAnimationActivity.java
示例11: setBottomRightAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomRightAdapter() {
AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(
new SwingRightInAnimationAdapter(mAdapter));
animAdapter.setAbsListView(getListView());
getListView().setAdapter(animAdapter);
}
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:7,代码来源:ItemAnimationActivity.java
示例12: onResume
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@Override
protected void onResume() {
super.onResume();
progress.setVisibility(View.VISIBLE);
ParseQuery<ParseObject> query = ParseQuery.getQuery("VotingCommand");
query.addDescendingOrder("votes");
query.setLimit(1000);
((FloatingActionButton) findViewById(R.id.suggest)).hide();
query.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(final List<ParseObject> parseObjects, ParseException e) {
if (e == null) {
ArrayList<Card> cards = new ArrayList<Card>();
for (ParseObject command : parseObjects) {
cards.add(new MostWantedVotingCard(VotingActivity.this, command));
}
final CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(VotingActivity.this, cards);
final CardGridView listView = (CardGridView) findViewById(R.id.card_list_view);
final SwingBottomInAnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
animCardArrayAdapter.setAbsListView(listView);
listView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
progress.setVisibility(View.GONE);
FloatingActionButton b = (FloatingActionButton) findViewById(R.id.suggest);
b.show();
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
new MaterialDialog.Builder(VotingActivity.this)
.title(getString(R.string.suggest_new))
.theme(Theme.LIGHT) // the default is light, so you don't need this line
.customView(R.layout.suggest_command, true)
.positiveText(getString(R.string.submit)) // the default is 'OK'
.negativeText(R.string.cancel) // leaving this line out will remove the negative button
.callback(new MaterialDialog.ButtonCallback() {
@Override
public void onPositive(MaterialDialog materialDialog) {
String name = ((EditText) materialDialog.getCustomView().findViewById(R.id.name)).getText().toString();
String detail = ((EditText) materialDialog.getCustomView().findViewById(R.id.detailSuggest)).getText().toString();
ParseObject votingCommand = new ParseObject("VotingCommand");
votingCommand.put("title", name);
votingCommand.put("detail", detail);
votingCommand.put("votes", 0);
votingCommand.saveInBackground();
mCardArrayAdapter.add(new MostWantedVotingCard(VotingActivity.this, votingCommand));
animCardArrayAdapter.notifyDataSetChanged();
}
})
.build()
.show();
}
});
}
}
});
}
开发者ID:RSenApps,项目名称:Commandr-Android,代码行数:61,代码来源:VotingActivity.java
示例13: setBottomAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomAdapter() {
AnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
animCardArrayAdapter.setAbsListView(mListView);
mListView.setExternalAdapter(animCardArrayAdapter,mCardArrayAdapter);
}
开发者ID:tajchert,项目名称:CEEHack,代码行数:6,代码来源:ListViewAnimationsFragment.java
示例14: setBottomRightAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomRightAdapter() {
AnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(new SwingRightInAnimationAdapter(mCardArrayAdapter));
animCardArrayAdapter.setAbsListView(mListView);
mListView.setExternalAdapter(animCardArrayAdapter,mCardArrayAdapter);
}
开发者ID:tajchert,项目名称:CEEHack,代码行数:6,代码来源:ListViewGridAnimationsFragment.java
示例15: setBottomAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomAdapter() {
AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(mAdapter);
animAdapter.setAbsListView(getListView());
getListView().setAdapter(animAdapter);
}
开发者ID:dakshit,项目名称:upes-academics,代码行数:6,代码来源:AppearanceExamplesActivity.java
示例16: setBottomRightAdapter
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void setBottomRightAdapter() {
AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(new SwingRightInAnimationAdapter(mAdapter));
animAdapter.setAbsListView(getListView());
getListView().setAdapter(animAdapter);
}
开发者ID:dakshit,项目名称:upes-academics,代码行数:6,代码来源:AppearanceExamplesActivity.java
示例17: generateList
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
private void generateList(ListView view, int layout) {
MyListAdapter adapter = new MyListAdapter(getBaseContext(), layout, resultRestaurants);
SwingBottomInAnimationAdapter swing = new SwingBottomInAnimationAdapter(adapter);
swing.setAbsListView(view);
view.setAdapter(swing);
}
开发者ID:ihlee01,项目名称:YELPIO,代码行数:7,代码来源:RestaurantListActivity.java
示例18: onCreateView
import com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
GridView gridView;
mRequest = ListServiceRequest.fromBundle(getArguments().getBundle("request"));
mAdapter = YouTubeCursorAdapter.newAdapter(getActivity(), mRequest, this);
ViewGroup rootView = mAdapter.rootView(container);
// Now find the PullToRefreshLayout to setup
mPullToRefreshLayout = (PullToRefreshLayout) rootView.findViewById(R.id.grid_frame_layout);
Options.Builder options = new Options.Builder();
options.scrollDistance(0.4f);
// Now setup the PullToRefreshLayout
ActionBarPullToRefresh.from(this.getActivity())
// Mark All Children as pullable
.allChildrenArePullable()
// Set the OnRefreshListener
.listener(this)
.options(options.build())
// Finally commit the setup to our PullToRefreshLayout
.setup(mPullToRefreshLayout);
gridView = (GridView) rootView.findViewById(R.id.gridview);
gridView.setOnItemClickListener(mAdapter);
SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(new SwipeDismissAdapter(mAdapter, this));
swingBottomInAnimationAdapter.setInitialDelayMillis(200);
swingBottomInAnimationAdapter.setAbsListView(gridView);
gridView.setAdapter(swingBottomInAnimationAdapter);
// setup empty view
mEmptyListHelper = new EmptyListHelper(rootView.findViewById(R.id.empty_view));
gridView.setEmptyView(mEmptyListHelper.view());
// create the loader
getLoaderManager().initLoader(0, null, this);
// dimmer only exists for dark mode
View dimmerView = rootView.findViewById(R.id.dimmer);
if (dimmerView != null)
new ScrollTriggeredAnimator(gridView, dimmerView);
return rootView;
}
开发者ID:sgehrman,项目名称:UTubeTV,代码行数:48,代码来源:YouTubeGridFragment.java
注:本文中的com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论