set activity title to feed title when opening headlines

This commit is contained in:
Andrew Dolgov 2014-10-25 12:22:30 +04:00
parent de998a1e92
commit 30c23fd040
2 changed files with 20 additions and 18 deletions

View File

@ -1,15 +1,6 @@
package org.fox.ttrss; package org.fox.ttrss;
import java.util.Date;
import java.util.HashMap;
import org.fox.ttrss.types.Article;
import org.fox.ttrss.types.ArticleList;
import org.fox.ttrss.types.Feed;
import org.fox.ttrss.types.FeedCategory;
import org.fox.ttrss.util.AppRater;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
@ -20,15 +11,20 @@ import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.util.Log; import android.util.Log;
import android.util.TypedValue;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu; import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.readystatesoftware.systembartint.SystemBarTintManager;
import org.fox.ttrss.types.Article;
import org.fox.ttrss.types.ArticleList;
import org.fox.ttrss.types.Feed;
import org.fox.ttrss.types.FeedCategory;
import org.fox.ttrss.util.AppRater;
import java.util.Date;
import java.util.HashMap;
public class FeedsActivity extends OnlineActivity implements HeadlinesEventListener { public class FeedsActivity extends OnlineActivity implements HeadlinesEventListener {
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
@ -97,7 +93,9 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
refresh(false); refresh(false);
} }
m_feedIsSelected = false; setTitle(R.string.app_name);
m_feedIsSelected = false;
initMenu(); initMenu();
} }
}); });

View File

@ -339,7 +339,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
//list.setEmptyView(view.findViewById(R.id.no_headlines)); //list.setEmptyView(view.findViewById(R.id.no_headlines));
registerForContextMenu(list); registerForContextMenu(list);
//m_activity.m_pullToRefreshAttacher.addRefreshableView(list, this); if (m_activity.isSmallScreen()) {
m_activity.setTitle(m_feed.title);
}
//m_activity.m_pullToRefreshAttacher.addRefreshableView(list, this);
//if (m_activity.isSmallScreen()) //if (m_activity.isSmallScreen())
//view.findViewById(R.id.headlines_fragment).setPadding(0, 0, 0, 0); //view.findViewById(R.id.headlines_fragment).setPadding(0, 0, 0, 0);