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

Still working through UI / branding changes (need language updates put...

Still working through UI / branding changes (need language updates put committing to push to gitorious)
parent ae0ed21d
......@@ -7,6 +7,7 @@
android:debuggable="true" >
<activity android:name=".ui.ArtefactExpandableListAdapterActivity"
android:label="@string/app_name"
android:theme="@style/MaharaTheme">
<!--
<activity android:name=".ui.ArtefactExpandableListAdapterActivity"
......@@ -18,10 +19,13 @@
</intent-filter>
</activity>
<activity android:name=".ui.about.AboutActivity"
android:label="@string/about_title">
android:label="@string/about_title"
>
</activity>
<activity android:name=".ui.about.TextViewer" android:label="@string/app_name">
<activity android:name=".ui.about.TextViewer"
android:label="@string/about_title"
>
<!-- Handle plain-text resources -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
......@@ -32,6 +36,7 @@
</activity>
<activity android:name=".ui.ArtifactSettingsActivity"
android:label="@string/artifactsettings"
android:theme="@style/MaharaTheme">
<intent-filter>
<action android:name="nz.net.catalyst.MaharaDroid.ARTEFACTSETTINGS" />
......@@ -47,7 +52,7 @@
</activity>
<activity android:name=".upload.ArtifactSenderActivity"
android:icon="@drawable/icon" android:label="@string/app_name"
android:label="@string/app_name"
android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
......@@ -63,9 +68,8 @@
<data android:mimeType="text/xml" />
</intent-filter>
</activity>
<activity
android:name=".ui.EditPreferences"
android:label="@string/options_menu_prefs" />
<activity android:name=".ui.EditPreferences"
android:label="@string/options_menu_prefs" />
<service android:name=".upload.TransferService" android:label="@string/filetransfers"/>
</application>
......
......@@ -103,7 +103,6 @@
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"
......
......@@ -21,7 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="0dp"
android:layout_margin="0dp"
android:layout_marginLeft="2dp"
android:layout_weight="1"
android:text="Holding Text"
android:layout_gravity="left|center_vertical"
......
......@@ -2,7 +2,7 @@
<resources>
<string name="app_name">MaharaDroid</string>
<string name="artefacts_banner_text">Open source e-portfolios</string>
<string name="artefacts_banner_text">Open source ePortfolios</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>
......
......@@ -10,20 +10,19 @@ 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>
<item name="android:textColor">#3986c3</item>
</style>
<style name="headerBackground">
<item name="android:background">#fff</item>
<!-- <item name="android:background">#efd3f6</item> -->
</style>
<style name="itemBackground">
<item name="android:background">#fff</item>
<!-- <item name="android:background">#f9fBfc</item> -->
<item name="android:layout_marginTop">5dp</item>
<item name="android:layout_marginLeft">5dp</item>
<item name="android:layout_marginRight">5dp</item>
......@@ -41,6 +40,7 @@ Active text field border: #6398C1
<style name="MaharaWindowTitleText" parent="android:TextAppearance.WindowTitle">
<item name="android:textSize">16dip</item>
<!--
<item name="android:layout_marginLeft">2dp</item>
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">normal</item>
-->
......
......@@ -47,10 +47,9 @@ public class ArtefactDataSQLHelper extends SQLiteOpenHelper {
return;
String sql = null;
if (oldVersion == 1)
sql = "";
if (oldVersion == 2)
sql = "";
// Version 7 is the first version with SQL
// if (oldVersion == 8)
// sql = "";
Log.d("EventsData", "onUpgrade : " + sql);
if (sql != null)
......
......@@ -33,6 +33,7 @@ import android.app.Activity;
import android.app.ExpandableListActivity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
......@@ -85,19 +86,34 @@ public class ArtefactExpandableListAdapterActivity extends Activity implements O
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.windowtitle);
((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.app_name));
((ImageView) findViewById(R.id.windowtitle_icon)).setImageResource(R.drawable.windowtitle_icon);
// ((ImageView) findViewById(R.id.windowtitle_icon)).setVisibility(View.GONE);
listview = (ExpandableListView) findViewById(R.id.listView);
// listview.setOnChildClickListener(this);
registerForContextMenu(listview);
loadSavedArtefacts();
handleOrientationChange();
}
public void onResume() {
super.onResume();
super.onResume();
loadSavedArtefacts();
}
handleOrientationChange();
}
private void handleOrientationChange() {
if ( getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ) {
findViewById(R.id.top).setVisibility(View.GONE);
findViewById(R.id.gradient).setVisibility(View.GONE);
findViewById(R.id.middle).setVisibility(View.GONE);
} else {
findViewById(R.id.top).setVisibility(View.VISIBLE);
findViewById(R.id.gradient).setVisibility(View.VISIBLE);
findViewById(R.id.middle).setVisibility(View.VISIBLE);
}
}
@Override
public void onDestroy() {
......
......@@ -30,14 +30,10 @@ import nz.net.catalyst.MaharaDroid.data.ArtefactDataSQLHelper;
import nz.net.catalyst.MaharaDroid.ui.about.AboutActivity;
import nz.net.catalyst.MaharaDroid.upload.TransferService;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.provider.BaseColumns;
......@@ -48,11 +44,9 @@ import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
......@@ -103,7 +97,6 @@ public class ArtifactSettingsActivity extends Activity implements OnClickListene
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.windowtitle);
((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.artifactsettings));
((ImageView) findViewById(R.id.windowtitle_icon)).setImageResource(R.drawable.windowtitle_icon);
btnUpload = (Button)findViewById(R.id.btnUpload);
btnUpload.setOnClickListener(this);
......@@ -114,9 +107,9 @@ public class ArtifactSettingsActivity extends Activity implements OnClickListene
((Button)findViewById(R.id.btnCancel)).setOnClickListener(this);
// Hide soft keyboard on initial load (it gets in the way)
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(((EditText)findViewById(R.id.txtArtifactTitle)).getWindowToken(),
InputMethodManager.HIDE_IMPLICIT_ONLY);
// InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
// imm.hideSoftInputFromWindow(((EditText)findViewById(R.id.txtArtifactTitle)).getWindowToken(),
// InputMethodManager.HIDE_IMPLICIT_ONLY);
// Check acceptance of upload conditions
checkAcceptanceOfConditions();
......
......@@ -60,6 +60,8 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import android.widget.TextView;
import android.widget.Toast;
......@@ -74,10 +76,8 @@ public class EditPreferences extends PreferenceActivity implements OnSharedPrefe
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
addPreferencesFromResource(R.xml.preferences);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.registerOnSharedPreferenceChangeListener(this);
}
......
......@@ -37,6 +37,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.util.Log;
import android.widget.ImageView;
......@@ -76,11 +77,17 @@ public class AboutActivity extends ListActivity {
public void onCreate(Bundle savedInstanceState) {
// requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
// getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.windowtitle);
//((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.about_title));
super.onCreate(savedInstanceState);
parseAboutInfo();
// Top ENUM Discoverer info section
// Top info section
String sectionTitle = mName;
AboutListAdapter section = new AboutListAdapter(R.layout.about_text, mMainInfo);
mSectionedListadapter.addSection(sectionTitle, section);
......
......@@ -31,6 +31,7 @@ import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.widget.TextView;
/**
......@@ -43,8 +44,14 @@ public class TextViewer extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.text_viewer);
// getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.windowtitle);
// ((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.about_title));
Uri uri = getIntent().getData();
if (uri == null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment