diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 3efa3560..1c527237 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -3,8 +3,6 @@
-classobfuscationdictionary dict/class-dictionary.txt
-packageobfuscationdictionary dict/package-dictionary.txt
--optimizationpasses 5
-
# keep these libraries but allow obfuscating
-dontwarn org.conscrypt.Conscrypt
#noinspection ShrinkerUnresolvedReference
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 78977ef6..9cd808f2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -27,7 +27,7 @@
tools:ignore="UnusedAttribute">
@@ -57,93 +57,93 @@
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/AccountAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/AccountAdapter.java
index 6b1627f6..bc9b9590 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/AccountAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/AccountAdapter.java
@@ -31,7 +31,7 @@ import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter to show a list of accounts
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.fragments.AccountFragment
+ * @see org.nuclearfog.twidda.ui.fragments.AccountFragment
*/
public class AccountAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/FontAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/FontAdapter.java
index 919d065b..cbe8ba05 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/FontAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/FontAdapter.java
@@ -17,7 +17,7 @@ import org.nuclearfog.twidda.database.GlobalSettings;
* Spinner Adapter for font settings
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.activities.AppSettings
+ * @see org.nuclearfog.twidda.ui.activities.AppSettings
*/
public class FontAdapter extends BaseAdapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/FragmentAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/FragmentAdapter.java
index 7f5393b5..1ba21353 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/FragmentAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/FragmentAdapter.java
@@ -1,8 +1,8 @@
package org.nuclearfog.twidda.adapter;
-import static org.nuclearfog.twidda.fragments.TweetFragment.*;
-import static org.nuclearfog.twidda.fragments.UserFragment.*;
-import static org.nuclearfog.twidda.fragments.UserListFragment.*;
+import static org.nuclearfog.twidda.ui.fragments.TweetFragment.*;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.*;
+import static org.nuclearfog.twidda.ui.fragments.UserListFragment.*;
import android.os.Bundle;
@@ -11,11 +11,11 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
-import org.nuclearfog.twidda.fragments.ListFragment;
-import org.nuclearfog.twidda.fragments.TrendFragment;
-import org.nuclearfog.twidda.fragments.TweetFragment;
-import org.nuclearfog.twidda.fragments.UserFragment;
-import org.nuclearfog.twidda.fragments.UserListFragment;
+import org.nuclearfog.twidda.ui.fragments.ListFragment;
+import org.nuclearfog.twidda.ui.fragments.TrendFragment;
+import org.nuclearfog.twidda.ui.fragments.TweetFragment;
+import org.nuclearfog.twidda.ui.fragments.UserFragment;
+import org.nuclearfog.twidda.ui.fragments.UserListFragment;
/**
* custom adapter used for {@link androidx.viewpager.widget.ViewPager}
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/ImageAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/ImageAdapter.java
index 33b58e6a..7932701c 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/ImageAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/ImageAdapter.java
@@ -26,7 +26,7 @@ import java.util.List;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter implementation to show image previews
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.activities.ImageViewer
+ * @see org.nuclearfog.twidda.ui.activities.ImageViewer
*/
public class ImageAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/LocationAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/LocationAdapter.java
index 94d9bcb0..24251d4e 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/LocationAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/LocationAdapter.java
@@ -20,7 +20,7 @@ import java.util.List;
* Adapter class for Location selection spinner
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.activities.AppSettings
+ * @see org.nuclearfog.twidda.ui.activities.AppSettings
*/
public class LocationAdapter extends BaseAdapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/MessageAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/MessageAdapter.java
index e48693a7..99207e4d 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/MessageAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/MessageAdapter.java
@@ -35,7 +35,7 @@ import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter implementation to show directmessages
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.fragments.MessageFragment
+ * @see org.nuclearfog.twidda.ui.fragments.MessageFragment
*/
public class MessageAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/ScaleAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/ScaleAdapter.java
index 9ce2c05d..bd138667 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/ScaleAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/ScaleAdapter.java
@@ -17,7 +17,7 @@ import java.util.Locale;
* list adapter to show font scales
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.activities.AppSettings
+ * @see org.nuclearfog.twidda.ui.activities.AppSettings
*/
public class ScaleAdapter extends BaseAdapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/TrendAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/TrendAdapter.java
index 6d6e8b98..e9384678 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/TrendAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/TrendAdapter.java
@@ -27,7 +27,7 @@ import java.util.List;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter implementation to show twitter trends
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.fragments.TrendFragment
+ * @see org.nuclearfog.twidda.ui.fragments.TrendFragment
*/
public class TrendAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/TweetAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/TweetAdapter.java
index 04bef230..fb85bc71 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/TweetAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/TweetAdapter.java
@@ -41,7 +41,7 @@ import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter to show tweets
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.fragments.TweetFragment
+ * @see org.nuclearfog.twidda.ui.fragments.TweetFragment
*/
public class TweetAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/UserAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/UserAdapter.java
index fc52b909..42cac6b1 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/UserAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/UserAdapter.java
@@ -33,7 +33,7 @@ import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter implementation to show users
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.fragments.UserFragment
+ * @see org.nuclearfog.twidda.ui.fragments.UserFragment
*/
public class UserAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/adapter/UserlistAdapter.java b/app/src/main/java/org/nuclearfog/twidda/adapter/UserlistAdapter.java
index 776777cd..3738b45d 100644
--- a/app/src/main/java/org/nuclearfog/twidda/adapter/UserlistAdapter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/adapter/UserlistAdapter.java
@@ -35,7 +35,7 @@ import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
* custom {@link androidx.recyclerview.widget.RecyclerView} adapter implementation to show userlists
*
* @author nuclearfog
- * @see org.nuclearfog.twidda.fragments.UserListFragment
+ * @see org.nuclearfog.twidda.ui.fragments.UserListFragment
*/
public class UserlistAdapter extends Adapter {
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/Twitter.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/Twitter.java
index 52ad7d86..4d97d579 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/Twitter.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/Twitter.java
@@ -11,6 +11,14 @@ import org.nuclearfog.twidda.backend.api.holder.MediaStream;
import org.nuclearfog.twidda.backend.api.holder.ProfileUpdate;
import org.nuclearfog.twidda.backend.api.holder.TweetUpdate;
import org.nuclearfog.twidda.backend.api.holder.UserlistUpdate;
+import org.nuclearfog.twidda.backend.api.impl.DirectmessageV1;
+import org.nuclearfog.twidda.backend.api.impl.LocationV1;
+import org.nuclearfog.twidda.backend.api.impl.RelationV1;
+import org.nuclearfog.twidda.backend.api.impl.TrendV1;
+import org.nuclearfog.twidda.backend.api.impl.TweetV1;
+import org.nuclearfog.twidda.backend.api.impl.UserListV1;
+import org.nuclearfog.twidda.backend.api.impl.UserV1;
+import org.nuclearfog.twidda.backend.api.impl.UserV2;
import org.nuclearfog.twidda.backend.lists.Directmessages;
import org.nuclearfog.twidda.backend.lists.UserLists;
import org.nuclearfog.twidda.backend.lists.Users;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/DirectmessageV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/DirectmessageV1.java
similarity index 92%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/DirectmessageV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/DirectmessageV1.java
index 6ee69a11..8a96f713 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/DirectmessageV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/DirectmessageV1.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import android.net.Uri;
@@ -16,7 +16,7 @@ import org.nuclearfog.twidda.model.User;
*
* @author nuclearfog
*/
-class DirectmessageV1 implements DirectMessage {
+public class DirectmessageV1 implements DirectMessage {
private long id;
private long timestamp;
@@ -28,7 +28,7 @@ class DirectmessageV1 implements DirectMessage {
private String mediaLink;
- DirectmessageV1(JSONObject json) throws JSONException {
+ public DirectmessageV1(JSONObject json) throws JSONException {
id = Long.parseLong(json.getString("id"));
timestamp = Long.parseLong(json.getString("created_timestamp"));
JSONObject message = json.getJSONObject("message_create");
@@ -91,7 +91,7 @@ class DirectmessageV1 implements DirectMessage {
*
* @return user ID
*/
- long getSenderId() {
+ public long getSenderId() {
return sender_id;
}
@@ -100,7 +100,7 @@ class DirectmessageV1 implements DirectMessage {
*
* @return user ID
*/
- long getReceiverId() {
+ public long getReceiverId() {
return receiver_id;
}
@@ -109,7 +109,7 @@ class DirectmessageV1 implements DirectMessage {
*
* @param sender user information
*/
- void addSender(User sender) {
+ public void addSender(User sender) {
this.sender = sender;
}
@@ -118,7 +118,7 @@ class DirectmessageV1 implements DirectMessage {
*
* @param receiver user information
*/
- void addReceiver(User receiver) {
+ public void addReceiver(User receiver) {
this.receiver = receiver;
}
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/LocationV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/LocationV1.java
similarity index 88%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/LocationV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/LocationV1.java
index 324884a6..7be79d05 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/LocationV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/LocationV1.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -11,12 +11,12 @@ import org.nuclearfog.twidda.model.Location;
*
* @author nuclearfog
*/
-class LocationV1 implements Location {
+public class LocationV1 implements Location {
private int id;
private String name;
- LocationV1(JSONObject json) {
+ public LocationV1(JSONObject json) {
id = json.optInt("woeid");
String placeName = json.optString("name");
String country = json.optString("country");
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/RelationV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/RelationV1.java
similarity index 91%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/RelationV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/RelationV1.java
index f057342e..62e3bd61 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/RelationV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/RelationV1.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import androidx.annotation.NonNull;
@@ -11,7 +11,7 @@ import org.nuclearfog.twidda.model.Relation;
*
* @author nuclearfog
*/
-class RelationV1 implements Relation {
+public class RelationV1 implements Relation {
private boolean isHome;
private boolean isFollowing;
@@ -21,7 +21,7 @@ class RelationV1 implements Relation {
private boolean canDm;
- RelationV1(JSONObject json) throws JSONException {
+ public RelationV1(JSONObject json) throws JSONException {
JSONObject relationship = json.getJSONObject("relationship");
JSONObject source = relationship.getJSONObject("source");
JSONObject target = relationship.getJSONObject("target");
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/TrendV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/TrendV1.java
similarity index 84%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/TrendV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/TrendV1.java
index 5c3c4741..56407804 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/TrendV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/TrendV1.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import androidx.annotation.NonNull;
@@ -10,13 +10,13 @@ import org.nuclearfog.twidda.model.Trend;
*
* @author nuclearfog
*/
-class TrendV1 implements Trend {
+public class TrendV1 implements Trend {
private int rank;
private int popularity;
private String name;
- TrendV1(JSONObject json, int rank) {
+ public TrendV1(JSONObject json, int rank) {
name = json.optString("name");
popularity = json.optInt("tweet_volume");
this.rank = rank;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/TweetV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/TweetV1.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/TweetV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/TweetV1.java
index d2ad1a01..ef3a1417 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/TweetV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/TweetV1.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import android.net.Uri;
@@ -19,24 +19,24 @@ import java.util.Locale;
*
* @author nuclearfog
*/
-class TweetV1 implements Tweet {
+public class TweetV1 implements Tweet {
private static final long serialVersionUID = 70666106496232760L;
/**
* query parameter to enable extended mode to show tweets with more than 140 characters
*/
- static final String EXT_MODE = "tweet_mode=extended";
+ public static final String EXT_MODE = "tweet_mode=extended";
/**
* query parameter to include ID of the reteet if available
*/
- static final String INCL_RT_ID = "include_my_retweet=true";
+ public static final String INCL_RT_ID = "include_my_retweet=true";
/**
* query parameter to include entities like urls, media or user mentions
*/
- static final String INCL_ENTITIES = "include_entities=true";
+ public static final String INCL_ENTITIES = "include_entities=true";
/**
* twitter video/gif MIME
@@ -65,7 +65,7 @@ class TweetV1 implements Tweet {
private String mediaType = MEDIA_NONE;
- TweetV1(JSONObject json, long twitterId) throws JSONException {
+ public TweetV1(JSONObject json, long twitterId) throws JSONException {
author = new UserV1(json.getJSONObject("user"), twitterId);
id = Long.parseLong(json.optString("id_str", "-1"));
replyId = json.optLong("in_reply_to_status_id", -1);
@@ -230,7 +230,7 @@ class TweetV1 implements Tweet {
*
* @param isRetweeted true if this tweet should be retweeted
*/
- void setRetweet(boolean isRetweeted) {
+ public void setRetweet(boolean isRetweeted) {
this.isRetweeted = isRetweeted;
if (isRetweeted) {
retweetCount++;
@@ -247,7 +247,7 @@ class TweetV1 implements Tweet {
*
* @param isFavorited true if this tweet should be favorited
*/
- void setFavorite(boolean isFavorited) {
+ public void setFavorite(boolean isFavorited) {
this.isFavorited = isFavorited;
if (isFavorited) {
favoriteCount++;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/UserListV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserListV1.java
similarity index 90%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/UserListV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserListV1.java
index c9ee4731..22a226fc 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/UserListV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserListV1.java
@@ -1,10 +1,11 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.json.JSONException;
import org.json.JSONObject;
+import org.nuclearfog.twidda.backend.api.impl.UserV1;
import org.nuclearfog.twidda.backend.utils.StringTools;
import org.nuclearfog.twidda.model.User;
import org.nuclearfog.twidda.model.UserList;
@@ -14,7 +15,7 @@ import org.nuclearfog.twidda.model.UserList;
*
* @author nuclearfog
*/
-class UserListV1 implements UserList {
+public class UserListV1 implements UserList {
private static final long serialVersionUID = 4121925943880606236L;
@@ -30,7 +31,7 @@ class UserListV1 implements UserList {
private User owner;
- UserListV1(JSONObject json, long currentId) throws JSONException {
+ public UserListV1(JSONObject json, long currentId) throws JSONException {
id = Long.parseLong(json.optString("id_str", "-1"));
title = json.optString("name");
description = json.optString("description");
@@ -111,7 +112,7 @@ class UserListV1 implements UserList {
*
* @param following following status
*/
- void setFollowing(boolean following) {
+ public void setFollowing(boolean following) {
this.following = following;
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/UserV1.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserV1.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/UserV1.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserV1.java
index ba62b35e..25758b6b 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/UserV1.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserV1.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -14,7 +14,7 @@ import org.nuclearfog.twidda.model.User;
*
* @author nuclearfog
*/
-class UserV1 implements User {
+public class UserV1 implements User {
private static final long serialVersionUID = 7893496988800499358L;
@@ -38,13 +38,13 @@ class UserV1 implements User {
private boolean isCurrentUser = true;
- UserV1(JSONObject json, long twitterId) {
+ public UserV1(JSONObject json, long twitterId) {
this(json);
isCurrentUser = twitterId == id;
}
- UserV1(JSONObject json) {
+ public UserV1(JSONObject json) {
id = Long.parseLong(json.optString("id_str", "-1"));
username = json.optString("name");
screenName = '@' + json.optString("screen_name");
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/UserV2.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserV2.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/backend/api/UserV2.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserV2.java
index cb7ba5ad..ab049d53 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/api/UserV2.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/impl/UserV2.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend.api;
+package org.nuclearfog.twidda.backend.api.impl;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -14,7 +14,7 @@ import org.nuclearfog.twidda.model.User;
*
* @author nuclearfog
*/
-class UserV2 implements User {
+public class UserV2 implements User {
private static final long serialVersionUID = 1136243062864162774L;
@@ -44,7 +44,7 @@ class UserV2 implements User {
private boolean defaultImage;
- UserV2(JSONObject json, long twitterId) {
+ public UserV2(JSONObject json, long twitterId) {
id = Long.parseLong(json.optString("id", "-1"));
username = json.optString("name");
screenName = '@' + json.optString("username");
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/AccountLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/AccountLoader.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/backend/AccountLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/AccountLoader.java
index d2cf7a1d..c47c9be2 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/AccountLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/AccountLoader.java
@@ -1,9 +1,9 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
import org.nuclearfog.twidda.database.AccountDatabase;
-import org.nuclearfog.twidda.fragments.AccountFragment;
+import org.nuclearfog.twidda.ui.fragments.AccountFragment;
import org.nuclearfog.twidda.model.Account;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/ImageLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/ImageLoader.java
similarity index 96%
rename from app/src/main/java/org/nuclearfog/twidda/backend/ImageLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/ImageLoader.java
index 277c6d82..a0e486ac 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/ImageLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/ImageLoader.java
@@ -1,11 +1,11 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.net.Uri;
import android.os.AsyncTask;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.ImageViewer;
+import org.nuclearfog.twidda.ui.activities.ImageViewer;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.api.holder.MediaStream;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/ImageSaver.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/ImageSaver.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/backend/ImageSaver.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/ImageSaver.java
index 71c6523b..39ad5d15 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/ImageSaver.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/ImageSaver.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
-import org.nuclearfog.twidda.activities.MediaActivity;
+import org.nuclearfog.twidda.ui.activities.MediaActivity;
import java.io.IOException;
import java.io.InputStream;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/LinkLoader.java
similarity index 85%
rename from app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/LinkLoader.java
index db9bed33..b96b4e05 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/LinkLoader.java
@@ -1,13 +1,13 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
-import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_ID;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_NAME;
-import static org.nuclearfog.twidda.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
-import static org.nuclearfog.twidda.activities.Userlists.KEY_USERLIST_OWNER_NAME;
-import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DATA;
-import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DISABLE_RELOAD;
-import static org.nuclearfog.twidda.activities.UserlistActivity.KEY_LIST_ID;
+import static org.nuclearfog.twidda.ui.activities.SearchPage.KEY_SEARCH_QUERY;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_ID;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_NAME;
+import static org.nuclearfog.twidda.ui.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
+import static org.nuclearfog.twidda.ui.activities.Userlists.KEY_USERLIST_OWNER_NAME;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.KEY_PROFILE_DATA;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.KEY_PROFILE_DISABLE_RELOAD;
+import static org.nuclearfog.twidda.ui.activities.UserlistActivity.KEY_LIST_ID;
import android.app.Activity;
import android.net.Uri;
@@ -16,14 +16,14 @@ import android.os.Bundle;
import androidx.annotation.NonNull;
-import org.nuclearfog.twidda.activities.DirectMessage;
-import org.nuclearfog.twidda.activities.MainActivity;
-import org.nuclearfog.twidda.activities.SearchPage;
-import org.nuclearfog.twidda.activities.TweetActivity;
-import org.nuclearfog.twidda.activities.TweetEditor;
-import org.nuclearfog.twidda.activities.Userlists;
-import org.nuclearfog.twidda.activities.UserProfile;
-import org.nuclearfog.twidda.activities.UserlistActivity;
+import org.nuclearfog.twidda.ui.activities.DirectMessage;
+import org.nuclearfog.twidda.ui.activities.MainActivity;
+import org.nuclearfog.twidda.ui.activities.SearchPage;
+import org.nuclearfog.twidda.ui.activities.TweetActivity;
+import org.nuclearfog.twidda.ui.activities.TweetEditor;
+import org.nuclearfog.twidda.ui.activities.Userlists;
+import org.nuclearfog.twidda.ui.activities.UserProfile;
+import org.nuclearfog.twidda.ui.activities.UserlistActivity;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.model.User;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/ListAction.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListAction.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/ListAction.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/ListAction.java
index 4ca758de..9033ef13 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/ListAction.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListAction.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
-import org.nuclearfog.twidda.activities.UserlistActivity;
+import org.nuclearfog.twidda.ui.activities.UserlistActivity;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.model.UserList;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/ListLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListLoader.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/ListLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/ListLoader.java
index bd14e1ef..c5fef0a0 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/ListLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListLoader.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
@@ -7,7 +7,7 @@ import androidx.annotation.Nullable;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.lists.UserLists;
-import org.nuclearfog.twidda.fragments.UserListFragment;
+import org.nuclearfog.twidda.ui.fragments.UserListFragment;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/ListManager.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListManager.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/backend/ListManager.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/ListManager.java
index 8bc310ae..46e2fa7c 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/ListManager.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListManager.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.content.Context;
import android.os.AsyncTask;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/ListUpdater.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListUpdater.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/backend/ListUpdater.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/ListUpdater.java
index 0f9823e4..fe6b59dc 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/ListUpdater.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/ListUpdater.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
-import org.nuclearfog.twidda.activities.UserlistEditor;
+import org.nuclearfog.twidda.ui.activities.UserlistEditor;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.api.holder.UserlistUpdate;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/LocationLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/LocationLoader.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/backend/LocationLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/LocationLoader.java
index b5c5ad78..6ff2ed47 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/LocationLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/LocationLoader.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
-import org.nuclearfog.twidda.activities.AppSettings;
+import org.nuclearfog.twidda.ui.activities.AppSettings;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.model.Location;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/MessageLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/MessageLoader.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/backend/MessageLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/MessageLoader.java
index 4fb5d4b4..1d2a7539 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/MessageLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/MessageLoader.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
@@ -9,7 +9,7 @@ import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.lists.Directmessages;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.database.AppDatabase;
-import org.nuclearfog.twidda.fragments.MessageFragment;
+import org.nuclearfog.twidda.ui.fragments.MessageFragment;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/MessageUpdater.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/MessageUpdater.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/MessageUpdater.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/MessageUpdater.java
index 942ccf7b..946d19ce 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/MessageUpdater.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/MessageUpdater.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
import androidx.annotation.NonNull;
-import org.nuclearfog.twidda.activities.MessageEditor;
+import org.nuclearfog.twidda.ui.activities.MessageEditor;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.api.holder.DirectmessageUpdate;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/Registration.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/Registration.java
similarity index 96%
rename from app/src/main/java/org/nuclearfog/twidda/backend/Registration.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/Registration.java
index 2d8964d0..dce89fc3 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/Registration.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/Registration.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.LoginActivity;
+import org.nuclearfog.twidda.ui.activities.LoginActivity;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/SeekbarUpdater.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/SeekbarUpdater.java
similarity index 92%
rename from app/src/main/java/org/nuclearfog/twidda/backend/SeekbarUpdater.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/SeekbarUpdater.java
index 0c814833..6b887f0b 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/SeekbarUpdater.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/SeekbarUpdater.java
@@ -1,6 +1,6 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
-import org.nuclearfog.twidda.activities.VideoViewer;
+import org.nuclearfog.twidda.ui.activities.VideoViewer;
import java.lang.ref.WeakReference;
import java.util.concurrent.Executors;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/TrendLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/TrendLoader.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/TrendLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/TrendLoader.java
index 14cd87cf..298927ec 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/TrendLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/TrendLoader.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
@@ -7,7 +7,7 @@ import androidx.annotation.Nullable;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.database.AppDatabase;
-import org.nuclearfog.twidda.fragments.TrendFragment;
+import org.nuclearfog.twidda.ui.fragments.TrendFragment;
import org.nuclearfog.twidda.model.Trend;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/TweetAction.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/TweetAction.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/backend/TweetAction.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/TweetAction.java
index 6aac43c5..a37a146f 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/TweetAction.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/TweetAction.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.TweetActivity;
+import org.nuclearfog.twidda.ui.activities.TweetActivity;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/TweetLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/TweetLoader.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/backend/TweetLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/TweetLoader.java
index 29bdb80e..0f068cfa 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/TweetLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/TweetLoader.java
@@ -1,6 +1,6 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
-import static org.nuclearfog.twidda.fragments.TweetFragment.CLEAR_LIST;
+import static org.nuclearfog.twidda.ui.fragments.TweetFragment.CLEAR_LIST;
import android.os.AsyncTask;
@@ -10,7 +10,7 @@ import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.utils.ErrorHandler.TwitterError;
import org.nuclearfog.twidda.database.AppDatabase;
-import org.nuclearfog.twidda.fragments.TweetFragment;
+import org.nuclearfog.twidda.ui.fragments.TweetFragment;
import org.nuclearfog.twidda.model.Tweet;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/TweetUpdater.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/TweetUpdater.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/TweetUpdater.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/TweetUpdater.java
index 28d536d0..e874e3a7 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/TweetUpdater.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/TweetUpdater.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
-import org.nuclearfog.twidda.activities.TweetEditor;
+import org.nuclearfog.twidda.ui.activities.TweetEditor;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.api.holder.MediaStream;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/UserAction.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserAction.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/backend/UserAction.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/UserAction.java
index c23b94a2..67d43b05 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/UserAction.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserAction.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
-import org.nuclearfog.twidda.activities.UserProfile;
+import org.nuclearfog.twidda.ui.activities.UserProfile;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/UserExcludeLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserExcludeLoader.java
similarity index 96%
rename from app/src/main/java/org/nuclearfog/twidda/backend/UserExcludeLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/UserExcludeLoader.java
index b3aeb468..4f74282d 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/UserExcludeLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserExcludeLoader.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.UserExclude;
+import org.nuclearfog.twidda.ui.activities.UserExclude;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.database.AppDatabase;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/UserLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserLoader.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/backend/UserLoader.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/UserLoader.java
index b2ceac51..d46ef45d 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/UserLoader.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserLoader.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
@@ -7,7 +7,7 @@ import androidx.annotation.Nullable;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.lists.Users;
-import org.nuclearfog.twidda.fragments.UserFragment;
+import org.nuclearfog.twidda.ui.fragments.UserFragment;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/UserUpdater.java b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserUpdater.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/backend/UserUpdater.java
rename to app/src/main/java/org/nuclearfog/twidda/backend/async/UserUpdater.java
index ded4017b..5aae7460 100644
--- a/app/src/main/java/org/nuclearfog/twidda/backend/UserUpdater.java
+++ b/app/src/main/java/org/nuclearfog/twidda/backend/async/UserUpdater.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.backend;
+package org.nuclearfog.twidda.backend.async;
import android.os.AsyncTask;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.ProfileEditor;
+import org.nuclearfog.twidda.ui.activities.ProfileEditor;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.api.holder.ProfileUpdate;
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/AccountDatabase.java b/app/src/main/java/org/nuclearfog/twidda/database/AccountDatabase.java
index aff664e8..d6e945ad 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/AccountDatabase.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/AccountDatabase.java
@@ -8,6 +8,7 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import org.nuclearfog.twidda.database.DatabaseAdapter.AccountTable;
+import org.nuclearfog.twidda.database.impl.AccountImpl;
import org.nuclearfog.twidda.model.Account;
import java.util.ArrayList;
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/AppDatabase.java b/app/src/main/java/org/nuclearfog/twidda/database/AppDatabase.java
index 942ab24b..96a901bc 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/AppDatabase.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/AppDatabase.java
@@ -19,6 +19,10 @@ import android.net.Uri;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.backend.lists.Directmessages;
+import org.nuclearfog.twidda.database.impl.DirectMessageImpl;
+import org.nuclearfog.twidda.database.impl.TrendImpl;
+import org.nuclearfog.twidda.database.impl.TweetImpl;
+import org.nuclearfog.twidda.database.impl.UserImpl;
import org.nuclearfog.twidda.model.DirectMessage;
import org.nuclearfog.twidda.model.Trend;
import org.nuclearfog.twidda.model.Tweet;
@@ -37,23 +41,23 @@ import java.util.TreeMap;
public class AppDatabase {
// Tweet status bits
- static final int FAV_MASK = 1; // tweet is favored by user
- static final int RTW_MASK = 1 << 1; // tweet is retweeted by user
- static final int HOM_MASK = 1 << 2; // tweet is from home timeline
- static final int MEN_MASK = 1 << 3; // tweet is from mention timeline
- static final int UTW_MASK = 1 << 4; // tweet is from an users timeline
- static final int RPL_MASK = 1 << 5; // tweet is from a reply timeline
- static final int MEDIA_IMAGE_MASK = 1 << 6; // tweet contains images
- static final int MEDIA_VIDEO_MASK = 2 << 6; // tweet contains a video
- static final int MEDIA_ANGIF_MASK = 3 << 6; // tweet contains an animation
- static final int MEDIA_SENS_MASK = 1 << 8; // tweet contains sensitive media
+ public static final int FAV_MASK = 1; // tweet is favored by user
+ public static final int RTW_MASK = 1 << 1; // tweet is retweeted by user
+ public static final int HOM_MASK = 1 << 2; // tweet is from home timeline
+ public static final int MEN_MASK = 1 << 3; // tweet is from mention timeline
+ public static final int UTW_MASK = 1 << 4; // tweet is from an users timeline
+ public static final int RPL_MASK = 1 << 5; // tweet is from a reply timeline
+ public static final int MEDIA_IMAGE_MASK = 1 << 6; // tweet contains images
+ public static final int MEDIA_VIDEO_MASK = 2 << 6; // tweet contains a video
+ public static final int MEDIA_ANGIF_MASK = 3 << 6; // tweet contains an animation
+ public static final int MEDIA_SENS_MASK = 1 << 8; // tweet contains sensitive media
// user status bits
- static final int VER_MASK = 1; // user is verified
- static final int LCK_MASK = 1 << 1; // user is private
- static final int FRQ_MASK = 1 << 2; // a follow request is pending
- static final int EXCL_USR = 1 << 3; // user excluded from mention timeline
- static final int DEF_IMG = 1 << 4; // user has a default profile image
+ public static final int VER_MASK = 1; // user is verified
+ public static final int LCK_MASK = 1 << 1; // user is private
+ public static final int FRQ_MASK = 1 << 2; // a follow request is pending
+ public static final int EXCL_USR = 1 << 3; // user excluded from mention timeline
+ public static final int DEF_IMG = 1 << 4; // user has a default profile image
/**
* query to create tweet table with user and register columns
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/GlobalSettings.java b/app/src/main/java/org/nuclearfog/twidda/database/GlobalSettings.java
index 24fa2e8f..578cefc1 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/GlobalSettings.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/GlobalSettings.java
@@ -15,6 +15,7 @@ import android.graphics.Typeface;
import androidx.annotation.NonNull;
+import org.nuclearfog.twidda.database.impl.LocationImpl;
import org.nuclearfog.twidda.model.Location;
import java.util.LinkedList;
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/AccountImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/impl/AccountImpl.java
similarity index 85%
rename from app/src/main/java/org/nuclearfog/twidda/database/AccountImpl.java
rename to app/src/main/java/org/nuclearfog/twidda/database/impl/AccountImpl.java
index da2d3b59..bfd15fa4 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/AccountImpl.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/impl/AccountImpl.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.database;
+package org.nuclearfog.twidda.database.impl;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -10,8 +10,9 @@ import org.nuclearfog.twidda.model.User;
* database implementation of account
*
* @author nuclearfog
+ *
*/
-class AccountImpl implements Account {
+public class AccountImpl implements Account {
/**
* id of the user
@@ -31,7 +32,7 @@ class AccountImpl implements Account {
private User user;
- AccountImpl(long userId, long loginDate, String key1, String key2) {
+ public AccountImpl(long userId, long loginDate, String key1, String key2) {
this.userId = userId;
this.loginDate = loginDate;
this.key1 = key1;
@@ -78,7 +79,7 @@ class AccountImpl implements Account {
*
* @param user user associated with this account
*/
- void addUser(@Nullable User user) {
+ public void addUser(@Nullable User user) {
this.user = user;
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/DirectMessageImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/impl/DirectMessageImpl.java
similarity index 87%
rename from app/src/main/java/org/nuclearfog/twidda/database/DirectMessageImpl.java
rename to app/src/main/java/org/nuclearfog/twidda/database/impl/DirectMessageImpl.java
index cf7c5e8e..050e5893 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/DirectMessageImpl.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/impl/DirectMessageImpl.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.database;
+package org.nuclearfog.twidda.database.impl;
import android.database.Cursor;
import android.net.Uri;
@@ -15,7 +15,7 @@ import org.nuclearfog.twidda.model.User;
*
* @author nuclearfog
*/
-class DirectMessageImpl implements DirectMessage {
+public class DirectMessageImpl implements DirectMessage {
private long id;
private long time;
@@ -27,7 +27,7 @@ class DirectMessageImpl implements DirectMessage {
private String media;
- DirectMessageImpl(Cursor cursor) {
+ public DirectMessageImpl(Cursor cursor) {
text = cursor.getString(cursor.getColumnIndexOrThrow(MessageTable.MESSAGE));
time = cursor.getLong(cursor.getColumnIndexOrThrow(MessageTable.SINCE));
id = cursor.getLong(cursor.getColumnIndexOrThrow(MessageTable.ID));
@@ -82,22 +82,22 @@ class DirectMessageImpl implements DirectMessage {
return "from:" + sender + " to:" + receiver + " message:\"" + text + "\"";
}
- void setSender(User sender) {
+ public void setSender(User sender) {
this.sender = sender;
}
- void setReceiver(User receiver) {
+ public void setReceiver(User receiver) {
this.receiver = receiver;
}
- long getSenderId() {
+ public long getSenderId() {
return senderId;
}
- long getReceiverId() {
+ public long getReceiverId() {
return receiverId;
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/LocationImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/impl/LocationImpl.java
similarity index 85%
rename from app/src/main/java/org/nuclearfog/twidda/database/LocationImpl.java
rename to app/src/main/java/org/nuclearfog/twidda/database/impl/LocationImpl.java
index cdd6abd4..878697a7 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/LocationImpl.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/impl/LocationImpl.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.database;
+package org.nuclearfog.twidda.database.impl;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -10,7 +10,7 @@ import org.nuclearfog.twidda.model.Location;
*
* @author nuclearfog
*/
-class LocationImpl implements Location {
+public class LocationImpl implements Location {
private int id;
@@ -22,7 +22,7 @@ class LocationImpl implements Location {
* @param placeName name of locale
* @param worldId woe id
*/
- LocationImpl(String placeName, int worldId) {
+ public LocationImpl(String placeName, int worldId) {
this.name = placeName;
this.id = worldId;
}
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/TrendImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/impl/TrendImpl.java
similarity index 83%
rename from app/src/main/java/org/nuclearfog/twidda/database/TrendImpl.java
rename to app/src/main/java/org/nuclearfog/twidda/database/impl/TrendImpl.java
index c53ef946..212820f7 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/TrendImpl.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/impl/TrendImpl.java
@@ -1,9 +1,10 @@
-package org.nuclearfog.twidda.database;
+package org.nuclearfog.twidda.database.impl;
import android.database.Cursor;
import androidx.annotation.NonNull;
+import org.nuclearfog.twidda.database.DatabaseAdapter;
import org.nuclearfog.twidda.model.Trend;
/**
@@ -11,14 +12,14 @@ import org.nuclearfog.twidda.model.Trend;
*
* @author nuclearfog
*/
-class TrendImpl implements Trend {
+public class TrendImpl implements Trend {
private String name;
private int range;
private int rank;
- TrendImpl(Cursor cursor) {
+ public TrendImpl(Cursor cursor) {
name = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseAdapter.TrendTable.TREND));
range = cursor.getInt(cursor.getColumnIndexOrThrow(DatabaseAdapter.TrendTable.VOL));
rank = cursor.getInt(cursor.getColumnIndexOrThrow(DatabaseAdapter.TrendTable.INDEX));
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/impl/TweetImpl.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java
rename to app/src/main/java/org/nuclearfog/twidda/database/impl/TweetImpl.java
index 90462921..089752d1 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/impl/TweetImpl.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.database;
+package org.nuclearfog.twidda.database.impl;
import static org.nuclearfog.twidda.database.AppDatabase.FAV_MASK;
import static org.nuclearfog.twidda.database.AppDatabase.MEDIA_ANGIF_MASK;
@@ -14,6 +14,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.backend.utils.StringTools;
+import org.nuclearfog.twidda.database.DatabaseAdapter;
import org.nuclearfog.twidda.model.Tweet;
import org.nuclearfog.twidda.model.User;
@@ -24,7 +25,7 @@ import java.util.regex.Pattern;
*
* @author nuclearfog
*/
-class TweetImpl implements Tweet {
+public class TweetImpl implements Tweet {
private static final long serialVersionUID = -5957556706939766801L;
@@ -54,7 +55,7 @@ class TweetImpl implements Tweet {
private boolean sensitive;
- TweetImpl(Cursor cursor, long currentUserId) {
+ public TweetImpl(Cursor cursor, long currentUserId) {
author = new UserImpl(cursor, currentUserId);
time = cursor.getLong(cursor.getColumnIndexOrThrow(DatabaseAdapter.TweetTable.SINCE));
text = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseAdapter.TweetTable.TWEET));
@@ -212,7 +213,7 @@ class TweetImpl implements Tweet {
*
* @return ID of the
*/
- long getEmbeddedTweetId() {
+ public long getEmbeddedTweetId() {
return embeddedId;
}
@@ -221,7 +222,7 @@ class TweetImpl implements Tweet {
*
* @param embedded embedded tweet
*/
- void addEmbeddedTweet(Tweet embedded) {
+ public void addEmbeddedTweet(Tweet embedded) {
this.embedded = embedded;
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/nuclearfog/twidda/database/UserImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/impl/UserImpl.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/database/UserImpl.java
rename to app/src/main/java/org/nuclearfog/twidda/database/impl/UserImpl.java
index 252031f0..dbd8f1d1 100644
--- a/app/src/main/java/org/nuclearfog/twidda/database/UserImpl.java
+++ b/app/src/main/java/org/nuclearfog/twidda/database/impl/UserImpl.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.database;
+package org.nuclearfog.twidda.database.impl;
import static org.nuclearfog.twidda.database.AppDatabase.DEF_IMG;
import static org.nuclearfog.twidda.database.AppDatabase.FRQ_MASK;
@@ -10,6 +10,7 @@ import android.database.Cursor;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import org.nuclearfog.twidda.database.DatabaseAdapter;
import org.nuclearfog.twidda.model.User;
/**
@@ -17,7 +18,7 @@ import org.nuclearfog.twidda.model.User;
*
* @author nuclearfog
*/
-class UserImpl implements User {
+public class UserImpl implements User {
private static final long serialVersionUID = 2367055336838212570L;
@@ -41,7 +42,7 @@ class UserImpl implements User {
private boolean defaultImage;
- UserImpl(Cursor cursor, long currentUserId) {
+ public UserImpl(Cursor cursor, long currentUserId) {
id = cursor.getLong(cursor.getColumnIndexOrThrow(DatabaseAdapter.UserTable.ID));
username = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseAdapter.UserTable.USERNAME));
screenName = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseAdapter.UserTable.SCREENNAME));
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/AccountActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/AccountActivity.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/activities/AccountActivity.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/AccountActivity.java
index 62c4e3f1..ff2566e7 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/AccountActivity.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/AccountActivity.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import android.content.Context;
import android.content.Intent;
@@ -16,8 +16,8 @@ import androidx.fragment.app.FragmentTransaction;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.fragments.AccountFragment;
-import org.nuclearfog.twidda.fragments.ListFragment;
+import org.nuclearfog.twidda.ui.fragments.AccountFragment;
+import org.nuclearfog.twidda.ui.fragments.ListFragment;
/**
* account manager activity
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/AppSettings.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/AppSettings.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/activities/AppSettings.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/AppSettings.java
index 97ce88c9..be9f8de9 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/AppSettings.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/AppSettings.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
import static android.view.View.GONE;
import static android.view.View.OnClickListener;
import static android.view.View.VISIBLE;
-import static org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
+import static org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
import android.app.Dialog;
import android.content.Context;
@@ -46,16 +46,16 @@ import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.FontAdapter;
import org.nuclearfog.twidda.adapter.LocationAdapter;
import org.nuclearfog.twidda.adapter.ScaleAdapter;
-import org.nuclearfog.twidda.backend.LocationLoader;
+import org.nuclearfog.twidda.backend.async.LocationLoader;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.database.AccountDatabase;
import org.nuclearfog.twidda.database.DatabaseAdapter;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
-import org.nuclearfog.twidda.dialog.InfoDialog;
-import org.nuclearfog.twidda.dialog.LicenseDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.InfoDialog;
+import org.nuclearfog.twidda.ui.dialogs.LicenseDialog;
import org.nuclearfog.twidda.model.Location;
import java.util.List;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/DirectMessage.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/DirectMessage.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/activities/DirectMessage.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/DirectMessage.java
index 5833709f..12543824 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/DirectMessage.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/DirectMessage.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import android.content.Context;
import android.content.Intent;
@@ -16,7 +16,7 @@ import androidx.fragment.app.FragmentTransaction;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.fragments.MessageFragment;
+import org.nuclearfog.twidda.ui.fragments.MessageFragment;
/**
* Activity for the direct message page of the current user
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/ImageViewer.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/ImageViewer.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/activities/ImageViewer.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/ImageViewer.java
index aa3a292d..b728417c 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/ImageViewer.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/ImageViewer.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
import static android.view.View.INVISIBLE;
@@ -18,7 +18,7 @@ import androidx.recyclerview.widget.RecyclerView;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.ImageAdapter;
import org.nuclearfog.twidda.adapter.ImageAdapter.OnImageClickListener;
-import org.nuclearfog.twidda.backend.ImageLoader;
+import org.nuclearfog.twidda.backend.async.ImageLoader;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.database.GlobalSettings;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/LoginActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/LoginActivity.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/activities/LoginActivity.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/LoginActivity.java
index 81db2b29..22f287bc 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/LoginActivity.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/LoginActivity.java
@@ -1,10 +1,10 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.content.Intent.ACTION_VIEW;
import static android.os.AsyncTask.Status.RUNNING;
import static android.widget.Toast.LENGTH_LONG;
import static android.widget.Toast.LENGTH_SHORT;
-import static org.nuclearfog.twidda.activities.AccountActivity.KEY_DISABLE_SELECTOR;
+import static org.nuclearfog.twidda.ui.activities.AccountActivity.KEY_DISABLE_SELECTOR;
import android.content.ActivityNotFoundException;
import android.content.Context;
@@ -26,7 +26,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.Registration;
+import org.nuclearfog.twidda.backend.async.Registration;
import org.nuclearfog.twidda.backend.api.Twitter;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/MainActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/activities/MainActivity.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java
index e5ac7b07..eb4aa37c 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/MainActivity.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java
@@ -1,7 +1,7 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
-import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY;
-import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_ID;
+import static org.nuclearfog.twidda.ui.activities.SearchPage.KEY_SEARCH_QUERY;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.KEY_PROFILE_ID;
import android.app.Dialog;
import android.content.Context;
@@ -27,11 +27,11 @@ import com.google.android.material.tabs.TabLayout.Tab;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.FragmentAdapter;
-import org.nuclearfog.twidda.backend.LinkLoader;
+import org.nuclearfog.twidda.backend.async.LinkLoader;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ProgressDialog;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
/**
* Main Activity of the App
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/MediaActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MediaActivity.java
similarity index 99%
rename from app/src/main/java/org/nuclearfog/twidda/activities/MediaActivity.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/MediaActivity.java
index ce21122b..ab70023a 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/MediaActivity.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MediaActivity.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
@@ -36,7 +36,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.ImageSaver;
+import org.nuclearfog.twidda.backend.async.ImageSaver;
import java.io.File;
import java.io.FileOutputStream;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/MessageEditor.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MessageEditor.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/activities/MessageEditor.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/MessageEditor.java
index c790da05..4abb0cd1 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/MessageEditor.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MessageEditor.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
import static android.view.View.GONE;
@@ -22,15 +22,15 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.MessageUpdater;
+import org.nuclearfog.twidda.backend.async.MessageUpdater;
import org.nuclearfog.twidda.backend.api.holder.DirectmessageUpdate;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
-import org.nuclearfog.twidda.dialog.ProgressDialog;
-import org.nuclearfog.twidda.dialog.ProgressDialog.OnProgressStopListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog.OnProgressStopListener;
/**
* Direct message popup activity
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/ProfileEditor.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileEditor.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/activities/ProfileEditor.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileEditor.java
index d6c4c289..827d184c 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/ProfileEditor.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileEditor.java
@@ -1,9 +1,9 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
-import static org.nuclearfog.twidda.activities.UserProfile.TOOLBAR_TRANSPARENCY;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.TOOLBAR_TRANSPARENCY;
import static org.nuclearfog.twidda.database.GlobalSettings.BANNER_IMG_MID_RES;
import static org.nuclearfog.twidda.database.GlobalSettings.PROFILE_IMG_HIGH_RES;
@@ -34,17 +34,17 @@ import com.squareup.picasso.Callback;
import com.squareup.picasso.Picasso;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.UserUpdater;
+import org.nuclearfog.twidda.backend.async.UserUpdater;
import org.nuclearfog.twidda.backend.api.holder.ProfileUpdate;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.backend.utils.PicassoBuilder;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
-import org.nuclearfog.twidda.dialog.ProgressDialog;
-import org.nuclearfog.twidda.dialog.ProgressDialog.OnProgressStopListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog.OnProgressStopListener;
import org.nuclearfog.twidda.model.User;
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/SearchPage.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/SearchPage.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/activities/SearchPage.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/SearchPage.java
index dada4f17..7c599e6e 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/SearchPage.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/SearchPage.java
@@ -1,6 +1,6 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
-import static org.nuclearfog.twidda.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
+import static org.nuclearfog.twidda.ui.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
import android.content.Context;
import android.content.Intent;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/TweetActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/TweetActivity.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/activities/TweetActivity.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/TweetActivity.java
index 253080fd..1ef3d17f 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/TweetActivity.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/TweetActivity.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
import static android.view.View.GONE;
@@ -6,17 +6,17 @@ import static android.view.View.OnClickListener;
import static android.view.View.OnLongClickListener;
import static android.view.View.VISIBLE;
import static android.widget.Toast.LENGTH_SHORT;
-import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY;
-import static org.nuclearfog.twidda.activities.TweetEditor.KEY_TWEETPOPUP_REPLYID;
-import static org.nuclearfog.twidda.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
-import static org.nuclearfog.twidda.activities.UserDetail.KEY_USERDETAIL_ID;
-import static org.nuclearfog.twidda.activities.UserDetail.KEY_USERDETAIL_MODE;
-import static org.nuclearfog.twidda.activities.UserDetail.USERLIST_FAVORIT;
-import static org.nuclearfog.twidda.activities.UserDetail.USERLIST_RETWEETS;
-import static org.nuclearfog.twidda.fragments.TweetFragment.KEY_FRAG_TWEET_ID;
-import static org.nuclearfog.twidda.fragments.TweetFragment.KEY_FRAG_TWEET_MODE;
-import static org.nuclearfog.twidda.fragments.TweetFragment.KEY_FRAG_TWEET_SEARCH;
-import static org.nuclearfog.twidda.fragments.TweetFragment.TWEET_FRAG_ANSWER;
+import static org.nuclearfog.twidda.ui.activities.SearchPage.KEY_SEARCH_QUERY;
+import static org.nuclearfog.twidda.ui.activities.TweetEditor.KEY_TWEETPOPUP_REPLYID;
+import static org.nuclearfog.twidda.ui.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.KEY_USERDETAIL_ID;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.KEY_USERDETAIL_MODE;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.USERLIST_FAVORIT;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.USERLIST_RETWEETS;
+import static org.nuclearfog.twidda.ui.fragments.TweetFragment.KEY_FRAG_TWEET_ID;
+import static org.nuclearfog.twidda.ui.fragments.TweetFragment.KEY_FRAG_TWEET_MODE;
+import static org.nuclearfog.twidda.ui.fragments.TweetFragment.KEY_FRAG_TWEET_SEARCH;
+import static org.nuclearfog.twidda.ui.fragments.TweetFragment.TWEET_FRAG_ANSWER;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
@@ -48,18 +48,18 @@ import org.nuclearfog.tag.Tagger;
import org.nuclearfog.tag.Tagger.OnTagClickListener;
import org.nuclearfog.textviewtool.LinkAndScrollMovement;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.TweetAction;
-import org.nuclearfog.twidda.backend.TweetAction.Action;
+import org.nuclearfog.twidda.backend.async.TweetAction;
+import org.nuclearfog.twidda.backend.async.TweetAction.Action;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.backend.utils.PicassoBuilder;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
-import org.nuclearfog.twidda.dialog.LinkDialog;
-import org.nuclearfog.twidda.fragments.TweetFragment;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.LinkDialog;
+import org.nuclearfog.twidda.ui.fragments.TweetFragment;
import org.nuclearfog.twidda.model.Tweet;
import org.nuclearfog.twidda.model.User;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/TweetEditor.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/TweetEditor.java
similarity index 96%
rename from app/src/main/java/org/nuclearfog/twidda/activities/TweetEditor.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/TweetEditor.java
index f97a98a9..68f6a514 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/TweetEditor.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/TweetEditor.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
import static android.view.View.GONE;
@@ -25,17 +25,17 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.TweetUpdater;
+import org.nuclearfog.twidda.backend.async.TweetUpdater;
import org.nuclearfog.twidda.backend.api.holder.TweetUpdate;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.backend.utils.StringTools;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
-import org.nuclearfog.twidda.dialog.ProgressDialog;
-import org.nuclearfog.twidda.dialog.ProgressDialog.OnProgressStopListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog.OnProgressStopListener;
/**
* Tweet editor activity. Media files and location can be attached to a tweet.
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserDetail.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserDetail.java
similarity index 87%
rename from app/src/main/java/org/nuclearfog/twidda/activities/UserDetail.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/UserDetail.java
index 61c8d182..f477619e 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/UserDetail.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserDetail.java
@@ -1,11 +1,11 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
-import static org.nuclearfog.twidda.fragments.UserFragment.KEY_FRAG_USER_ID;
-import static org.nuclearfog.twidda.fragments.UserFragment.KEY_FRAG_USER_MODE;
-import static org.nuclearfog.twidda.fragments.UserFragment.USER_FRAG_FAVORIT;
-import static org.nuclearfog.twidda.fragments.UserFragment.USER_FRAG_FOLLOWS;
-import static org.nuclearfog.twidda.fragments.UserFragment.USER_FRAG_FRIENDS;
-import static org.nuclearfog.twidda.fragments.UserFragment.USER_FRAG_RETWEET;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_USER_ID;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.KEY_FRAG_USER_MODE;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_FAVORIT;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_FOLLOWS;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_FRIENDS;
+import static org.nuclearfog.twidda.ui.fragments.UserFragment.USER_FRAG_RETWEET;
import android.content.Context;
import android.content.Intent;
@@ -20,7 +20,7 @@ import androidx.fragment.app.FragmentTransaction;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.fragments.UserFragment;
+import org.nuclearfog.twidda.ui.fragments.UserFragment;
/**
* Activity to show a list of twitter users
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserExclude.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserExclude.java
similarity index 94%
rename from app/src/main/java/org/nuclearfog/twidda/activities/UserExclude.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/UserExclude.java
index 05dd38f5..d16cc43f 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/UserExclude.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserExclude.java
@@ -1,9 +1,9 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.backend.UserExcludeLoader.Mode.BLOCK_USER;
-import static org.nuclearfog.twidda.backend.UserExcludeLoader.Mode.MUTE_USER;
-import static org.nuclearfog.twidda.backend.UserExcludeLoader.Mode.REFRESH;
+import static org.nuclearfog.twidda.backend.async.UserExcludeLoader.Mode.BLOCK_USER;
+import static org.nuclearfog.twidda.backend.async.UserExcludeLoader.Mode.MUTE_USER;
+import static org.nuclearfog.twidda.backend.async.UserExcludeLoader.Mode.REFRESH;
import android.content.Context;
import android.graphics.Color;
@@ -26,7 +26,7 @@ import com.google.android.material.tabs.TabLayout.Tab;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.FragmentAdapter;
-import org.nuclearfog.twidda.backend.UserExcludeLoader;
+import org.nuclearfog.twidda.backend.async.UserExcludeLoader;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.database.GlobalSettings;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserProfile.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/UserProfile.java
index 3b39b65a..c3633f5c 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserProfile.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.content.Intent.ACTION_VIEW;
import static android.os.AsyncTask.Status.RUNNING;
@@ -6,25 +6,25 @@ import static android.view.View.GONE;
import static android.view.View.OnClickListener;
import static android.view.View.VISIBLE;
import static android.widget.Toast.LENGTH_SHORT;
-import static org.nuclearfog.twidda.activities.MessageEditor.KEY_DM_PREFIX;
-import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_ID;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_NAME;
-import static org.nuclearfog.twidda.activities.TweetActivity.LINK_PATTERN;
-import static org.nuclearfog.twidda.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
-import static org.nuclearfog.twidda.activities.UserDetail.KEY_USERDETAIL_ID;
-import static org.nuclearfog.twidda.activities.UserDetail.KEY_USERDETAIL_MODE;
-import static org.nuclearfog.twidda.activities.UserDetail.USERLIST_FOLLOWER;
-import static org.nuclearfog.twidda.activities.UserDetail.USERLIST_FRIENDS;
-import static org.nuclearfog.twidda.activities.Userlists.KEY_USERLIST_OWNER_ID;
-import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_BLOCK;
-import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_FOLLOW;
-import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_MUTE;
-import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_UNBLOCK;
-import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_UNFOLLOW;
-import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_UNMUTE;
-import static org.nuclearfog.twidda.backend.UserAction.Action.PROFILE_DB;
-import static org.nuclearfog.twidda.backend.UserAction.Action.PROFILE_lOAD;
+import static org.nuclearfog.twidda.ui.activities.MessageEditor.KEY_DM_PREFIX;
+import static org.nuclearfog.twidda.ui.activities.SearchPage.KEY_SEARCH_QUERY;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_ID;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_NAME;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.LINK_PATTERN;
+import static org.nuclearfog.twidda.ui.activities.TweetEditor.KEY_TWEETPOPUP_TEXT;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.KEY_USERDETAIL_ID;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.KEY_USERDETAIL_MODE;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.USERLIST_FOLLOWER;
+import static org.nuclearfog.twidda.ui.activities.UserDetail.USERLIST_FRIENDS;
+import static org.nuclearfog.twidda.ui.activities.Userlists.KEY_USERLIST_OWNER_ID;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.ACTION_BLOCK;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.ACTION_FOLLOW;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.ACTION_MUTE;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.ACTION_UNBLOCK;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.ACTION_UNFOLLOW;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.ACTION_UNMUTE;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.PROFILE_DB;
+import static org.nuclearfog.twidda.backend.async.UserAction.Action.PROFILE_lOAD;
import static org.nuclearfog.twidda.database.GlobalSettings.PROFILE_IMG_HIGH_RES;
import android.content.ActivityNotFoundException;
@@ -62,14 +62,14 @@ import org.nuclearfog.tag.Tagger.OnTagClickListener;
import org.nuclearfog.textviewtool.LinkAndScrollMovement;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.FragmentAdapter;
-import org.nuclearfog.twidda.backend.UserAction;
+import org.nuclearfog.twidda.backend.async.UserAction;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.backend.utils.PicassoBuilder;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
import org.nuclearfog.twidda.model.Relation;
import org.nuclearfog.twidda.model.User;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserlistActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserlistActivity.java
similarity index 95%
rename from app/src/main/java/org/nuclearfog/twidda/activities/UserlistActivity.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/UserlistActivity.java
index 66dcf957..09c102e2 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/UserlistActivity.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserlistActivity.java
@@ -1,8 +1,8 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.activities.UserlistEditor.KEY_LIST_EDITOR_DATA;
-import static org.nuclearfog.twidda.backend.ListManager.Action.ADD_USER;
+import static org.nuclearfog.twidda.ui.activities.UserlistEditor.KEY_LIST_EDITOR_DATA;
+import static org.nuclearfog.twidda.backend.async.ListManager.Action.ADD_USER;
import android.content.Context;
import android.content.Intent;
@@ -27,15 +27,15 @@ import com.google.android.material.tabs.TabLayout.Tab;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.FragmentAdapter;
-import org.nuclearfog.twidda.backend.ListAction;
-import org.nuclearfog.twidda.backend.ListManager;
-import org.nuclearfog.twidda.backend.ListManager.ListManagerCallback;
+import org.nuclearfog.twidda.backend.async.ListAction;
+import org.nuclearfog.twidda.backend.async.ListManager;
+import org.nuclearfog.twidda.backend.async.ListManager.ListManagerCallback;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
import org.nuclearfog.twidda.model.UserList;
import java.util.regex.Pattern;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserlistEditor.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserlistEditor.java
similarity index 93%
rename from app/src/main/java/org/nuclearfog/twidda/activities/UserlistEditor.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/UserlistEditor.java
index 09631b36..2cdd7890 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/UserlistEditor.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/UserlistEditor.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.os.AsyncTask.Status.RUNNING;
@@ -19,15 +19,15 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.ListUpdater;
+import org.nuclearfog.twidda.backend.async.ListUpdater;
import org.nuclearfog.twidda.backend.api.holder.UserlistUpdate;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
-import org.nuclearfog.twidda.dialog.ProgressDialog;
-import org.nuclearfog.twidda.dialog.ProgressDialog.OnProgressStopListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
+import org.nuclearfog.twidda.ui.dialogs.ProgressDialog.OnProgressStopListener;
import org.nuclearfog.twidda.model.UserList;
/**
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/Userlists.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/Userlists.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/activities/Userlists.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/Userlists.java
index 73b9950c..0844793a 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/Userlists.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/Userlists.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import android.content.Context;
import android.content.Intent;
diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/VideoViewer.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/VideoViewer.java
similarity index 97%
rename from app/src/main/java/org/nuclearfog/twidda/activities/VideoViewer.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/activities/VideoViewer.java
index acc3fd4d..4d184193 100644
--- a/app/src/main/java/org/nuclearfog/twidda/activities/VideoViewer.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/VideoViewer.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.activities;
+package org.nuclearfog.twidda.ui.activities;
import static android.media.MediaPlayer.MEDIA_ERROR_UNKNOWN;
import static android.media.MediaPlayer.MEDIA_INFO_BUFFERING_END;
@@ -41,13 +41,13 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.backend.SeekbarUpdater;
+import org.nuclearfog.twidda.backend.async.SeekbarUpdater;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.StringTools;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
/**
* Media viewer activity for images and videos
diff --git a/app/src/main/java/org/nuclearfog/twidda/dialog/ConfirmDialog.java b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/ConfirmDialog.java
similarity index 99%
rename from app/src/main/java/org/nuclearfog/twidda/dialog/ConfirmDialog.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/dialogs/ConfirmDialog.java
index 689adbd4..92a90da4 100644
--- a/app/src/main/java/org/nuclearfog/twidda/dialog/ConfirmDialog.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/ConfirmDialog.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.dialog;
+package org.nuclearfog.twidda.ui.dialogs;
import android.app.Dialog;
import android.content.Context;
diff --git a/app/src/main/java/org/nuclearfog/twidda/dialog/InfoDialog.java b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/InfoDialog.java
similarity index 94%
rename from app/src/main/java/org/nuclearfog/twidda/dialog/InfoDialog.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/dialogs/InfoDialog.java
index cada23d9..ce77e8f4 100644
--- a/app/src/main/java/org/nuclearfog/twidda/dialog/InfoDialog.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/InfoDialog.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.dialog;
+package org.nuclearfog.twidda.ui.dialogs;
import android.app.Dialog;
import android.content.Context;
diff --git a/app/src/main/java/org/nuclearfog/twidda/dialog/LicenseDialog.java b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/LicenseDialog.java
similarity index 94%
rename from app/src/main/java/org/nuclearfog/twidda/dialog/LicenseDialog.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/dialogs/LicenseDialog.java
index 37dd892c..3dabc3e6 100644
--- a/app/src/main/java/org/nuclearfog/twidda/dialog/LicenseDialog.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/LicenseDialog.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.dialog;
+package org.nuclearfog.twidda.ui.dialogs;
import android.app.Dialog;
import android.content.Context;
diff --git a/app/src/main/java/org/nuclearfog/twidda/dialog/LinkDialog.java b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/LinkDialog.java
similarity index 99%
rename from app/src/main/java/org/nuclearfog/twidda/dialog/LinkDialog.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/dialogs/LinkDialog.java
index 9f0aa467..5a58a75b 100644
--- a/app/src/main/java/org/nuclearfog/twidda/dialog/LinkDialog.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/LinkDialog.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.dialog;
+package org.nuclearfog.twidda.ui.dialogs;
import static android.widget.Toast.LENGTH_SHORT;
import static com.squareup.picasso.NetworkPolicy.NO_STORE;
diff --git a/app/src/main/java/org/nuclearfog/twidda/dialog/ProgressDialog.java b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/ProgressDialog.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/dialog/ProgressDialog.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/dialogs/ProgressDialog.java
index 64bec3b8..33f1ee5b 100644
--- a/app/src/main/java/org/nuclearfog/twidda/dialog/ProgressDialog.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/dialogs/ProgressDialog.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.dialog;
+package org.nuclearfog.twidda.ui.dialogs;
import static android.view.View.VISIBLE;
import static android.view.Window.FEATURE_NO_TITLE;
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/AccountFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/AccountFragment.java
similarity index 90%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/AccountFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/AccountFragment.java
index b0bffeee..ad414116 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/AccountFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/AccountFragment.java
@@ -1,7 +1,7 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
+import static org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
import android.os.Bundle;
import android.view.View;
@@ -11,13 +11,13 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.activities.AccountActivity;
+import org.nuclearfog.twidda.ui.activities.AccountActivity;
import org.nuclearfog.twidda.adapter.AccountAdapter;
import org.nuclearfog.twidda.adapter.AccountAdapter.OnAccountClickListener;
-import org.nuclearfog.twidda.backend.AccountLoader;
+import org.nuclearfog.twidda.backend.async.AccountLoader;
import org.nuclearfog.twidda.database.GlobalSettings;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
import org.nuclearfog.twidda.model.Account;
import java.util.List;
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/ListFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/ListFragment.java
similarity index 98%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/ListFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/ListFragment.java
index 7fbb82bd..0da00fab 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/ListFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/ListFragment.java
@@ -1,4 +1,4 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import android.os.Bundle;
import android.view.LayoutInflater;
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/MessageFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/MessageFragment.java
similarity index 86%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/MessageFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/MessageFragment.java
index 3a12090c..26a7450f 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/MessageFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/MessageFragment.java
@@ -1,13 +1,13 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import static android.os.AsyncTask.Status.RUNNING;
import static android.widget.Toast.LENGTH_SHORT;
-import static org.nuclearfog.twidda.activities.MessageEditor.KEY_DM_PREFIX;
-import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_ID;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_NAME;
-import static org.nuclearfog.twidda.activities.TweetActivity.LINK_PATTERN;
-import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DATA;
+import static org.nuclearfog.twidda.ui.activities.MessageEditor.KEY_DM_PREFIX;
+import static org.nuclearfog.twidda.ui.activities.SearchPage.KEY_SEARCH_QUERY;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_ID;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_NAME;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.LINK_PATTERN;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.KEY_PROFILE_DATA;
import android.content.ActivityNotFoundException;
import android.content.Intent;
@@ -20,19 +20,19 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.activities.ImageViewer;
-import org.nuclearfog.twidda.activities.MessageEditor;
-import org.nuclearfog.twidda.activities.SearchPage;
-import org.nuclearfog.twidda.activities.TweetActivity;
-import org.nuclearfog.twidda.activities.UserProfile;
+import org.nuclearfog.twidda.ui.activities.ImageViewer;
+import org.nuclearfog.twidda.ui.activities.MessageEditor;
+import org.nuclearfog.twidda.ui.activities.SearchPage;
+import org.nuclearfog.twidda.ui.activities.TweetActivity;
+import org.nuclearfog.twidda.ui.activities.UserProfile;
import org.nuclearfog.twidda.adapter.MessageAdapter;
import org.nuclearfog.twidda.adapter.MessageAdapter.OnMessageClickListener;
-import org.nuclearfog.twidda.backend.MessageLoader;
+import org.nuclearfog.twidda.backend.async.MessageLoader;
import org.nuclearfog.twidda.backend.lists.Directmessages;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
import org.nuclearfog.twidda.model.DirectMessage;
/**
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/TrendFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/TrendFragment.java
similarity index 92%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/TrendFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/TrendFragment.java
index 73b5844e..2fd6965b 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/TrendFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/TrendFragment.java
@@ -1,7 +1,7 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY;
+import static org.nuclearfog.twidda.ui.activities.SearchPage.KEY_SEARCH_QUERY;
import android.content.Intent;
import android.os.Bundle;
@@ -10,10 +10,10 @@ import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.SearchPage;
+import org.nuclearfog.twidda.ui.activities.SearchPage;
import org.nuclearfog.twidda.adapter.TrendAdapter;
import org.nuclearfog.twidda.adapter.TrendAdapter.TrendClickListener;
-import org.nuclearfog.twidda.backend.TrendLoader;
+import org.nuclearfog.twidda.backend.async.TrendLoader;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.model.Trend;
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/TweetFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/TweetFragment.java
similarity index 96%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/TweetFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/TweetFragment.java
index bcd403b6..56184360 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/TweetFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/TweetFragment.java
@@ -1,7 +1,7 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_DATA;
+import static org.nuclearfog.twidda.ui.activities.TweetActivity.KEY_TWEET_DATA;
import android.content.Intent;
import android.os.Bundle;
@@ -10,11 +10,11 @@ import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.TweetActivity;
+import org.nuclearfog.twidda.ui.activities.TweetActivity;
import org.nuclearfog.twidda.adapter.TweetAdapter;
import org.nuclearfog.twidda.adapter.TweetAdapter.TweetClickListener;
-import org.nuclearfog.twidda.backend.TweetLoader;
-import org.nuclearfog.twidda.backend.TweetLoader.ListType;
+import org.nuclearfog.twidda.backend.async.TweetLoader;
+import org.nuclearfog.twidda.backend.async.TweetLoader.ListType;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.model.Tweet;
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/UserFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/UserFragment.java
similarity index 91%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/UserFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/UserFragment.java
index 7ca9c386..56e87917 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/UserFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/UserFragment.java
@@ -1,9 +1,9 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DATA;
-import static org.nuclearfog.twidda.backend.ListManager.Action.DEL_USER;
-import static org.nuclearfog.twidda.backend.UserLoader.NO_CURSOR;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.KEY_PROFILE_DATA;
+import static org.nuclearfog.twidda.backend.async.ListManager.Action.DEL_USER;
+import static org.nuclearfog.twidda.backend.async.UserLoader.NO_CURSOR;
import android.content.Intent;
import android.os.Bundle;
@@ -14,19 +14,19 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.nuclearfog.twidda.R;
-import org.nuclearfog.twidda.activities.UserProfile;
+import org.nuclearfog.twidda.ui.activities.UserProfile;
import org.nuclearfog.twidda.adapter.UserAdapter;
import org.nuclearfog.twidda.adapter.UserAdapter.UserClickListener;
-import org.nuclearfog.twidda.backend.ListManager;
-import org.nuclearfog.twidda.backend.ListManager.ListManagerCallback;
-import org.nuclearfog.twidda.backend.UserLoader;
-import org.nuclearfog.twidda.backend.UserLoader.Type;
+import org.nuclearfog.twidda.backend.async.ListManager;
+import org.nuclearfog.twidda.backend.async.ListManager.ListManagerCallback;
+import org.nuclearfog.twidda.backend.async.UserLoader;
+import org.nuclearfog.twidda.backend.async.UserLoader.Type;
import org.nuclearfog.twidda.backend.api.TwitterException;
import org.nuclearfog.twidda.backend.lists.Users;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
-import org.nuclearfog.twidda.dialog.ConfirmDialog;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.DialogType;
-import org.nuclearfog.twidda.dialog.ConfirmDialog.OnConfirmListener;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
+import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
import org.nuclearfog.twidda.model.User;
/**
diff --git a/app/src/main/java/org/nuclearfog/twidda/fragments/UserListFragment.java b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/UserListFragment.java
similarity index 92%
rename from app/src/main/java/org/nuclearfog/twidda/fragments/UserListFragment.java
rename to app/src/main/java/org/nuclearfog/twidda/ui/fragments/UserListFragment.java
index 9a42a124..e0e384ef 100644
--- a/app/src/main/java/org/nuclearfog/twidda/fragments/UserListFragment.java
+++ b/app/src/main/java/org/nuclearfog/twidda/ui/fragments/UserListFragment.java
@@ -1,9 +1,9 @@
-package org.nuclearfog.twidda.fragments;
+package org.nuclearfog.twidda.ui.fragments;
import static android.os.AsyncTask.Status.RUNNING;
-import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DATA;
-import static org.nuclearfog.twidda.activities.UserlistActivity.KEY_LIST_DATA;
-import static org.nuclearfog.twidda.backend.ListLoader.NO_CURSOR;
+import static org.nuclearfog.twidda.ui.activities.UserProfile.KEY_PROFILE_DATA;
+import static org.nuclearfog.twidda.ui.activities.UserlistActivity.KEY_LIST_DATA;
+import static org.nuclearfog.twidda.backend.async.ListLoader.NO_CURSOR;
import android.content.Intent;
import android.os.Bundle;
@@ -12,11 +12,11 @@ import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import org.nuclearfog.twidda.activities.UserProfile;
-import org.nuclearfog.twidda.activities.UserlistActivity;
+import org.nuclearfog.twidda.ui.activities.UserProfile;
+import org.nuclearfog.twidda.ui.activities.UserlistActivity;
import org.nuclearfog.twidda.adapter.UserlistAdapter;
import org.nuclearfog.twidda.adapter.UserlistAdapter.ListClickListener;
-import org.nuclearfog.twidda.backend.ListLoader;
+import org.nuclearfog.twidda.backend.async.ListLoader;
import org.nuclearfog.twidda.backend.lists.UserLists;
import org.nuclearfog.twidda.backend.utils.ErrorHandler;
import org.nuclearfog.twidda.model.User;
diff --git a/app/src/main/res/layout/dialog_app_info.xml b/app/src/main/res/layout/dialog_app_info.xml
index dee10b2a..0f366517 100644
--- a/app/src/main/res/layout/dialog_app_info.xml
+++ b/app/src/main/res/layout/dialog_app_info.xml
@@ -4,7 +4,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- tools:context=".dialog.InfoDialog">
+ tools:context=".ui.dialogs.InfoDialog">
+ tools:context=".ui.dialogs.ConfirmDialog">
\ No newline at end of file
+ tools:context=".ui.dialogs.LicenseDialog" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_link_preview.xml b/app/src/main/res/layout/dialog_link_preview.xml
index e28bd817..e90086a4 100644
--- a/app/src/main/res/layout/dialog_link_preview.xml
+++ b/app/src/main/res/layout/dialog_link_preview.xml
@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dialog_linkpreview_padding"
- tools:context=".dialog.LinkDialog">
+ tools:context=".ui.dialogs.LinkDialog">
+ tools:context=".ui.activities.ProfileEditor">
+ tools:context=".ui.activities.ImageViewer">
+ tools:context=".ui.activities.Userlists">
+ tools:context=".ui.activities.UserlistActivity">
+ tools:context=".ui.activities.LoginActivity">
+ tools:context=".ui.activities.MainActivity">
+ tools:context=".ui.activities.UserProfile">
+ tools:context=".ui.activities.SearchPage">
+ tools:context=".ui.activities.AppSettings">
+ tools:context=".ui.activities.TweetActivity">
+ tools:context=".ui.activities.UserExclude">
+ tools:context=".ui.activities.VideoViewer">
+ tools:context=".ui.activities.MessageEditor">
+ tools:context=".ui.activities.TweetEditor">
+ tools:context=".ui.activities.UserlistEditor">