Advertisement
Guest User

My code

a guest
Feb 28th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.04 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.    package="com.example.projekt.sasa">
  4.  
  5.     <uses-permission android:name="android.permission.INTERNET" />
  6.  
  7.     <application
  8.        android:name="com.example.projekt.sasa.AppController"
  9.        android:allowBackup="true"
  10.        android:icon="@mipmap/ic_launcher"
  11.        android:label="@string/app_name"
  12.        android:supportsRtl="true"        >
  13.         <activity
  14.            android:name=".SplashScreen"
  15.            android:label="MHMA"
  16.            android:theme="@style/NoActionBarTheme">
  17.             <intent-filter>
  18.                 <action android:name="android.intent.action.MAIN" />
  19.                 <category android:name="android.intent.category.LAUNCHER" />
  20.             </intent-filter>
  21.         </activity>
  22.  
  23.         <activity
  24.            android:name=".MainActivity"
  25.            android:label="@string/app_name"
  26.            android:theme="@style/ToolBarStyle">
  27.             <intent-filter>
  28.                 <action android:name="android.intent.action.MAINACTIVITY" />
  29.  
  30.                 <category android:name="android.intent.category.DEFAULT" />
  31.             </intent-filter>
  32.         </activity>
  33.     </application>
  34.  
  35. </manifest>
  36.  
  37. ---------------------------------------------------------------------------------------------------------------------------------------
  38. <?xml version="1.0" encoding="utf-8"?>
  39. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  40.    xmlns:app="http://schemas.android.com/apk/res-auto"
  41.    xmlns:tools="http://schemas.android.com/tools"
  42.    android:id="@+id/drawer_layout"
  43.    android:layout_width="match_parent"
  44.    android:layout_height="match_parent"
  45.    android:fitsSystemWindows="true"
  46.    tools:openDrawer="start"
  47.  
  48.    android:background="@color/feed_bg"
  49.    android:orientation="vertical">
  50.  
  51.     <LinearLayout
  52.        xmlns:android="http://schemas.android.com/apk/res/android"
  53.        xmlns:app="http://schemas.android.com/apk/res-auto"
  54.        xmlns:tools="http://schemas.android.com/tools"
  55.        android:layout_width="fill_parent"
  56.        android:layout_height="fill_parent"
  57.        android:fitsSystemWindows="true"
  58.        tools:context=".MainActivity"
  59.  
  60.        android:layout_marginLeft="@dimen/feed_item_margin"
  61.        android:layout_marginRight="@dimen/feed_item_margin"
  62.        android:layout_marginTop="@dimen/feed_item_margin"
  63.        android:background="@drawable/bg_parent_rounded_corner"
  64.        android:orientation="vertical"
  65.        android:paddingBottom="@dimen/feed_item_padding_top_bottom"
  66.        android:paddingTop="@dimen/feed_item_padding_top_bottom">
  67.  
  68.  
  69.  
  70.         <android.support.v7.widget.Toolbar
  71.            xmlns:android="http://schemas.android.com/apk/res/android"
  72.            android:id="@+id/toolbar"
  73.            android:layout_width="match_parent"
  74.            android:layout_height="wrap_content"
  75.            android:background="?attr/colorPrimary"
  76.            android:minHeight="?attr/actionBarSize"/>
  77.  
  78.  
  79.     <LinearLayout
  80.        android:layout_width="fill_parent"
  81.        android:layout_height="wrap_content"
  82.        android:orientation="horizontal"
  83.        android:paddingLeft="@dimen/feed_item_padding_left_right"
  84.        android:paddingRight="@dimen/feed_item_padding_left_right" >
  85.  
  86.         <com.android.volley.toolbox.NetworkImageView
  87.            android:id="@+id/profilePic"
  88.            android:layout_width="@dimen/feed_item_profile_pic"
  89.            android:layout_height="@dimen/feed_item_profile_pic"
  90.            android:scaleType="fitCenter" >
  91.         </com.android.volley.toolbox.NetworkImageView>
  92.  
  93.         <LinearLayout
  94.            android:layout_width="fill_parent"
  95.            android:layout_height="wrap_content"
  96.            android:orientation="vertical"
  97.            android:paddingLeft="@dimen/feed_item_profile_info_padd" >
  98.  
  99.             <TextView
  100.                android:id="@+id/name"
  101.                android:layout_width="fill_parent"
  102.                android:layout_height="wrap_content"
  103.                android:textSize="@dimen/feed_item_profile_name"
  104.                android:textStyle="bold" />
  105.  
  106.             <TextView
  107.                android:id="@+id/timestamp"
  108.                android:layout_width="fill_parent"
  109.                android:layout_height="wrap_content"
  110.                android:textColor="@color/timestamp"
  111.                android:textSize="@dimen/feed_item_timestamp" />
  112.         </LinearLayout>
  113.     </LinearLayout>
  114.  
  115.         <TextView
  116.            android:id="@+id/txtStatusMsg"
  117.            android:layout_width="fill_parent"
  118.            android:layout_height="wrap_content"
  119.            android:paddingBottom="5dp"
  120.            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
  121.            android:paddingRight="@dimen/feed_item_status_pad_left_right"
  122.            android:paddingTop="@dimen/feed_item_status_pad_top" />
  123.  
  124.         <TextView
  125.            android:id="@+id/txtUrl"
  126.            android:layout_width="fill_parent"
  127.            android:layout_height="wrap_content"
  128.            android:linksClickable="true"
  129.            android:paddingBottom="10dp"
  130.            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
  131.            android:paddingRight="@dimen/feed_item_status_pad_left_right"
  132.            android:textColorLink="@color/link" />
  133.  
  134.         <com.example.projekt.sasa.FeedImageView
  135.            android:id="@+id/feedImage1"
  136.            android:layout_width="match_parent"
  137.            android:layout_height="wrap_content"
  138.            android:background="@color/white"
  139.            android:scaleType="fitXY"
  140.            android:visibility="visible" />
  141.     </LinearLayout>
  142.  
  143.     <android.support.design.widget.NavigationView android:id="@+id/nav_view"
  144.        android:layout_width="wrap_content"
  145.        android:layout_height="match_parent"
  146.        android:layout_gravity="start"
  147.        android:fitsSystemWindows="true"
  148.        app:headerLayout="@layout/nav_header_main"
  149.        app:menu="@menu/activity_main_drawer" />
  150.  
  151. </android.support.v4.widget.DrawerLayout>
  152. ---------------------------------------------------------------------------------------------------------------------------------------
  153. <resources>
  154.  
  155.     <!-- Base application theme. -->
  156.     <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
  157.         <!-- Customize your theme here. -->
  158.         <item name="colorPrimary">@color/colorPrimary</item>
  159.         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
  160.         <item name="colorAccent">@color/colorAccent</item>
  161.     </style>
  162.  
  163.  
  164.  
  165.     <style name="ToolBarStyle" parent="Theme.AppCompat.Light.DarkActionBar">
  166.         <item name="windowNoTitle">true</item>
  167.         <item name="windowActionBar">false</item>
  168.         ...
  169.     </style>
  170.  
  171.     <style name="NoActionBarTheme" parent="Theme.Design.Light.NoActionBar">
  172.  
  173.     </style>
  174.  
  175.     <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
  176.  
  177.     <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
  178.  
  179. </resources>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement