parent
9b1e04f03b
commit
88766e7313
|
@ -189,15 +189,22 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen
|
|||
}
|
||||
|
||||
private void getContent() {
|
||||
new Thread(){
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run(){
|
||||
public void run() {
|
||||
TweetDatabase mTweet = new TweetDatabase(UserProfile.this, TweetDatabase.USER_TL, userId);
|
||||
TimelineAdapter tl = new TimelineAdapter(UserProfile.this,mTweet);
|
||||
homeTweets.setAdapter(tl);
|
||||
TweetDatabase fTweet = new TweetDatabase(UserProfile.this, TweetDatabase.FAV_TL, userId);
|
||||
TimelineAdapter fl = new TimelineAdapter(UserProfile.this,fTweet);
|
||||
homeFavorits.setAdapter(fl);
|
||||
|
||||
if(mTweet.getSize() == 0) {
|
||||
new ProfileAction(UserProfile.this, tool).execute(userId, ProfileAction.GET_TWEETS);
|
||||
} else {
|
||||
homeTweets.setAdapter(new TimelineAdapter(UserProfile.this,mTweet));
|
||||
}
|
||||
if(fTweet.getSize() == 0) {
|
||||
new ProfileAction(UserProfile.this, tool).execute(userId, ProfileAction.GET_FAVS);
|
||||
} else {
|
||||
homeFavorits.setAdapter(new TimelineAdapter(UserProfile.this,fTweet));
|
||||
}
|
||||
}
|
||||
}.run();
|
||||
}
|
||||
|
|
|
@ -135,13 +135,15 @@
|
|||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:fillViewport="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:fitsSystemWindows="false"
|
||||
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TabHost
|
||||
|
|
Loading…
Reference in New Issue