removed unused classes

This commit is contained in:
Mariotaku Lee 2016-08-25 01:11:53 +08:00
parent 3629cd2d8f
commit e0fac74f43
3 changed files with 1 additions and 93 deletions

View File

@ -167,6 +167,7 @@ dependencies {
compile 'com.github.mariotaku:AbstractTask:0.9.4' compile 'com.github.mariotaku:AbstractTask:0.9.4'
compile 'com.github.mariotaku.CommonsLibrary:parcel:0.9.8' compile 'com.github.mariotaku.CommonsLibrary:parcel:0.9.8'
compile 'com.github.mariotaku.CommonsLibrary:io:0.9.8' compile 'com.github.mariotaku.CommonsLibrary:io:0.9.8'
compile 'com.github.mariotaku:KPreferences:0.9.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'nl.komponents.kovenant:kovenant:3.3.0' compile 'nl.komponents.kovenant:kovenant:3.3.0'
compile 'nl.komponents.kovenant:kovenant-android:3.3.0' compile 'nl.komponents.kovenant:kovenant-android:3.3.0'

View File

@ -1,43 +0,0 @@
/*
* Twidere - Twitter client for Android
*
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mariotaku.twidere.util;
import android.view.View;
import android.widget.ListView;
/**
* Created by mariotaku on 15/4/22.
*/
public class ListViewUtils {
private ListViewUtils() {
}
public static int getFirstFullyVisiblePosition(final ListView listView) {
final int firstVisiblePosition = listView.getFirstVisiblePosition();
final View firstVisibleChild = listView.getChildAt(0);
if (firstVisibleChild != null && firstVisibleChild.getTop() < 0
&& firstVisiblePosition + 1 < listView.getCount()) {
return firstVisiblePosition + 1;
}
return firstVisiblePosition;
}
}

View File

@ -1,50 +0,0 @@
/*
* Twidere - Twitter client for Android
*
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mariotaku.twidere.util;
import android.support.v4.util.Pair;
import java.util.ArrayList;
import java.util.regex.Pattern;
/**
* Created by mariotaku on 15/9/22.
*/
public class RegexMatcher {
public static final int NO_MATCH = -1;
private final ArrayList<Pair<Pattern, Integer>> patternsList;
private final int defaultCode;
public RegexMatcher(int code) {
defaultCode = code;
patternsList = new ArrayList<>();
}
public void addPattern(String pattern, int code) {
patternsList.add(Pair.create(Pattern.compile(pattern), code));
}
public int match(String path) {
for (Pair<Pattern, Integer> item : patternsList) {
if (item.first.matcher(path).matches()) return item.second;
}
return defaultCode;
}
}