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
This commit is contained in:
neslihanturan 2018-11-12 17:26:41 +02:00 committed by Vivek Maskara
parent e0bd00bb9b
commit 8eac08fc04
2 changed files with 9 additions and 2 deletions

View file

@ -26,6 +26,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.contributions.MainActivity;
import fr.free.nrw.commons.mwapi.MediaWikiApi;
import fr.free.nrw.commons.theme.NavigationBaseActivity;
import fr.free.nrw.commons.utils.NetworkUtils;
@ -146,4 +147,10 @@ public class NotificationActivity extends NavigationBaseActivity {
.commit();
mNotificationWorkerFragment.setNotificationList(notificationList);
}
@Override
public void onBackPressed() {
startActivityWithFlags(
this, MainActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP,
Intent.FLAG_ACTIVITY_SINGLE_TOP); }
}

View file

@ -17,8 +17,8 @@
android:layout_width="18dp"
android:layout_height="18dp"
android:id="@+id/nearby_info_image"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
app:srcCompat="@drawable/ic_info_outline_white_24dp"
/>
</LinearLayout>