Android Studio - Creating Material Design App Bar
Tech-Today

Android Studio - Creating Material Design App Bar


Android Studio - Creating Material Design App Bar


1.) Set-up the color that we'll use for the app bar:
========================================
>Create a new xml inside values and name it color.xml
<resources>
    <color name="ColorPrimary">#FF5722</color>
    <color name="ColorPrimaryDark">#E64A19</color>
</resources>

2.) Using the previously declared color, change the style.xml to apply the colors:
=================================================================

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/ColorPrimary</item>
<item name="colorPrimaryDark">@color/ColorPrimaryDark</item>
<!-- Customize your theme here. -->
</style>
</resources>

3.) Make a tool bar:
================
>Create a new xml layout file and name it tool_bar.xml
<span ><?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_
android:layout_
android:background="@color/ColorPrimary"
android:elevation="4dp"

>

</android.support.v7.widget.Toolbar>

</span>

4.) Use the tool bar:
================
>Insert this code to wherever xml layout you want to display the tool bar
<include
android:id="@+id/tool_bar"
layout="@layout/tool_bar"
></include>

5.) Adding additional buttons inside the app bar:
=======================================
>Go to menu_main.xml and add/paste the code below
 <item
android:id="@+id/action_user"
android:orderInCategory="300"
android:title="User"
android:icon="@drawable/ic_launcher"
app:showAsAction="ifRoom"></item>




- Android Studio - Displaying List View Inside Alertdialog
Android Studio - Displaying List View Inside AlertDialog 1.) Follow this code: ================>Note: custom_dialog_layout.xml is the layout that will pop-up >Note: row.xml is the item used for populating rowAlertDialog.Builder builder = new AlertDialog.Builder(new...

- How To Sign Your Android Application To Use The Map Api In Mobile Device
There are 4 steps that need to be done to release a mobile application with map on a android powered mobile device. Assumption: You have eclipse installed with android plugin installed. If you don't know how just follow the steps here: http://developer.android.com/sdk/eclipse-adt.html...

- How To Get Imei From Android Or Iphone
For android it's pretty straight forward. You just have to add read phone state permission. <uses-permission android:name="android.permission.READ_PHONE_STATE"/> And call the API: String imei = TelephonyManager.getDefault().getDeviceId(); if (TextUtils.isEmpty(imei))...

- Android's Datepickerdialog And Timepickerdialog Implementation
Layout (calendar.xml) Java Class: package org.ipiel.demo.layout; import java.text.DateFormat; import java.util.Calendar; import android.app.Activity; import android.app.DatePickerDialog; import android.app.TimePickerDialog; import android.os.Bundle;...

- This Article Explains Some Of The Browser Specific Stylesheet Hacks (like Ie Only, Firefox, Etc) That Can Be Used In Developing A Web Application On Different Browsers
Web UI design for beginners may be complicated than it seems specially if your developing cross browser application. For example building a web app compatible with firefox, ie6 and ie7. One ways is to simply load the appropriate css file using: <!--[if...



Tech-Today








.