mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-31 11:25:03 +01:00
added notification icon, added click listener for notification item
This commit is contained in:
parent
0aa0a51912
commit
e97d029ce3
@ -75,6 +75,8 @@ public class StatusHolder extends ViewHolder implements OnClickListener {
|
||||
reposter = itemView.findViewById(R.id.item_status_reposter_name);
|
||||
created = itemView.findViewById(R.id.item_status_created_at);
|
||||
replyname = itemView.findViewById(R.id.item_status_reply_name);
|
||||
this.settings = settings;
|
||||
this.picasso = picasso;
|
||||
|
||||
if (settings.likeEnabled()) {
|
||||
favIcon.setImageResource(R.drawable.like);
|
||||
@ -83,8 +85,9 @@ public class StatusHolder extends ViewHolder implements OnClickListener {
|
||||
}
|
||||
AppStyles.setTheme(container, 0);
|
||||
cardLayout.setCardBackgroundColor(settings.getCardColor());
|
||||
this.settings = settings;
|
||||
this.picasso = picasso;
|
||||
|
||||
label.setOnClickListener(this);
|
||||
itemView.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
package org.nuclearfog.twidda.ui.fragments;
|
||||
|
||||
import static org.nuclearfog.twidda.ui.activities.ProfileActivity.KEY_PROFILE_DATA;
|
||||
import static org.nuclearfog.twidda.ui.activities.StatusActivity.KEY_STATUS_DATA;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
@ -14,6 +18,8 @@ import org.nuclearfog.twidda.backend.utils.ErrorHandler;
|
||||
import org.nuclearfog.twidda.model.Notification;
|
||||
import org.nuclearfog.twidda.model.Status;
|
||||
import org.nuclearfog.twidda.model.User;
|
||||
import org.nuclearfog.twidda.ui.activities.ProfileActivity;
|
||||
import org.nuclearfog.twidda.ui.activities.StatusActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -65,7 +71,9 @@ public class NotificationFragment extends ListFragment implements OnNotification
|
||||
@Override
|
||||
public void onStatusClick(Status status) {
|
||||
if (!isRefreshing()) {
|
||||
// todo add implementation
|
||||
Intent intent = new Intent(requireContext(), StatusActivity.class);
|
||||
intent.putExtra(KEY_STATUS_DATA, status);
|
||||
startActivity(intent); // todo add update
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +81,9 @@ public class NotificationFragment extends ListFragment implements OnNotification
|
||||
@Override
|
||||
public void onUserClick(User user) {
|
||||
if (!isRefreshing()) {
|
||||
// todo add implementation
|
||||
Intent intent = new Intent(requireContext(), ProfileActivity.class);
|
||||
intent.putExtra(KEY_PROFILE_DATA, user);
|
||||
startActivity(intent); // todo add update
|
||||
}
|
||||
}
|
||||
|
||||
|
9
app/src/main/res/drawable/bell.xml
Normal file
9
app/src/main/res/drawable/bell.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M14.65,8.512c-2.28,-4.907 -3.466,-6.771 -7.191,-6.693C6.132,1.846 6.45,0.857 5.438,1.232c-1.01,0.375 -0.143,0.924 -1.177,1.773c-2.902,2.383 -2.635,4.587 -1.289,9.84c0.567,2.213 -1.367,2.321 -0.602,4.465c0.559,1.564 4.679,2.219 9.025,0.607c4.347,-1.613 7.086,-4.814 6.527,-6.378C17.157,9.394 15.611,10.578 14.65,8.512zM10.924,16.595c-3.882,1.44 -7.072,0.594 -7.207,0.217c-0.232,-0.65 1.253,-2.816 5.691,-4.463s6.915,-1.036 7.174,-0.311C16.735,12.467 14.807,15.154 10.924,16.595zM9.676,13.101c-2.029,0.753 -3.439,1.614 -4.353,2.389c0.643,0.584 1.847,0.726 3.046,0.281c1.527,-0.565 2.466,-1.866 2.095,-2.904c-0.005,-0.013 -0.011,-0.023 -0.016,-0.036C10.197,12.913 9.94,13.002 9.676,13.101z"
|
||||
android:fillColor="#FFFFFF" />
|
||||
</vector>
|
@ -4,7 +4,7 @@
|
||||
<integer-array name="home_tab_icons">
|
||||
<item>@drawable/home</item>
|
||||
<item>@drawable/hash</item>
|
||||
<item>@drawable/mention</item>
|
||||
<item>@drawable/bell</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="search_tab_icons">
|
||||
|
Loading…
x
Reference in New Issue
Block a user