mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +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() {
|
public void initDrawer() {
|
||||||
navigationView.setNavigationItemSelectedListener(this);
|
navigationView.setNavigationItemSelectedListener(this);
|
||||||
username = CommonsApplication.getInstance().getCurrentAccount().name;
|
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 : "");
|
usernameTextView.setText(username != null ? username : "");
|
||||||
|
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,27 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:background="@android:color/darker_gray"
|
||||||
android:layout_height="172dp">
|
android:layout_height="172dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/pictureOfTheDay"
|
android:id="@+id/pictureOfTheDay"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:background="@android:color/darker_gray"
|
android:layout_weight="0.8"
|
||||||
android:padding="20dp"
|
android:paddingTop="5dp"
|
||||||
android:src="@drawable/commons_logo_large" />
|
android:src="@drawable/commons_logo_large" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/userNameText"
|
android:id="@+id/userNameText"
|
||||||
style="?android:textAppearanceLargeInverse"
|
style="?android:textAppearanceLargeInverse"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_weight="0.2"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:ellipsize="none"
|
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
android:textAlignment="center"
|
||||||
android:text="@string/placeholder_place_name"
|
android:text="@string/placeholder_place_name"
|
||||||
android:textColor="@android:color/white" />
|
android:textColor="@android:color/white" />
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue