Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions app/src/main/java/br/com/gdgabc/askov/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

Expand All @@ -11,6 +12,14 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

//Instanciando o ToolBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

//Set do titulo
toolbar.setTitle("Askov");
//Inflando o Menu
toolbar.inflateMenu(R.menu.menu_main);
}


Expand Down
25 changes: 21 additions & 4 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/fragment"
android:name="br.com.gdgabc.askov.MainActivityFragment" tools:layout="@layout/fragment_main"
android:layout_width="match_parent" android:layout_height="match_parent" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="br.com.gdgabc.askov.MainActivity"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="150dp"
android:id="@+id/toolbar"
android:elevation="5dp"
android:translationZ="10dp"
android:minHeight="?attr/actionBarSize"
android:background="@color/colorPrimary"
android:theme="?attr/colorPrimary"/>
<fragment
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:name="br.com.gdgabc.askov.MainActivityFragment"/>
</LinearLayout>
10 changes: 10 additions & 0 deletions app/src/main/res/values/color.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Aqui vira todos os valores de colores para o app -->
<resources>
<!-- Cores Basica dos itens do ToolBar -->
<color name="colorPrimary">#2196F3</color>
<color name="colorPrimarydark">#1976D2</color>
<color name="colorAccent">#F44336</color>
<color name="textColorPrimary">#FFFFFF</color>
<color name="windowColorBackground">#DDDDDD</color>
</resources>
19 changes: 17 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!--Customizar os itens do toolbar no tema -->
<!-- Cor do ActionBar -->
<item name="android:colorPrimary">@color/colorPrimary</item>
<!-- Color -->
<item name="android:colorPrimaryDark">@color/colorPrimarydark</item>
<item name="android:colorAccent">@color/colorAccent</item>
<item name="android:navigationBarColor">@color/colorPrimarydark</item>
<!-- Cor do Texto do Toolbar-->
<item name="android:textColorPrimary">@color/textColorPrimary</item>

<item name="android:colorBackground">@color/windowColorBackground</item>
<item name="android:windowActionModeOverlay">true</item>
</style>

<style name="Theme.AppBar.Normal" parent="ThemeOverlay.AppCompat.Dark">
<item name="android:textColorPrimary">@color/textColorPrimary</item>
</style>

</resources>