mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Made layout actually look good. Hopefully fixed codeacities complaints.
This commit is contained in:
parent
06efa26f5e
commit
1622f67a4b
2 changed files with 13 additions and 11 deletions
|
|
@ -49,7 +49,8 @@ public class NavigationBaseActivity extends BaseActivity
|
|||
public void initDrawer() {
|
||||
navigationView.setNavigationItemSelectedListener(this);
|
||||
username = CommonsApplication.getInstance().getCurrentAccount().name;
|
||||
usernameTextView = ((TextView) navigationView.getHeaderView(0).findViewById(R.id.userNameText));
|
||||
usernameTextView = ((TextView) navigationView.getHeaderView(0)
|
||||
.findViewById(R.id.userNameText));
|
||||
usernameTextView.setText(username != null ? username : "");
|
||||
|
||||
setSupportActionBar(toolbar);
|
||||
|
|
|
|||
|
|
@ -1,26 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_height="172dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pictureOfTheDay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/darker_gray"
|
||||
android:padding="20dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.8"
|
||||
android:paddingTop="5dp"
|
||||
android:src="@drawable/commons_logo_large" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userNameText"
|
||||
style="?android:textAppearanceLargeInverse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:ellipsize="none"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.2"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/placeholder_place_name"
|
||||
android:textColor="@android:color/white" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue