Skip to content

Instantly share code, notes, and snippets.

View amlcurran's full-sized avatar

Alex Curran amlcurran

View GitHub Profile
@Budincsevity
Budincsevity / Animation.java
Last active January 14, 2022 09:00
Change the height of a layout with ValueAnimator
private RelativeLayout mCalendarView;
.
.
.
private void expandLayout() {
final int widthSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
final int heightSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
mCalendarView.measure(widthSpec, heightSpec);
ValueAnimator animator = slideAnimator(0, 750);
package com.meetup.adapter;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
public class CursorPagerAdapter<F extends Fragment> extends FragmentStatePagerAdapter {
private final Class<F> fragmentClass;