Skip to content

Commit 658e569

Browse files
neslihanturanmisaochan
authored andcommitted
Small ui fixes on new main ui (#1995)
* Return to main activity from notifications activity on back button is pressed * Make nearby info image a little far from nearby text, to prevent wrong clicks
1 parent 02908a6 commit 658e569

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/src/main/java/fr/free/nrw/commons/notification/NotificationActivity.java

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import butterknife.ButterKnife;
2727
import fr.free.nrw.commons.R;
2828
import fr.free.nrw.commons.Utils;
29+
import fr.free.nrw.commons.contributions.MainActivity;
2930
import fr.free.nrw.commons.mwapi.MediaWikiApi;
3031
import fr.free.nrw.commons.theme.NavigationBaseActivity;
3132
import fr.free.nrw.commons.utils.NetworkUtils;
@@ -146,4 +147,10 @@ private void initializeAndSetNotificationList(List<Notification> notificationLis
146147
.commit();
147148
mNotificationWorkerFragment.setNotificationList(notificationList);
148149
}
150+
151+
@Override
152+
public void onBackPressed() {
153+
startActivityWithFlags(
154+
this, MainActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP,
155+
Intent.FLAG_ACTIVITY_SINGLE_TOP); }
149156
}

app/src/main/res/layout/custom_nearby_tab_layout.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
android:layout_width="18dp"
1818
android:layout_height="18dp"
1919
android:id="@+id/nearby_info_image"
20-
android:layout_marginStart="8dp"
21-
android:layout_marginLeft="8dp"
20+
android:layout_marginStart="16dp"
21+
android:layout_marginLeft="16dp"
2222
app:srcCompat="@drawable/ic_info_outline_white_24dp"
2323
/>
2424
</LinearLayout>

0 commit comments

Comments
 (0)