added comments

This commit is contained in:
nuclearfog 2022-07-11 23:24:56 +02:00
parent 1ebfb03628
commit 9467a9e7f1
No known key found for this signature in database
GPG Key ID: AA0271FBE406DB98
20 changed files with 101 additions and 45 deletions

View File

@ -27,7 +27,7 @@ import org.nuclearfog.twidda.ui.fragments.ListFragment;
public class AccountActivity extends AppCompatActivity {
/**
* request login page
* request code to start {@link LoginActivity}
*/
private static final int REQUEST_LOGIN = 0xDF14;
@ -38,6 +38,7 @@ public class AccountActivity extends AppCompatActivity {
/**
* key to disable account selector option from menu
* value type is Boolean
*/
public static final String KEY_DISABLE_SELECTOR = "disable-acc-manager";

View File

@ -27,7 +27,7 @@ import org.nuclearfog.zoomview.ZoomView;
import java.io.File;
/**
* Activity to show online of local images
* Activity to show online and local images
*
* @author nuclearfog
*/
@ -35,11 +35,13 @@ public class ImageViewer extends MediaActivity implements OnImageClickListener {
/**
* key to add URI of the image (online or local)
* value type is {@link Uri}
*/
public static final String IMAGE_URIS = "image-uri";
/**
* key to define where the images are located (online or local)
* value type is Boolean
*/
public static final String IMAGE_DOWNLOAD = "image-download";

View File

@ -41,7 +41,8 @@ import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
public class MainActivity extends AppCompatActivity implements OnTabSelectedListener, OnQueryTextListener {
/**
* bundle key used to set the tab page
* key used to set the tab page
* vale type is Integer
*/
public static final String KEY_TAB_PAGE = "tab_pos";

View File

@ -33,14 +33,15 @@ import org.nuclearfog.twidda.ui.dialogs.ProgressDialog;
import org.nuclearfog.twidda.ui.dialogs.ProgressDialog.OnProgressStopListener;
/**
* Direct message popup activity
* Directmessage editor activity
*
* @author nuclearfog
*/
public class MessageEditor extends MediaActivity implements OnClickListener, OnConfirmListener, OnProgressStopListener {
/**
* key for the screen name if any
* key for the screenname if any
* value type is String
*/
public static final String KEY_DM_PREFIX = "dm_prefix";

View File

@ -58,16 +58,18 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, OnP
/**
* key to preload user data
* value is {@link User}
*/
public static final String KEY_PROFILE_DATA = "profile-editor-data";
/**
* key to update profile information
* value is {@link User}
*/
public static final String KEY_UPDATED_PROFILE = "profile-update";
/**
* return code to inform calling activity that profile information has changed
* return code used if profile information has changed
*/
public static final int RETURN_PROFILE_CHANGED = 0xF5C0E570;

View File

@ -37,6 +37,7 @@ public class SearchActivity extends AppCompatActivity implements OnTabSelectedLi
/**
* Key for the search query, required
* value type is String
*/
public static final String KEY_SEARCH_QUERY = "search_query";

View File

@ -88,28 +88,33 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
public static final int RETURN_TWEET_REMOVED = 0x8B03DB84;
/**
* bundle key for a {@link Tweet} value.
* key used for tweet information
* value type is {@link Tweet}
* If no tweet object exists, {@link #KEY_TWEET_ID} and {@link #KEY_TWEET_NAME} will be used instead
*/
public static final String KEY_TWEET_DATA = "tweet_data";
/**
* {@link Bundle} key for the Tweet ID value, alternative to {@link #KEY_TWEET_DATA}
* key for the Tweet ID value, alternative to {@link #KEY_TWEET_DATA}
* value type is Long
*/
public static final String KEY_TWEET_ID = "tweet_tweet_id";
/**
* {@link Bundle} key for the tweet author's name. alternative to {@link #KEY_TWEET_DATA}
* key for the tweet author's name. alternative to {@link #KEY_TWEET_DATA}
* value type is String
*/
public static final String KEY_TWEET_NAME = "tweet_author";
/**
* {@link Intent} key to return a tweet object with updated information
* key to return updated tweet information
* value type is {@link Tweet}
*/
public static final String INTENT_TWEET_UPDATE_DATA = "tweet_update_data";
/**
* @link Intent} key to return a tweet ID if this tweet was deleted
* key to return a tweet ID if this tweet was deleted
* value type is Long
*/
public static final String INTENT_TWEET_REMOVED_ID = "tweet_removed_id";

View File

@ -46,11 +46,13 @@ public class TweetEditor extends MediaActivity implements OnClickListener, OnPro
/**
* key for the replied tweet if any
* value type is Long
*/
public static final String KEY_TWEETPOPUP_REPLYID = "tweet_replyID";
/**
* key for the text added to the tweet if any
* value type is String
*/
public static final String KEY_TWEETPOPUP_TEXT = "tweet_text";

View File

@ -90,21 +90,25 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
/**
* Key for the user ID
* value type is Long
*/
public static final String KEY_PROFILE_ID = "profile_id";
/**
* key for user object
* value type is {@link User}
*/
public static final String KEY_PROFILE_DATA = "profile_data";
/**
* key to prevent this activity to reload profile information as they are up to date
* value type is Boolean
*/
public static final String KEY_PROFILE_DISABLE_RELOAD = "profile_no_reload";
/**
* key to send updated user data
* value type is {@link User}
*/
public static final String KEY_USER_UPDATE = "user_update";

View File

@ -51,21 +51,25 @@ public class UserlistActivity extends AppCompatActivity implements OnTabSelected
/**
* key to add list information
* value type is {@link UserList}
*/
public static final String KEY_LIST_DATA = "list_data";
/**
* alternative key to {@link #KEY_LIST_DATA} to download list information
* value type is Long
*/
public static final String KEY_LIST_ID = "list_id";
/**
* activity result key to return the ID of a removed list
* result key to return the ID of a removed list
* value type is {@link UserList}
*/
public static final String RESULT_REMOVED_LIST_ID = "removed-list-id";
/**
* result key to update an user list
* value type is {@link UserList}
*/
public static final String RESULT_UPDATE_LIST = "update-user-list";

View File

@ -38,12 +38,14 @@ import org.nuclearfog.twidda.ui.dialogs.ProgressDialog.OnProgressStopListener;
public class UserlistEditor extends AppCompatActivity implements OnClickListener, OnConfirmListener, OnProgressStopListener {
/**
* Key for the list ID of the list if an existing list should be updated
* Key for the list ID if an existing list should be updated
* value type is Long
*/
public static final String KEY_LIST_EDITOR_DATA = "list_edit_data";
/**
* Key for updated list information
* value type is {@link UserList}
*/
public static final String KEY_UPDATED_USERLIST = "userlist-update";

View File

@ -29,11 +29,13 @@ public class UserlistsActivity extends AppCompatActivity implements TabLayout.On
/**
* Key for the ID the list owner
* value type is Long
*/
public static final String KEY_USERLIST_OWNER_ID = "userlist-owner-id";
/**
* alternative key for the screen name of the owner
* value type is String
*/
public static final String KEY_USERLIST_OWNER_NAME = "userlist-owner-name";

View File

@ -41,40 +41,51 @@ public class UsersActivity extends AppCompatActivity implements OnTabSelectedLis
/**
* type of users to get from twitter
* {@link #USERLIST_FRIENDS}, {@link #USERLIST_FOLLOWER}, {@link #USERLIST_RETWEETS}
* {@link #USERLIST_FRIENDS}, {@link #USERLIST_FOLLOWER}, {@link #USERLIST_RETWEETS},
* {@link #USERLIST_FAVORIT}, {@link #USERLIST_EXCLUDED_USERS} or {@link #USERLIST_REQUESTS},
*/
public static final String KEY_USERDETAIL_MODE = "userlist_mode";
/**
* ID of a userlist, an user or a tweet to get the users from
* value type is Long
*/
public static final String KEY_USERDETAIL_ID = "userlist_id";
/**
* friends of an user, requires user ID
* @see #KEY_USERDETAIL_MODE
*/
public static final int USERLIST_FRIENDS = 0xDF893242;
/**
* follower of an user, requires user ID
* @see #KEY_USERDETAIL_MODE
*/
public static final int USERLIST_FOLLOWER = 0xA89F5968;
/**
* user retweeting a tweet, requires tweet ID
* @see #KEY_USERDETAIL_MODE
*/
public static final int USERLIST_RETWEETS = 0x19F582E;
/**
* user favoriting/liking a tweet, requires tweet ID
* @see #KEY_USERDETAIL_MODE
*/
public static final int USERLIST_FAVORIT = 0x9bcc3f99;
/**
* setup list to show excluded (muted, blocked) users
* @see #KEY_USERDETAIL_MODE
*/
public static final int USERLIST_EXCLUDED_USERS = 0x896a786;
/**
* setup list to show incoming & outgoing follow requests
* @see #KEY_USERDETAIL_MODE
*/
public static final int USERLIST_REQUESTS = 0x0948693;
private GlobalSettings settings;

View File

@ -59,11 +59,13 @@ public class VideoViewer extends MediaActivity implements OnSeekBarChangeListene
/**
* key for an Uri array with local links
* value type is {@link Uri}
*/
public static final String VIDEO_URI = "media_uri";
/**
* Key to enable extra layouts for a video
* value type is Boolean
*/
public static final String ENABLE_VIDEO_CONTROLS = "enable_controls";

View File

@ -23,8 +23,7 @@ import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
import java.util.List;
/**
* fragment class of the {@link AccountActivity}
* all registered user accounts are listed here
* fragment class to show registered accounts
*
* @author nuclearfog
*/

View File

@ -36,7 +36,7 @@ import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
/**
* Fragment class for direct message lists
* Fragment class to show a list of directmessages
*
* @author nuclearfog
*/

View File

@ -20,7 +20,7 @@ import org.nuclearfog.twidda.ui.activities.SearchActivity;
import java.util.List;
/**
* Fragment class for trend lists
* Fragment class to show a list of Twitter trends
*
* @author nuclearfog
*/

View File

@ -21,7 +21,7 @@ import org.nuclearfog.twidda.ui.activities.TweetActivity;
import java.util.List;
/**
* #Fragment class for a list of tweets
* fragment class to show a list of tweets
*
* @author nuclearfog
*/
@ -29,53 +29,62 @@ public class TweetFragment extends ListFragment implements TweetClickListener {
/**
* Key to define what type of tweets should be loaded
* {@link #TWEET_FRAG_HOME}, {@link #TWEET_FRAG_MENT}, {@link #TWEET_FRAG_TWEETS}, {@link #TWEET_FRAG_FAVORS}
* possible values are {@link #TWEET_FRAG_HOME}, {@link #TWEET_FRAG_MENT}, {@link #TWEET_FRAG_TWEETS}, {@link #TWEET_FRAG_FAVORS}
* {@link #TWEET_FRAG_ANSWER}, {@link #TWEET_FRAG_SEARCH}, {@link #TWEET_FRAG_LIST}
*/
public static final String KEY_FRAG_TWEET_MODE = "tweet_mode";
/**
* Key to define a search string such as username or text
* Key to define a search query
* value type is String
*/
public static final String KEY_FRAG_TWEET_SEARCH = "tweet_search";
/**
* Key to define a tweet ID to get replies
* Key to define a an (tweet, user, list) ID
* value type is Long
*/
public static final String KEY_FRAG_TWEET_ID = "tweet_id";
/**
* setup list for home timeline
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_HOME = 0xE7028B60;
/**
* setup list for mention timeline
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_MENT = 0x9EC8274D;
/**
* setup list for user tweets
* setup list for tweet timeline of a specific user
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_TWEETS = 0x4DBEF6CD;
/**
* setup list for user favorites
* setup list for favorite timeline of a specific user
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_FAVORS = 0x8DE749EC;
/**
* setup list for tweet replies
* setup list for tweet replies of a specific tweet
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_ANSWER = 0xAFB5F1C0;
/**
* setup list for search
* setup list for search timeline
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_SEARCH = 0x91A71117;
/**
* setup list for user list tweets
* setup list for userlist timeline
* @see #KEY_FRAG_TWEET_MODE
*/
public static final int TWEET_FRAG_LIST = 0x43F518F7;

View File

@ -30,7 +30,7 @@ import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.DialogType;
import org.nuclearfog.twidda.ui.dialogs.ConfirmDialog.OnConfirmListener;
/**
* Fragment class for lists a list of users
* fragment class to show a list of users
*
* @author nuclearfog
*/
@ -38,7 +38,10 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
/**
* key to set the type of user list to show
* value type is integer
* possible value types are {@link #USER_FRAG_FOLLOWER}, {@link #USER_FRAG_FOLLOWING}, {@link #USER_FRAG_RETWEET},
* {@link #USER_FRAG_FAVORIT}, {@link #USER_FRAG_FAVORIT}, {@link #USER_FRAG_SEARCH}, {@link #USER_FRAG_LIST_SUBSCRIBER},
* {@link #USER_FRAG_LIST_MEMBERS}, {@link #USER_FRAG_BLOCKED_USERS}, {@link #USER_FRAG_MUTED_USERS},
* {@link #USER_FRAG_FOLLOW_INCOMING} and {@link #USER_FRAG_FOLLOW_OUTGOING}
*/
public static final String KEY_FRAG_USER_MODE = "user_mode";
@ -62,67 +65,67 @@ public class UserFragment extends ListFragment implements UserClickListener, OnC
/**
* value to configure to show users following the authenticating user
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_FOLLOWER = 0xE45DD2;
/**
* value to configure to show users followed by the authenticating user
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_FOLLOWING = 0x64D432EB;
/**
* value to configure to show users retweeting a tweet
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_RETWEET = 0x2AC31E6B;
/**
* value to configure to show users favoring a tweet
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_FAVORIT = 0xA7FB2BB4;
/**
* value to configure to search users matching a search string
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_SEARCH = 0x162C3599;
/**
* value to configure to show subscribers of an userlist
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_LIST_SUBSCRIBER = 0x21DCF91C;
/**
* value to configure to show members of an userlist
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_LIST_MEMBERS = 0x9A00B3A5;
/**
* value to configure a list of blocked users
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_BLOCKED_USERS = 0x83D186AD;
/**
* value to configure a list of muted users
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_MUTED_USERS = 0x5246DC35;
/**
* value to configure a list of users with incoming following request
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_FOLLOW_INCOMING = 0x89e5255a;
/**
* value to configure a list of users with outgoing following request
* corresponding key {@link #KEY_FRAG_USER_MODE}
* @see #KEY_FRAG_USER_MODE
*/
public static final int USER_FRAG_FOLLOW_OUTGOING = 0x72544f17;

View File

@ -23,7 +23,7 @@ import org.nuclearfog.twidda.ui.activities.UserProfile;
import org.nuclearfog.twidda.ui.activities.UserlistActivity;
/**
* Fragment class for user lists
* Fragment class to show userlists
*
* @author nuclearfog
*/
@ -31,11 +31,14 @@ public class UserListFragment extends ListFragment implements ListClickListener
/**
* Key for the owner ID
* value type is Long
*/
public static final String KEY_FRAG_LIST_OWNER_ID = "list_owner_id";
/**
* alternative key for the owner name
* key for the owner screenname
* alternative to {@link #KEY_FRAG_LIST_OWNER_ID}
* value type is String
*/
public static final String KEY_FRAG_LIST_OWNER_NAME = "list_owner_name";
@ -46,19 +49,21 @@ public class UserListFragment extends ListFragment implements ListClickListener
public static final String KEY_FRAG_LIST_LIST_TYPE = "list_type";
/**
* setup the list to show all user lists owned by a specified user
* value to show all user lists owned by a specified user
* @see #KEY_FRAG_LIST_LIST_TYPE
*/
public static final int LIST_USER_OWNS = 0x5F36F90D;
/**
* setup the list to show all user lists the specified user is added to
* value to show all user lists the specified user is added to
* @see #KEY_FRAG_LIST_LIST_TYPE
*/
public static final int LIST_USER_SUBSCR_TO = 0xAA7386AA;
/**
* request code to open an user list to check for changes
*/
public static final int REQUEST_OPEN_LIST = 0x9541;
private static final int REQUEST_OPEN_LIST = 0x9541;
private ListLoader listTask;
private UserlistAdapter adapter;