Twitter Facebook Delicious Digg Stumbleupon Favorites More

Wednesday 31 January 2018

imp xml

style.xml
<resources>

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

        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="android:windowFullscreen">true</item>
        <item name="android:windowContentOverlay">@null</item>

    </style>

</resources>



DIMENSION.XML 
<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>
</resources>


DIMENSION W820.XML

<resources>
    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
         (such as screen margins) for screens with more than 820dp of available width. This
         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
    <dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

MAIN XML 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.londonappbrewery.destini.MainActivity"
    android:background="@drawable/background">



    <TextView
        android:id="@+id/storyTextView"
        android:text="@string/T1_Story"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:textSize="24sp"
        android:textColor="#ffffffff"
        />

    <Button
        android:id="@+id/buttonTop"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/T1_Ans1"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="61dp"
        android:background="#e74c3c"
        android:textColor="#ecf0f1"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:textSize="15sp"
        />

    <Button
        android:id="@+id/buttonBottom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/T1_Ans2"
        android:layout_alignParentBottom="true"
        android:layout_alignLeft="@+id/buttonTop"
        android:layout_alignStart="@+id/buttonTop"
        android:layout_alignRight="@+id/buttonTop"
        android:layout_alignEnd="@+id/buttonTop"
        android:background="#3498db"
        android:textColor="#ecf0f1"
        android:textSize="15sp"/>



</RelativeLayout>

Share:

0 comments:

Post a Comment

Blogger Tutorials

Blogger Templates

Sample Text

Copyright © ANDROID TUTORIAL CODE | Powered by Blogger
Design by SimpleWpThemes | Blogger Theme by NewBloggerThemes.com & Distributed By Protemplateslab