Skip to content

Commit

Permalink
Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
induiduel committed Dec 30, 2020
1 parent b979a98 commit e33dd6c
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 26 deletions.
11 changes: 11 additions & 0 deletions app/src/main/res/drawable-anydpi/ic_main_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="@android:color/white"
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
</vector>
11 changes: 11 additions & 0 deletions app/src/main/res/drawable-anydpi/ic_main_search.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="@android:color/white"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
</vector>
Binary file added app/src/main/res/drawable-hdpi/ic_main_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/ic_main_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/ic_main_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/ic_main_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/ic_main_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/ic_main_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/ic_main_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/ic_main_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 75 additions & 15 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,85 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/beyaz"
android:background="@color/white"
tools:context=".activities.MainActivity">
<FrameLayout

<RelativeLayout
android:id="@+id/mainFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottomNavigation">
tools:ignore="UselessParent">

</FrameLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"

app:backgroundTint="@color/beyaz"
app:itemIconTint="@drawable/bottom_nav_colors"
app:itemTextColor="@drawable/bottom_nav_colors"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu" />
<LinearLayout
android:id="@+id/topContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:layout_gravity="center_vertical"
android:fontFamily="monospace"
android:text="Anasayfa"
android:textColor="@color/darkGrey"
android:textSize="18sp"
android:textStyle="bold" />

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end|center">

<ImageView
android:id="@+id/searchIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_main_search"
app:tint="@color/colorGreyDark" />

<Space
android:id="@+id/spacer"
android:layout_width="8dp"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/searchIcon" />

<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_toEndOf="@+id/spacer"
android:src="@drawable/ic_main_menu"
app:tint="@color/colorGreyDark" />
</RelativeLayout>

</FrameLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/mainContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/topContainer"
android:orientation="vertical">

</LinearLayout>

<LinearLayout
android:id="@+id/bottomContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/mainContainer"
android:orientation="horizontal">

</LinearLayout>


</RelativeLayout>

</RelativeLayout>
12 changes: 12 additions & 0 deletions app/src/main/res/layout/bottom_navigation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.bottomnavigation.BottomNavigationView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/bottomNavigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:backgroundTint="@color/beyaz"
app:itemIconTint="@drawable/bottom_nav_colors"
app:itemTextColor="@drawable/bottom_nav_colors"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu" />
35 changes: 24 additions & 11 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,31 @@

<color name="colorPrimary">#1a73e8</color>
<color name="colorPrimaryDark">#FFFFFF</color>
<color name="colorAccent">#1a73e8</color>
<color name="colorControlHighlight">#FFFFFF</color>
<color name="colorControlNormal">#FFFFFF</color>
<color name="beyaz">#ffffff</color>

<string name="beyaz" translatable="false">#ffffff</string>
<color name="colorPrimaryd">#1a73e8</color>
<color name="colorPrimaryDarkd">#202124</color>
<color name="colorAccentd">#1a73e8</color>
<color name="colorControlHighlightd">#202124</color>
<color name="colorControlNormald">#202124</color>
<color name="navcolor">#9c59b6</color>
<color name="gri">#5f6369</color>
<color name="koyugri">#202124</color>

<color name="colorPrimaryD">#1a73e8</color>
<color name="colorPrimaryDarkDark">#202124</color>
<color name="colorAccentDark">#1a73e8</color>
<color name="colorControlHighlightDark">#202124</color>
<color name="colorControlNormalDark">#202124</color>
<color name="navigationColor">#9c59b6</color>
<color name="grey">#5f6369</color>
<color name="darkGrey">#202124</color>

<color name="colorAccent">#303f9f</color>
<color name="colorBackground">#232426</color>
<color name="colorDark">#1a1b1c</color>
<color name="colorSuccess">#00a173</color>
<color name="colorWarning">#f9ab00</color>
<color name="colorError">#d93025</color>
<color name="colorMain">#303f9f</color>
<color name="colorWhite">#ffffff</color>
<color name="colorGreyLight">#9aa0a6</color>
<color name="colorGreyDark">#5f6369</color>
<color name="colorCremini">#dadce0</color>
<color name="colorGreen">#00a173</color>
<color name="colorBlue">#1a73e8</color>
<color name="colorLight">#f0f6fb</color>
</resources>

0 comments on commit e33dd6c

Please sign in to comment.