diff --git a/.idea/misc.xml b/.idea/misc.xml
index af0bbdde..703e5d4b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java b/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java
index cd43dcc7..1d7a2557 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/TwitterEngine.java
@@ -59,7 +59,7 @@ public class TwitterEngine {
twitter = factory.getInstance();
if (settings.getLogin()) {
- String keys[] = settings.getKeys();
+ String[] keys = settings.getKeys();
initKeys(keys[0], keys[1]);
twitterID = settings.getUserId();
}
@@ -200,7 +200,7 @@ public class TwitterEngine {
*/
public List getTrends(int woeId) throws TwitterException {
List result = new ArrayList<>();
- twitter4j.Trend trends[] = twitter.getPlaceTrends(woeId).getTrends();
+ twitter4j.Trend[] trends = twitter.getPlaceTrends(woeId).getTrends();
for (int i = 0; i < trends.length; i++) {
Trend item = new Trend(i + 1, trends[i].getName());
@@ -284,7 +284,7 @@ public class TwitterEngine {
*/
public boolean[] getConnection(long userId) throws TwitterException {
Relationship connect = twitter.showFriendship(twitterID, userId);
- boolean connection[] = new boolean[5];
+ boolean[] connection = new boolean[5];
connection[0] = connect.isSourceFollowingTarget();
connection[1] = connect.isTargetFollowingSource();
connection[2] = connect.isSourceBlockingTarget();
@@ -375,7 +375,7 @@ public class TwitterEngine {
*/
public List getFollowing(long userId, long cursor) throws TwitterException {
IDs userIDs = twitter.getFriendsIDs(userId, cursor, load);
- long ids[] = userIDs.getIDs();
+ long[] ids = userIDs.getIDs();
if (ids.length == 0)
return new ArrayList<>();
return convertUserList(twitter.lookupUsers(ids));
@@ -391,7 +391,7 @@ public class TwitterEngine {
*/
public List getFollower(long userId, long cursor) throws TwitterException {
IDs userIDs = twitter.getFollowersIDs(userId, cursor, load);
- long ids[] = userIDs.getIDs();
+ long[] ids = userIDs.getIDs();
if (ids.length == 0)
return new ArrayList<>();
return convertUserList(twitter.lookupUsers(userIDs.getIDs()));
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/MessageListFragment.java b/app/src/main/java/org/nuclearfog/twidda/fragment/MessageListFragment.java
new file mode 100644
index 00000000..fb1d84e7
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/MessageListFragment.java
@@ -0,0 +1,50 @@
+package org.nuclearfog.twidda.fragment;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.nuclearfog.twidda.adapter.OnItemClickListener;
+
+public class MessageListFragment extends Fragment implements OnRefreshListener, OnItemClickListener {
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup parent, Bundle param) {
+ SwipeRefreshLayout reload = new SwipeRefreshLayout(inflater.getContext());
+ RecyclerView list = new RecyclerView(inflater.getContext());
+ reload.setOnRefreshListener(this);
+ reload.addView(list);
+ return reload;
+ }
+
+
+ @Override
+ public void onStart() {
+ super.onStart();
+
+ }
+
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+
+ @Override
+ public void onRefresh() {
+
+ }
+
+
+ @Override
+ public void onItemClick(RecyclerView rv, int pos) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/TrendListFragment.java b/app/src/main/java/org/nuclearfog/twidda/fragment/TrendListFragment.java
new file mode 100644
index 00000000..7f8a26f3
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/TrendListFragment.java
@@ -0,0 +1,50 @@
+package org.nuclearfog.twidda.fragment;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.nuclearfog.twidda.adapter.OnItemClickListener;
+
+public class TrendListFragment extends Fragment implements OnRefreshListener, OnItemClickListener {
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup parent, Bundle param) {
+ SwipeRefreshLayout reload = new SwipeRefreshLayout(inflater.getContext());
+ RecyclerView list = new RecyclerView(inflater.getContext());
+ reload.setOnRefreshListener(this);
+ reload.addView(list);
+ return reload;
+ }
+
+
+ @Override
+ public void onStart() {
+ super.onStart();
+
+ }
+
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+
+ @Override
+ public void onRefresh() {
+
+ }
+
+
+ @Override
+ public void onItemClick(RecyclerView rv, int pos) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/TweetListFragment.java b/app/src/main/java/org/nuclearfog/twidda/fragment/TweetListFragment.java
new file mode 100644
index 00000000..3e46efcd
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/TweetListFragment.java
@@ -0,0 +1,50 @@
+package org.nuclearfog.twidda.fragment;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.nuclearfog.twidda.adapter.OnItemClickListener;
+
+public class TweetListFragment extends Fragment implements OnRefreshListener, OnItemClickListener {
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup parent, Bundle param) {
+ SwipeRefreshLayout reload = new SwipeRefreshLayout(inflater.getContext());
+ RecyclerView list = new RecyclerView(inflater.getContext());
+ reload.setOnRefreshListener(this);
+ reload.addView(list);
+ return reload;
+ }
+
+
+ @Override
+ public void onStart() {
+ super.onStart();
+
+ }
+
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+
+ @Override
+ public void onRefresh() {
+
+ }
+
+
+ @Override
+ public void onItemClick(RecyclerView rv, int pos) {
+
+ }
+}
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/UserListFragment.java b/app/src/main/java/org/nuclearfog/twidda/fragment/UserListFragment.java
new file mode 100644
index 00000000..5f61bce6
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/UserListFragment.java
@@ -0,0 +1,50 @@
+package org.nuclearfog.twidda.fragment;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.nuclearfog.twidda.adapter.OnItemClickListener;
+
+public class UserListFragment extends Fragment implements OnRefreshListener, OnItemClickListener {
+
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup parent, Bundle param) {
+ SwipeRefreshLayout reload = new SwipeRefreshLayout(inflater.getContext());
+ RecyclerView list = new RecyclerView(inflater.getContext());
+ reload.setOnRefreshListener(this);
+ reload.addView(list);
+ return reload;
+ }
+
+
+ @Override
+ public void onStart() {
+ super.onStart();
+
+ }
+
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+
+ @Override
+ public void onRefresh() {
+
+ }
+
+
+ @Override
+ public void onItemClick(RecyclerView rv, int pos) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/backend/MessageLoader.java b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/MessageLoader.java
new file mode 100644
index 00000000..5ed7a02c
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/MessageLoader.java
@@ -0,0 +1,37 @@
+package org.nuclearfog.twidda.fragment.backend;
+
+import android.os.AsyncTask;
+import android.support.annotation.NonNull;
+
+import org.nuclearfog.twidda.fragment.MessageListFragment;
+
+import java.lang.ref.WeakReference;
+
+
+public class MessageLoader extends AsyncTask {
+
+ private WeakReference ui;
+
+
+ public MessageLoader(@NonNull MessageListFragment frag) {
+ ui = new WeakReference<>(frag);
+ }
+
+
+ @Override
+ protected java.lang.Boolean doInBackground(java.lang.Long[] objects) {
+ return true;
+ }
+
+
+ @Override
+ protected void onProgressUpdate(java.lang.Void[] v) {
+
+ }
+
+
+ @Override
+ protected void onPostExecute(java.lang.Boolean success) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/backend/TrendLoader.java b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/TrendLoader.java
new file mode 100644
index 00000000..8a23b7f5
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/TrendLoader.java
@@ -0,0 +1,36 @@
+package org.nuclearfog.twidda.fragment.backend;
+
+import android.os.AsyncTask;
+import android.support.annotation.NonNull;
+
+import org.nuclearfog.twidda.fragment.TrendListFragment;
+
+import java.lang.ref.WeakReference;
+
+public class TrendLoader extends AsyncTask {
+
+ private WeakReference ui;
+
+
+ public TrendLoader(@NonNull TrendListFragment frag) {
+ ui = new WeakReference<>(frag);
+ }
+
+
+ @Override
+ protected java.lang.Boolean doInBackground(java.lang.Long[] objects) {
+ return true;
+ }
+
+
+ @Override
+ protected void onProgressUpdate(java.lang.Void[] v) {
+
+ }
+
+
+ @Override
+ protected void onPostExecute(java.lang.Boolean success) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/backend/TweetLoader.java b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/TweetLoader.java
new file mode 100644
index 00000000..f9ed837b
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/TweetLoader.java
@@ -0,0 +1,36 @@
+package org.nuclearfog.twidda.fragment.backend;
+
+import android.os.AsyncTask;
+import android.support.annotation.NonNull;
+
+import org.nuclearfog.twidda.fragment.TweetListFragment;
+import java.lang.ref.WeakReference;
+
+
+public class TweetLoader extends AsyncTask {
+
+ private WeakReference ui;
+
+
+ public TweetLoader(@NonNull TweetListFragment frag) {
+ ui = new WeakReference<>(frag);
+ }
+
+
+ @Override
+ protected Boolean doInBackground(Long[] objects) {
+ return true;
+ }
+
+
+ @Override
+ protected void onProgressUpdate(Void[] v) {
+
+ }
+
+
+ @Override
+ protected void onPostExecute(Boolean success) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragment/backend/UserLoader.java b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/UserLoader.java
new file mode 100644
index 00000000..6771dd08
--- /dev/null
+++ b/app/src/main/java/org/nuclearfog/twidda/fragment/backend/UserLoader.java
@@ -0,0 +1,36 @@
+package org.nuclearfog.twidda.fragment.backend;
+
+import android.os.AsyncTask;
+import android.support.annotation.NonNull;
+
+import org.nuclearfog.twidda.fragment.UserListFragment;
+
+import java.lang.ref.WeakReference;
+
+public class UserLoader extends AsyncTask {
+
+ private WeakReference ui;
+
+
+ public UserLoader(@NonNull UserListFragment frag) {
+ ui = new WeakReference<>(frag);
+ }
+
+
+ @Override
+ protected java.lang.Boolean doInBackground(java.lang.Long[] objects) {
+ return true;
+ }
+
+
+ @Override
+ protected void onProgressUpdate(java.lang.Void[] v) {
+
+ }
+
+
+ @Override
+ protected void onPostExecute(java.lang.Boolean success) {
+
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 1cd42da1..8f34a820 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.2'
+ classpath 'com.android.tools.build:gradle:3.4.0'
}
}