Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 288ca4ca authored by jruesga's avatar jruesga
Browse files

Remove support dependency

For now support-v4 is not necessary (probably in the future but not now)
parent 1d676459
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -19,9 +19,6 @@ include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-v4

LOCAL_PACKAGE_NAME := CMExplorer
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+0 −72
Original line number Diff line number Diff line
/*
 * Copyright (C) 2012 The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.cyanogenmod.explorer.adapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * An implementation of {@link FragmentPagerAdapter} for display page
 * inside a {@link "ViewPager"}.
 */
public class PagerAdapter extends FragmentPagerAdapter {

    private final List<Fragment> mFragments;

    /**
     * Constructor of <code>PagerAdapter</code>.
     *
     * @param fm The fragment manager
     */
    public PagerAdapter(FragmentManager fm) {
        super(fm);
        this.mFragments = Collections.synchronizedList(new ArrayList<Fragment>());
    }

    /**
     * Method that add a new fragment to the pager.
     *
     * @param fragment The fragment to add
     */
    public void addFragment(Fragment fragment) {
        this.mFragments.add(fragment);
        notifyDataSetChanged();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public android.support.v4.app.Fragment getItem(int position) {
        return this.mFragments.get(position);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int getCount() {
        return this.mFragments.size();
    }


}