diff --git a/app/src/main/java/org/nuclearfog/twidda/window/UserProfile.java b/app/src/main/java/org/nuclearfog/twidda/window/UserProfile.java index bc8c7105..8dcdd117 100644 --- a/app/src/main/java/org/nuclearfog/twidda/window/UserProfile.java +++ b/app/src/main/java/org/nuclearfog/twidda/window/UserProfile.java @@ -7,6 +7,7 @@ import android.support.design.widget.AppBarLayout; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -116,35 +117,27 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - switch(parent.getId()) { - case R.id.ht_list: - if(!homeReload.isRefreshing()) { - TimelineAdapter tlAdp = (TimelineAdapter) homeTweets.getAdapter(); - TweetDatabase twDB = tlAdp.getData(); - long tweetID = twDB.getTweetId(position); - long userID = twDB.getUserID(position); - Intent intent = new Intent(getApplicationContext(), TweetDetail.class); - Bundle bundle = new Bundle(); - bundle.putLong("tweetID",tweetID); - bundle.putLong("userID",userID); - intent.putExtras(bundle); - startActivity(intent); - } - break; - case R.id.hf_list: - if(!favoriteReload.isRefreshing()) { - TimelineAdapter tlAdp = (TimelineAdapter) homeFavorits.getAdapter(); - TweetDatabase twDB = tlAdp.getData(); - long tweetID = twDB.getTweetId(position); - long userID = twDB.getUserID(position); - Intent intent = new Intent(getApplicationContext(), TweetDetail.class); - Bundle bundle = new Bundle(); - bundle.putLong("tweetID",tweetID); - bundle.putLong("userID",userID); - intent.putExtras(bundle); - startActivity(intent); - } - break; + TimelineAdapter tlAdp; + + if(parent.getId() == R.id.ht_list) { + tlAdp = (TimelineAdapter) homeTweets.getAdapter(); + } + else { + tlAdp = (TimelineAdapter) homeFavorits.getAdapter(); + } + + if(position >= tlAdp.getCount()) { + + } else { + TweetDatabase twDB = tlAdp.getData(); + long tweetID = twDB.getTweetId(position); + long userID = twDB.getUserID(position); + Intent intent = new Intent(getApplicationContext(), TweetDetail.class); + Bundle bundle = new Bundle(); + bundle.putLong("tweetID",tweetID); + bundle.putLong("userID",userID); + intent.putExtras(bundle); + startActivity(intent); } } @@ -169,13 +162,16 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen currentTab = tabId; } + /** + * Deaktiviert + */ @Override public void onOffsetChanged(AppBarLayout mBar, int high) { int max = - mBar.getTotalScrollRange(); if(high == max) { homeTweets.setNestedScrollingEnabled(true); homeFavorits.setNestedScrollingEnabled(true); - } else { + } else if (high == 0) { homeTweets.setNestedScrollingEnabled(false); homeFavorits.setNestedScrollingEnabled(false); } diff --git a/app/src/main/res/drawable/downarrow.xml b/app/src/main/res/drawable/downarrow.xml new file mode 100644 index 00000000..f80ca75d --- /dev/null +++ b/app/src/main/res/drawable/downarrow.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/layout/footer_bottom.xml b/app/src/main/res/layout/footer_bottom.xml new file mode 100644 index 00000000..e6ce165b --- /dev/null +++ b/app/src/main/res/layout/footer_bottom.xml @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/tweet_detail.xml b/app/src/main/res/layout/tweet_detail.xml index a0a590eb..b4d56094 100644 --- a/app/src/main/res/layout/tweet_detail.xml +++ b/app/src/main/res/layout/tweet_detail.xml @@ -7,7 +7,7 @@ android:fitsSystemWindows="true"> - + android:layout_height="wrap_content" + android:orientation="horizontal"> - + - + + - - + - + - - - - - - + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e3512032..fd5ecbad 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -39,4 +39,5 @@ Verifiziert Ja Nein + Pfeil nach unten \ No newline at end of file