Commit ae0ed21d authored by Alan McNatty's avatar Alan McNatty
Browse files

Commit that includes the bulk of the work towards a new theme as per the default online style

parent d93a3071
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
android:versionCode="7" android:versionCode="7"
android:versionName="1.7"> android:versionName="1.7">
<application android:icon="@drawable/icon" android:label="@string/app_name" <application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="false" > android:debuggable="true" >
<activity android:name=".ui.ArtefactExpandableListAdapterActivity" <activity android:name=".ui.ArtefactExpandableListAdapterActivity"
android:label="@string/app_name" > android:theme="@style/MaharaTheme">
<!-- <!--
<activity android:name=".ui.ArtefactExpandableListAdapterActivity" <activity android:name=".ui.ArtefactExpandableListAdapterActivity"
android:label="@string/options_menu_viewsaved" /> --> android:label="@string/options_menu_viewsaved" /> -->
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".ui.ArtifactSettingsActivity" android:label="@string/artifactsettings"> <activity android:name=".ui.ArtifactSettingsActivity"
android:theme="@style/MaharaTheme">
<intent-filter> <intent-filter>
<action android:name="nz.net.catalyst.MaharaDroid.ARTEFACTSETTINGS" /> <action android:name="nz.net.catalyst.MaharaDroid.ARTEFACTSETTINGS" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
...@@ -45,7 +46,8 @@ ...@@ -45,7 +46,8 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".upload.ArtifactSenderActivity" android:icon="@drawable/icon" android:label="@string/app_name" <activity android:name=".upload.ArtifactSenderActivity"
android:icon="@drawable/icon" android:label="@string/app_name"
android:enabled="true" android:exported="true"> android:enabled="true" android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
...@@ -61,7 +63,8 @@ ...@@ -61,7 +63,8 @@
<data android:mimeType="text/xml" /> <data android:mimeType="text/xml" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".ui.EditPreferences" <activity
android:name=".ui.EditPreferences"
android:label="@string/options_menu_prefs" /> android:label="@string/options_menu_prefs" />
<service android:name=".upload.TransferService" android:label="@string/filetransfers"/> <service android:name=".upload.TransferService" android:label="@string/filetransfers"/>
......
res/drawable/banner.png

11.4 KB | W: | H:

res/drawable/banner.png

16.3 KB | W: | H:

res/drawable/banner.png
res/drawable/banner.png
res/drawable/banner.png
res/drawable/banner.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_expanded="true" android:drawable="@drawable/arrow_down" />
<item android:drawable="@drawable/arrow_right" />
</selector>
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingTop="10dp" android:paddingTop="10dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingLeft="40dp" android:paddingLeft="40dp"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical"
style="@style/itemBackground"
>
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ArtifactTitleLayout" android:id="@+id/ArtifactTitleLayout"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:orientation="horizontal"
android:orientation="horizontal"> android:visibility="gone">
<TextView android:text="@string/upload_title_label" <TextView android:text="@string/upload_title_label"
android:layout_width="50dip" android:layout_width="50dp"
android:singleLine="false" android:singleLine="false"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:textStyle="bold"
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView android:text="@string/upload_description_label" <TextView android:text="@string/upload_description_label"
android:layout_width="50dip" android:layout_width="50dp"
android:singleLine="false" android:singleLine="false"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:textStyle="bold"
...@@ -59,7 +61,7 @@ ...@@ -59,7 +61,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView android:text="@string/upload_tags_label" <TextView android:text="@string/upload_tags_label"
android:layout_width="50dip" android:layout_width="50dp"
android:singleLine="false" android:singleLine="false"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:textStyle="bold"
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView android:text="@string/upload_time_label" <TextView android:text="@string/upload_time_label"
android:layout_width="50dip" android:layout_width="50dp"
android:singleLine="false" android:singleLine="false"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:textStyle="bold"
...@@ -94,6 +96,42 @@ ...@@ -94,6 +96,42 @@
style="@android:style/TextAppearance.Small"> style="@android:style/TextAppearance.Small">
</TextView> </TextView>
</LinearLayout> </LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ArtifactSettingsButtonLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button android:text="@string/btnupload"
android:id="@+id/btnUpload"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/MaharaButton"
>
</Button>
<Button android:text="@string/btnview"
android:id="@+id/btnView"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/MaharaButton"
>
</Button>
<Button android:text="@string/btndelete"
android:id="@+id/btnDelete"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/MaharaButton"
>
</Button>
</LinearLayout>
<TextView android:id="@+id/txtArtifactFilename" <TextView android:id="@+id/txtArtifactFilename"
android:singleLine="true" android:singleLine="true"
android:layout_width="fill_parent" android:layout_width="fill_parent"
......
...@@ -6,92 +6,113 @@ ...@@ -6,92 +6,113 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="#fff"
android:id="@+id/top" android:id="@+id/top"
android:layout_gravity="left"
android:padding="10dp"
> >
<ImageView <ImageView
android:id="@+id/banner" android:id="@+id/banner"
android:layout_width="fill_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="2dp"
android:src="@drawable/banner" android:src="@drawable/banner"
android:layout_gravity="left"
android:scaleType="fitStart"
/> />
</RelativeLayout> </RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/middle" android:layout_width="fill_parent"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:id="@+id/gradient"
android:paddingBottom="10dp" android:layout_below="@+id/top"
android:layout_below="@+id/top" android:background="@drawable/gradient"
> >
</RelativeLayout>
<TextView android:id="@+id/banner_text" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:text="@string/artefacts_banner_text" android:id="@+id/middle"
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:singleLine="false" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:layout_below="@+id/gradient"
android:textStyle="bold" android:layout_marginLeft="10dp"
android:layout_margin="5dp" android:layout_marginRight="10dp"
style="@android:style/TextAppearance.Large" android:layout_marginBottom="10dp"
android:layout_below="@+id/banner" android:layout_marginTop="0dp"
/> >
<TextView android:id="@+id/banner_text2" <TextView android:id="@+id/banner_text"
android:text="@string/artefacts_banner_text2" android:text="@string/artefacts_banner_text"
android:layout_margin="5dp" android:layout_width="wrap_content"
android:layout_width="fill_parent" android:singleLine="false"
android:singleLine="false" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:textStyle="bold"
style="@android:style/TextAppearance.Small" style="@android:style/TextAppearance.Large"
android:layout_below="@+id/banner_text" android:layout_below="@+id/banner"
/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bottom_heading"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#333"
android:layout_below="@+id/middle"
>
<TextView android:id="@+id/saved_artefacts_header"
android:text="@string/options_menu_viewsaved"
android:layout_margin="5dp"
android:layout_width="fill_parent"
android:singleLine="true"
android:layout_height="wrap_content"
style="@android:style/TextAppearance.Medium"
android:layout_below="@+id/banner_text2"
/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bottom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000"
android:layout_below="@+id/bottom_heading"
>
<ExpandableListView android:id="@+id/listView"
android:scrollbars="none"
android:choiceMode="multipleChoice"
android:fastScrollEnabled="true"
android:layout_below="@+id/saved_artefacts_header"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone"
/> />
<TextView android:id="@+id/no_saved_artefacts" <TextView android:id="@+id/banner_text2"
android:text="@string/artefacts_no_saved_artefacts" android:text="@string/artefacts_banner_text2"
android:layout_margin="0dp" android:layout_width="fill_parent"
android:layout_width="fill_parent" android:singleLine="false"
android:singleLine="true" android:layout_height="wrap_content"
android:layout_height="wrap_content" style="@android:style/TextAppearance.Small"
style="@android:style/TextAppearance.Small" android:layout_below="@+id/banner_text"
android:layout_below="@+id/listView" />
android:visibility="gone" </RelativeLayout>
/> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
</RelativeLayout> android:id="@+id/bottom_heading"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/headerBackground"
android:layout_below="@+id/middle"
>
<ImageView
android:id="@+id/saved"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/saved"
android:layout_gravity="left"
android:layout_marginLeft="10dp"
/>
<TextView android:id="@+id/saved_artefacts_header"
android:text="@string/options_menu_viewsaved"
android:layout_width="fill_parent"
android:singleLine="true"
android:layout_height="wrap_content"
style="@style/headerText"
android:layout_below="@+id/banner_text2"
android:layout_marginLeft="10dp"
android:gravity="left|bottom"
android:layout_toRightOf="@id/saved"
android:layout_centerInParent="true"
/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bottom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/bottom_heading"
android:layout_margin="5dp"
>
<ExpandableListView android:id="@+id/listView"
android:scrollbars="none"
android:choiceMode="multipleChoice"
android:fastScrollEnabled="true"
android:layout_below="@+id/saved_artefacts_header"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone"
android:headerDividersEnabled="true"
android:footerDividersEnabled="true"
android:groupIndicator="@drawable/expander_group"
/>
<!-- -->
<TextView android:id="@+id/no_saved_artefacts"
android:text="@string/artefacts_no_saved_artefacts"
android:layout_margin="0dp"
android:layout_width="fill_parent"
android:singleLine="true"
android:layout_height="wrap_content"
style="@android:style/TextAppearance.Small"
android:layout_below="@+id/listView"
android:visibility="gone"
/>
</RelativeLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
android:id="@+id/ArtifactConfirmLayout" android:id="@+id/ArtifactConfirmLayout"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"> android:orientation="horizontal">
<CheckBox android:text="@string/upload_confirm_label" <CheckBox android:text="@string/upload_confirm_label"
...@@ -127,24 +126,28 @@ ...@@ -127,24 +126,28 @@
<Button android:text="@string/btnupload" <Button android:text="@string/btnupload"
android:id="@+id/btnUpload" android:id="@+id/btnUpload"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:enabled="false"
style="@style/MaharaButton"
> >
</Button> </Button>
<Button android:text="@string/btnsave" <Button android:text="@string/btnsave"
android:id="@+id/btnSave" android:id="@+id/btnSave"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:enabled="false"
style="@style/MaharaButton"
> >
</Button> </Button>
<Button android:text="@string/btncancellabel" <Button android:text="@string/btncancellabel"
android:id="@+id/btnCancel" android:id="@+id/btnCancel"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
style="@style/MaharaButton"
>
</Button> </Button>
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<ImageView
android:id="@+id/windowtitle_icon"
android:src="@drawable/windowtitle_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_weight="0"
android:padding="0dp"
android:layout_margin="0dp"
android:scaleType="fitStart"
/>
<TextView
android:id="@+id/windowtitle_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="0dp"
android:layout_margin="0dp"
android:layout_weight="1"
android:text="Holding Text"
android:layout_gravity="left|center_vertical"
style="@style/MaharaWindowTitleText"
/>
</LinearLayout>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<resources> <resources>
<string name="app_name">MaharaDroid</string> <string name="app_name">MaharaDroid</string>
<string name="artefacts_banner_text">Open source eportfolios</string> <string name="artefacts_banner_text">Open source e-portfolios</string>
<string name="artefacts_banner_text2">[mah-har-rah;verb]: to think, thinking, thought</string> <string name="artefacts_banner_text2">[mah-har-rah;verb]: to think, thinking, thought</string>
<string name="artefacts_no_saved_artefacts">No saved artefacts</string> <string name="artefacts_no_saved_artefacts">No saved artefacts</string>
...@@ -65,7 +65,9 @@ ...@@ -65,7 +65,9 @@
<string name="btnok">OK</string> <string name="btnok">OK</string>
<string name="btnupload">Upload</string> <string name="btnupload">Upload</string>
<string name="btnsave">Save</string> <string name="btnsave">Save</string>
<string name="btndelete">Delete</string>
<string name="btnsendlabel">Send</string> <string name="btnsendlabel">Send</string>
<string name="btnview">View</string>
<string name="btncancellabel">Cancel</string> <string name="btncancellabel">Cancel</string>
<string name="lbluploadoptions">Upload Settings</string> <string name="lbluploadoptions">Upload Settings</string>
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Title Background: #EFD3F6
Font-Color: #3986C3
Details Background: #F9FBFC
Details top border-top: #D0E4F3
Active text field border: #6398C1
-->
<style name="MaharaTheme" parent="@android:style/Theme.Light">
<item name="android:typeface">sans</item>
<item name="android:listDivider">@android:drawable/divider_horizontal_bright</item>
<item name="android:windowTitleSize">38dp</item>
<item name="android:windowTitleStyle">@style/MaharaWindowTitle</item>
<item name="android:windowTitleBackgroundStyle">@style/MaharaWindowTitleBackground</item>
</style>
<style name="headerText" parent="android:TextAppearance.Medium">
<item name="android:textColor">#3786c1</item>
</style>
<style name="headerBackground">
<item name="android:background">#fff</item>
</style>
<style name="itemBackground">
<item name="android:background">#fff</item>
<item name="android:layout_marginTop">5dp</item>
<item name="android:layout_marginLeft">5dp</item>
<item name="android:layout_marginRight">5dp</item>
<item name="android:paddingTop">5dp</item>
<item name="android:paddingLeft">5dp</item>
<item name="android:paddingRight">5dp</item>
</style>
<style name="MaharaButton">
<item name="android:background">@drawable/button</item>
<item name="android:textColor">#fff</item>
<item name="android:padding">2dp</item>
<item name="android:layout_margin">2dp</item>
</style>
<style name="MaharaWindowTitleText" parent="android:TextAppearance.WindowTitle">
<item name="android:textSize">16dip</item>
<!--
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">normal</item>
-->
</style>
<style name="MaharaWindowTitleBackground">
<item name="android:background">@drawable/windowtitle_background</item>
</style>
<!-- Set the theme for the window title -->
<!-- NOTE: setting android:textAppearence to style defined above -->
<style name="MaharaWindowTitle" parent="android:WindowTitle">
<item name="android:textAppearance">@style/MaharaWindowTitleText</item>
</style>
</resources>
\ No newline at end of file
...@@ -30,6 +30,7 @@ import nz.net.catalyst.MaharaDroid.data.Artefact; ...@@ -30,6 +30,7 @@ import nz.net.catalyst.MaharaDroid.data.Artefact;
import nz.net.catalyst.MaharaDroid.data.ArtefactDataSQLHelper; import nz.net.catalyst.MaharaDroid.data.ArtefactDataSQLHelper;
import nz.net.catalyst.MaharaDroid.ui.about.AboutActivity; import nz.net.catalyst.MaharaDroid.ui.about.AboutActivity;
import android.app.Activity; import android.app.Activity;
import android.app.ExpandableListActivity;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
...@@ -46,15 +47,20 @@ import android.view.MenuInflater; ...@@ -46,15 +47,20 @@ import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.Window;
import android.view.ContextMenu.ContextMenuInfo; import android.view.ContextMenu.ContextMenuInfo;
import android.view.View.OnClickListener;
import android.view.View.OnCreateContextMenuListener; import android.view.View.OnCreateContextMenuListener;
import android.widget.BaseExpandableListAdapter; import android.widget.BaseExpandableListAdapter;