Raised SDK to 21

Added Scrollview
This commit is contained in:
NudeDude 2018-01-13 22:38:13 +01:00
parent 9b1e04f03b
commit 88766e7313
2 changed files with 16 additions and 7 deletions

View File

@ -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();
}

View File

@ -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