Browse Source

- renamed classes and variables because of annoying squiggly green lines

pull/526/head
Twig N 5 years ago
parent
commit
882a647370
  1. 2
      app/src/main/AndroidManifest.xml
  2. 4
      app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
  3. 24
      app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java
  4. 12
      app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java
  5. 6
      app/src/main/java/org/transdroid/core/gui/rss/RssFeedsFragment.java
  6. 24
      app/src/main/java/org/transdroid/core/gui/rss/RssItemsFragment.java
  7. 2
      app/src/main/java/org/transdroid/core/gui/rss/RssitemsActivity.java
  8. 4
      app/src/main/java/org/transdroid/core/service/RssCheckerJobRunner.java
  9. 6
      app/src/main/res/layout-w900dp/activity_rssfeeds.xml
  10. 4
      app/src/main/res/layout/activity_rssfeeds.xml

2
app/src/main/AndroidManifest.xml

@ -248,7 +248,7 @@ @@ -248,7 +248,7 @@
<!-- RSS -->
<activity
android:name="org.transdroid.core.gui.rss.RssfeedsActivity_"
android:name="org.transdroid.core.gui.rss.RssFeedsActivity_"
android:label="@string/rss_feeds"
android:launchMode="singleTop"
android:theme="@style/TransdroidTheme" />

4
app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java

@ -82,7 +82,7 @@ import org.transdroid.core.gui.navigation.NavigationFilter; @@ -82,7 +82,7 @@ import org.transdroid.core.gui.navigation.NavigationFilter;
import org.transdroid.core.gui.navigation.NavigationHelper;
import org.transdroid.core.gui.navigation.RefreshableActivity;
import org.transdroid.core.gui.navigation.StatusType;
import org.transdroid.core.gui.rss.RssfeedsActivity_;
import org.transdroid.core.gui.rss.RssFeedsActivity_;
import org.transdroid.core.gui.search.FilePickerHelper;
import org.transdroid.core.gui.search.UrlEntryDialog;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
@ -809,7 +809,7 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE @@ -809,7 +809,7 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
@OptionsItem(R.id.action_rss)
protected void openRss() {
RssfeedsActivity_.intent(this).start();
RssFeedsActivity_.intent(this).start();
}
@OptionsItem(R.id.action_settings)

24
app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java

@ -35,7 +35,7 @@ import org.transdroid.R; @@ -35,7 +35,7 @@ import org.transdroid.R;
import org.transdroid.core.gui.log.Log;
import org.transdroid.core.gui.remoterss.data.RemoteRssChannel;
import org.transdroid.core.gui.remoterss.data.RemoteRssItem;
import org.transdroid.core.gui.rss.RssfeedsActivity;
import org.transdroid.core.gui.rss.RssFeedsActivity;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
import java.util.ArrayList;
@ -57,12 +57,12 @@ public class RemoteRssFragment extends Fragment { @@ -57,12 +57,12 @@ public class RemoteRssFragment extends Fragment {
// Views
@ViewById
protected View detailsContainer;
@ViewById
protected Spinner remoterssFilter;
@ViewById(R.id.remoterss_filter)
protected Spinner remoteRssFilter;
@ViewById
protected ListView torrentsList;
@ViewById
protected TextView remoterssStatusMessage;
@ViewById(R.id.remoterss_status_message)
protected TextView remoteRssStatusMessage;
@AfterViews
@ -84,7 +84,7 @@ public class RemoteRssFragment extends Fragment { @@ -84,7 +84,7 @@ public class RemoteRssFragment extends Fragment {
@OptionsItem(R.id.action_refresh)
protected void refreshScreen() {
RssfeedsActivity rssActivity = (RssfeedsActivity) getActivity();
RssFeedsActivity rssActivity = (RssFeedsActivity) getActivity();
rssActivity.refreshRemoteFeeds();
}
@ -107,11 +107,11 @@ public class RemoteRssFragment extends Fragment { @@ -107,11 +107,11 @@ public class RemoteRssFragment extends Fragment {
}
// Show/hide a nice message if there are no items to show
if (remoteRssItems.size() > 0) {
remoterssStatusMessage.setVisibility(View.GONE);
remoteRssStatusMessage.setVisibility(View.GONE);
}
else {
remoterssStatusMessage.setVisibility(View.VISIBLE);
remoterssStatusMessage.setText(R.string.remoterss_no_files);
remoteRssStatusMessage.setVisibility(View.VISIBLE);
remoteRssStatusMessage.setText(R.string.remoterss_no_files);
}
}
@ -124,7 +124,7 @@ public class RemoteRssFragment extends Fragment { @@ -124,7 +124,7 @@ public class RemoteRssFragment extends Fragment {
ArrayAdapter<String> adapter = new ArrayAdapter<>(this.getContext(), android.R.layout.simple_spinner_dropdown_item, labels);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
remoterssFilter.setAdapter(adapter);
remoteRssFilter.setAdapter(adapter);
}
/**
@ -135,11 +135,11 @@ public class RemoteRssFragment extends Fragment { @@ -135,11 +135,11 @@ public class RemoteRssFragment extends Fragment {
RemoteRssItemsAdapter adapter = (RemoteRssItemsAdapter) torrentsList.getAdapter();
RemoteRssItem item = (RemoteRssItem) adapter.getItem(position);
((RssfeedsActivity) getActivity()).downloadRemoteRssItem(item);
((RssFeedsActivity) getActivity()).downloadRemoteRssItem(item);
}
@ItemSelect(R.id.remoterss_filter)
protected void onFeedSelected(boolean selected, int position) {
((RssfeedsActivity) getActivity()).onFeedSelected(position);
((RssFeedsActivity) getActivity()).onFeedSelected(position);
}
}

12
app/src/main/java/org/transdroid/core/gui/rss/RssfeedsActivity.java → app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java

@ -76,7 +76,7 @@ import java.util.Date; @@ -76,7 +76,7 @@ import java.util.Date;
import java.util.List;
@EActivity(R.layout.activity_rssfeeds)
public class RssfeedsActivity extends AppCompatActivity {
public class RssFeedsActivity extends AppCompatActivity {
// Settings and local data
@Bean
@ -88,14 +88,14 @@ public class RssfeedsActivity extends AppCompatActivity { @@ -88,14 +88,14 @@ public class RssfeedsActivity extends AppCompatActivity {
protected static final int RSS_FEEDS_REMOTE = 1;
@FragmentById(R.id.rssfeeds_fragment)
protected RssfeedsFragment fragmentLocalFeeds;
protected RssFeedsFragment fragmentLocalFeeds;
@FragmentById(R.id.rssitems_fragment)
protected RssitemsFragment fragmentItems;
protected RssItemsFragment fragmentItems;
@FragmentById(R.id.remoterss_fragment)
protected RemoteRssFragment fragmentRemoteFeeds;
@ViewById
protected Toolbar rssfeedsToolbar;
@ViewById(R.id.rssfeeds_toolbar)
protected Toolbar rssFeedsToolbar;
@ViewById(R.id.rssfeeds_tabs)
protected TabLayout tabLayout;
@ViewById(R.id.rssfeeds_pager)
@ -178,7 +178,7 @@ public class RssfeedsActivity extends AppCompatActivity { @@ -178,7 +178,7 @@ public class RssfeedsActivity extends AppCompatActivity {
@AfterViews
protected void init() {
setSupportActionBar(rssfeedsToolbar);
setSupportActionBar(rssFeedsToolbar);
getSupportActionBar().setTitle(NavigationHelper.buildCondensedFontString(getString(R.string.rss_feeds)));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

6
app/src/main/java/org/transdroid/core/gui/rss/RssfeedsFragment.java → app/src/main/java/org/transdroid/core/gui/rss/RssFeedsFragment.java

@ -41,7 +41,7 @@ import java.util.List; @@ -41,7 +41,7 @@ import java.util.List;
*/
@EFragment(R.layout.fragment_rssfeeds)
@OptionsMenu(R.menu.fragment_rssfeeds)
public class RssfeedsFragment extends Fragment {
public class RssFeedsFragment extends Fragment {
// Views
@ViewById(R.id.rssfeeds_list)
@ -77,8 +77,8 @@ public class RssfeedsFragment extends Fragment { @@ -77,8 +77,8 @@ public class RssfeedsFragment extends Fragment {
MainSettingsActivity_.intent(getActivity()).start();
}
protected RssfeedsActivity getRssActivity() {
return (RssfeedsActivity) getActivity();
protected RssFeedsActivity getRssActivity() {
return (RssFeedsActivity) getActivity();
}
@Override

24
app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java → app/src/main/java/org/transdroid/core/gui/rss/RssItemsFragment.java

@ -60,10 +60,10 @@ import java.util.List; @@ -60,10 +60,10 @@ import java.util.List;
* @author Eric Kok
*/
@EFragment(R.layout.fragment_rssitems)
public class RssitemsFragment extends Fragment {
public class RssItemsFragment extends Fragment {
@InstanceState
protected Channel rssfeed = null;
protected Channel rssFeed = null;
@InstanceState
protected boolean hasError = false;
@InstanceState
@ -74,7 +74,7 @@ public class RssitemsFragment extends Fragment { @@ -74,7 +74,7 @@ public class RssitemsFragment extends Fragment {
// Views
@ViewById(R.id.rssitems_list)
protected ListView rssitemsList;
protected ListView rssItemsList;
private MultiChoiceModeListener onItemsSelected = new MultiChoiceModeListener() {
SelectionManagerMode selectionManagerMode;
@ -84,7 +84,7 @@ public class RssitemsFragment extends Fragment { @@ -84,7 +84,7 @@ public class RssitemsFragment extends Fragment {
// Show contextual action bar to add items in batch mode
mode.getMenuInflater().inflate(R.menu.fragment_rssitems_cab, menu);
Context themedContext = ((AppCompatActivity) getActivity()).getSupportActionBar().getThemedContext();
selectionManagerMode = new SelectionManagerMode(themedContext, rssitemsList, R.plurals.rss_itemsselected);
selectionManagerMode = new SelectionManagerMode(themedContext, rssItemsList, R.plurals.rss_itemsselected);
selectionManagerMode.onCreateActionMode(mode, menu);
return true;
}
@ -98,9 +98,9 @@ public class RssitemsFragment extends Fragment { @@ -98,9 +98,9 @@ public class RssitemsFragment extends Fragment {
// Get checked torrents
List<Item> checked = new ArrayList<>();
for (int i = 0; i < rssitemsList.getCheckedItemPositions().size(); i++) {
if (rssitemsList.getCheckedItemPositions().valueAt(i)) {
checked.add(rssitemsAdapter.getItem(rssitemsList.getCheckedItemPositions().keyAt(i)));
for (int i = 0; i < rssItemsList.getCheckedItemPositions().size(); i++) {
if (rssItemsList.getCheckedItemPositions().valueAt(i)) {
checked.add(rssitemsAdapter.getItem(rssItemsList.getCheckedItemPositions().keyAt(i)));
}
}
@ -189,9 +189,9 @@ public class RssitemsFragment extends Fragment { @@ -189,9 +189,9 @@ public class RssitemsFragment extends Fragment {
protected void init() {
// Set up the list adapter, which allows multi-select
rssitemsList.setAdapter(rssitemsAdapter);
rssitemsList.setMultiChoiceModeListener(onItemsSelected);
update(rssfeed, hasError, requiresExternalAuthentication);
rssItemsList.setAdapter(rssitemsAdapter);
rssItemsList.setMultiChoiceModeListener(onItemsSelected);
update(rssFeed, hasError, requiresExternalAuthentication);
}
@ -204,7 +204,7 @@ public class RssitemsFragment extends Fragment { @@ -204,7 +204,7 @@ public class RssitemsFragment extends Fragment {
public void update(Channel channel, boolean hasError, boolean requiresExternalAuthentication) {
this.requiresExternalAuthentication = requiresExternalAuthentication;
rssitemsAdapter.update(channel);
rssitemsList.setVisibility(View.GONE);
rssItemsList.setVisibility(View.GONE);
emptyText.setVisibility(View.VISIBLE);
if (hasError) {
emptyText.setText(R.string.rss_error);
@ -218,7 +218,7 @@ public class RssitemsFragment extends Fragment { @@ -218,7 +218,7 @@ public class RssitemsFragment extends Fragment {
emptyText.setText(R.string.rss_empty);
return;
}
rssitemsList.setVisibility(View.VISIBLE);
rssItemsList.setVisibility(View.VISIBLE);
emptyText.setVisibility(View.INVISIBLE);
}

2
app/src/main/java/org/transdroid/core/gui/rss/RssitemsActivity.java

@ -46,7 +46,7 @@ public class RssitemsActivity extends AppCompatActivity { @@ -46,7 +46,7 @@ public class RssitemsActivity extends AppCompatActivity {
protected boolean requiresExternalAuthentication;
@FragmentById(R.id.rssitems_fragment)
protected RssitemsFragment fragmentItems;
protected RssItemsFragment fragmentItems;
@ViewById
protected Toolbar rssfeedsToolbar;

4
app/src/main/java/org/transdroid/core/service/RssCheckerJobRunner.java

@ -33,7 +33,7 @@ import org.transdroid.core.app.settings.ApplicationSettings; @@ -33,7 +33,7 @@ import org.transdroid.core.app.settings.ApplicationSettings;
import org.transdroid.core.app.settings.NotificationSettings;
import org.transdroid.core.app.settings.RssfeedSetting;
import org.transdroid.core.gui.log.Log;
import org.transdroid.core.gui.rss.RssfeedsActivity_;
import org.transdroid.core.gui.rss.RssFeedsActivity_;
import org.transdroid.core.rssparser.Item;
import org.transdroid.core.rssparser.RssParser;
import org.transdroid.daemon.util.Collections2;
@ -121,7 +121,7 @@ public class RssCheckerJobRunner { @@ -121,7 +121,7 @@ public class RssCheckerJobRunner {
// Provide a notification, since there are new RSS items
PendingIntent pi = PendingIntent
.getActivity(context, 80000, new Intent(context, RssfeedsActivity_.class), PendingIntent.FLAG_UPDATE_CURRENT);
.getActivity(context, 80000, new Intent(context, RssFeedsActivity_.class), PendingIntent.FLAG_UPDATE_CURRENT);
String title = context.getResources().getQuantityString(R.plurals.rss_service_new, unread, Integer.toString(unread));
String forString = Collections2.joinString(hasUnread, ", ");
final NotificationCompat.Builder builder = new NotificationCompat.Builder(context, NotificationChannels.CHANNEL_RSS_CHECKER)

6
app/src/main/res/layout-w900dp/activity_rssfeeds.xml

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".core.gui.rss.RssfeedsActivity_">
tools:context=".core.gui.rss.RssFeedsActivity_">
<android.support.v7.widget.Toolbar
android:id="@+id/rssfeeds_toolbar"
@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
android:orientation="horizontal">
<fragment
android:id="@+id/rssfeeds_fragment"
class="org.transdroid.core.gui.rss.RssfeedsFragment_"
class="org.transdroid.core.gui.rss.RssFeedsFragment_"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="2"
@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
<fragment
android:id="@+id/rssitems_fragment"
class="org.transdroid.core.gui.rss.RssitemsFragment_"
class="org.transdroid.core.gui.rss.RssItemsFragment_"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="3"

4
app/src/main/res/layout/activity_rssfeeds.xml

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".core.gui.rss.RssfeedsActivity_">
tools:context=".core.gui.rss.RssFeedsActivity_">
<android.support.v7.widget.Toolbar
android:id="@+id/rssfeeds_toolbar"
@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
android:orientation="horizontal">
<fragment
android:id="@+id/rssfeeds_fragment"
class="org.transdroid.core.gui.rss.RssfeedsFragment_"
class="org.transdroid.core.gui.rss.RssFeedsFragment_"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="2"

Loading…
Cancel
Save