Work on basic theme/style.
This commit is contained in:
13
.idea/codeStyleSettings.xml
generated
Normal file
13
.idea/codeStyleSettings.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectCodeStyleSettingsManager">
|
||||||
|
<option name="PER_PROJECT_SETTINGS">
|
||||||
|
<value>
|
||||||
|
<XML>
|
||||||
|
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||||
|
</XML>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -23,7 +23,7 @@
|
|||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -86,6 +86,7 @@
|
|||||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" exported="" name="support-v4-22.0.0" level="project" />
|
<orderEntry type="library" exported="" name="support-v4-22.0.0" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="calligraphy-2.0.2" level="project" />
|
||||||
<orderEntry type="library" exported="" name="realm-android-0.80.1" level="project" />
|
<orderEntry type="library" exported="" name="realm-android-0.80.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-22.0.0" level="project" />
|
<orderEntry type="library" exported="" name="support-annotations-22.0.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-22.0.0" level="project" />
|
<orderEntry type="library" exported="" name="appcompat-v7-22.0.0" level="project" />
|
||||||
|
|||||||
@@ -40,4 +40,5 @@ dependencies {
|
|||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
compile 'com.android.support:appcompat-v7:22.0.0'
|
compile 'com.android.support:appcompat-v7:22.0.0'
|
||||||
compile 'io.realm:realm-android:0.80.1'
|
compile 'io.realm:realm-android:0.80.1'
|
||||||
|
compile 'uk.co.chrisjenx:calligraphy:2.0.2'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:name=".MiceAndMysticsApplication"
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/AppTheme" >
|
||||||
<activity
|
<activity
|
||||||
android:name=".CampaignActivity"
|
android:name=".CampaignActivity"
|
||||||
|
|||||||
BIN
MiceAndMysticsTracker/src/main/assets/Eadui.ttf
Normal file
BIN
MiceAndMysticsTracker/src/main/assets/Eadui.ttf
Normal file
Binary file not shown.
@@ -1,9 +1,11 @@
|
|||||||
package com.eyecreate.miceandmystics.miceandmystics;
|
package com.eyecreate.miceandmystics.miceandmystics;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;
|
||||||
|
|
||||||
|
|
||||||
public class CampaignActivity extends ActionBarActivity {
|
public class CampaignActivity extends ActionBarActivity {
|
||||||
@@ -12,8 +14,14 @@ public class CampaignActivity extends ActionBarActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_campaign);
|
setContentView(R.layout.activity_campaign);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
getSupportActionBar().setIcon(R.mipmap.ic_launcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void attachBaseContext(Context newBase) {
|
||||||
|
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
@@ -30,7 +38,7 @@ public class CampaignActivity extends ActionBarActivity {
|
|||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
//noinspection SimplifiableIfStatement
|
||||||
if (id == R.id.action_settings) {
|
if (id == R.id.action_add_campaign) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.eyecreate.miceandmystics.miceandmystics;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
|
||||||
|
|
||||||
|
public class MiceAndMysticsApplication extends Application {
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
//TODO:init realm here
|
||||||
|
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
|
||||||
|
.setDefaultFontPath("Eadui.ttf")
|
||||||
|
.setFontAttrId(R.attr.fontPath)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@@ -8,9 +8,5 @@
|
|||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
tools:context=".CampaignActivity">
|
tools:context=".CampaignActivity">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="@string/hello_world"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context=".CampaignActivity">
|
tools:context=".CampaignActivity">
|
||||||
<item android:id="@+id/action_settings"
|
<item android:id="@+id/action_add_campaign"
|
||||||
android:title="@string/action_settings"
|
android:title="Add Campaign"
|
||||||
android:orderInCategory="100"
|
android:icon="@android:drawable/ic_menu_add"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="always"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
7
MiceAndMysticsTracker/src/main/res/values/colors.xml
Normal file
7
MiceAndMysticsTracker/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="blood_red">#940008</color>
|
||||||
|
<color name="dark_red">#630808</color>
|
||||||
|
<color name="wood_brown">#663300</color>
|
||||||
|
<color name="parchment_yellow">#FBEDBE</color>
|
||||||
|
</resources>
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Mice and Mystics Campaign Tracker</string>
|
<string name="app_name">Mice and Mystics Tracker</string>
|
||||||
|
|
||||||
<string name="hello_world">Hello world!</string>
|
|
||||||
<string name="action_settings">Settings</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
<style name="AppTheme" parent="Theme.AppCompat">
|
||||||
<!-- Customize your theme here. -->
|
<item name="colorPrimary">@color/blood_red</item>
|
||||||
|
<item name="colorPrimaryDark">@color/dark_red</item>
|
||||||
|
<item name="android:windowBackground">@color/wood_brown</item>
|
||||||
|
<item name="colorAccent">@color/parchment_yellow</item>
|
||||||
|
<item name="android:textColorPrimary">@color/parchment_yellow</item>
|
||||||
|
<item name="actionBarPopupTheme">@style/popupMenu</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="popupMenu" parent="Theme.AppCompat">
|
||||||
|
<item name="android:colorBackground">@color/blood_red</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user