Commit e2e92328 authored by Jonathan Sharp's avatar Jonathan Sharp

Add intro screen and text

parent 7d2aa01a
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="right" >
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/introduction"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="2dip"
style="@style/headerBackground"
android:visibility="visible"
>
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="right" >
<ImageView
<RelativeLayout
android:id="@+id/introduction"
style="@style/headerBackground"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="2dip"
android:visibility="visible" >
<ImageView
android:id="@+id/banner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:src="@drawable/banner"
/>
android:src="@drawable/banner" />
<TextView android:id="@+id/artefacts_banner_text"
android:text="@string/artefacts_banner_text"
android:layout_width="wrap_content"
android:singleLine="false"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_margin="5dp"
style="@android:style/TextAppearance.Large"
android:layout_below="@+id/banner"
/>
<TextView android:id="@+id/artefacts_banner_text2"
android:text="@string/artefacts_banner_text2"
android:layout_margin="5dp"
android:layout_width="fill_parent"
android:singleLine="false"
android:layout_height="wrap_content"
style="@android:style/TextAppearance.Small"
android:layout_below="@+id/artefacts_banner_text"
/>
<TextView
android:id="@+id/artefacts_banner_text"
style="@android:style/TextAppearance.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/banner"
android:layout_margin="5dp"
android:singleLine="false"
android:text="@string/artefacts_banner_text"
android:textStyle="bold" />
<TextView android:id="@+id/artefacts_help"
android:layout_margin="5dp"
android:layout_width="fill_parent"
android:singleLine="false"
android:layout_height="wrap_content"
style="@android:style/TextAppearance.Small"
android:layout_below="@+id/artefacts_banner_text2"
/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/artefacts"
android:orientation="vertical"
<TextView
android:id="@+id/artefacts_banner_text2"
style="@android:style/TextAppearance.Small"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/artefacts_banner_text"
android:layout_margin="5dp"
android:singleLine="false"
android:text="@string/artefacts_banner_text2" />
<Button
android:id="@+id/start_but"
style="@style/MaharaButton"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_below="@+id/artefacts_banner_text2"
android:text="@string/start_but"
android:onClick="myOnClickStartBut" />
<TextView
android:id="@+id/artefacts_help"
style="@android:style/TextAppearance.Small"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="2dip"
style="@style/headerBackground"
android:visibility="visible"
android:layout_below="@+id/introduction"
>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/body_heading"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/headerBackground"
>
<ImageView
android:layout_below="@+id/start_but"
android:layout_margin="5dp"
android:singleLine="false" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/artefacts"
style="@style/headerBackground"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/introduction"
android:orientation="vertical"
android:padding="2dip"
android:visibility="visible" >
<RelativeLayout
android:id="@+id/body_heading"
style="@style/headerBackground"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<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_marginLeft="10dp"
android:gravity="left|bottom"
android:layout_toRightOf="@id/saved"
android:layout_centerInParent="true"
/>
android:layout_marginLeft="10dp"
android:src="@drawable/saved" />
<TextView
android:id="@+id/saved_artefacts_header"
style="@style/headerText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@id/saved"
android:gravity="left|bottom"
android:singleLine="true"
android:text="@string/options_menu_viewsaved" />
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/body"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/body_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"
<RelativeLayout
android:id="@+id/body"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/body_heading"
android:layout_margin="5dp" >
<ExpandableListView
android:id="@+id/listView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:headerDividersEnabled="true"
android:layout_below="@+id/saved_artefacts_header"
android:layout_weight="1"
android:choiceMode="multipleChoice"
android:fastScrollEnabled="true"
android:footerDividersEnabled="true"
/>
<!-- android:groupIndicator="@drawable/expander_group" -->
android:headerDividersEnabled="true"
android:scrollbars="none" />
<!-- android:groupIndicator="@drawable/expander_group" -->
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
......@@ -27,4 +27,5 @@
android:layout_gravity="left|center_vertical"
style="@style/MaharaWindowTitleText"
/>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
......@@ -5,16 +5,16 @@
<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_help">&lt;p&gt;Thanks for using MaharaDroid!&lt;/p&gt;
&lt;p&gt;To get started touch Menu -&gt; Preferences.&lt;/p&gt;
&lt;p&gt;To get started touch Start button, then Preferences and
enter your Mahara username and set an initial token. At the same time visit Mahara (Settings) and set the same token value and click update.
Back in MaharaDroid touch your back button, and an authentication attempt will be made.
&lt;/p&gt;
&lt;p&gt;
Enter your Mahara username on set the initial token. At the same time visit Mahara (Settings) and set the same token value and click update.
Back in MaharaDroid touch your back button, and an authentication attempt will be made.
&lt;/p&gt;
&lt;p&gt;
Once authenticated check the Menu for options on writing Journal posts and uploading files.
Alternatively when taking photos, videos or recording audio look for options to \'share\' these files with MaharaDroid.
&lt;/p&gt;
Once authenticated, check the Menu for writing Journal posts and uploading files.
Alternatively when taking photos, videos or recording audio, look for options to \'share\' these files with MaharaDroid.
&lt;/p&gt;
</string>
<string name="start_but">Start</string>
<string name="artefacts_no_saved_artefacts">Nothing saved at present.</string>
<string name="options_menu_prefs">Preferences</string>
......
......@@ -73,7 +73,8 @@ public class SyncContentProvider extends ContentProvider {
return null;
}
public Uri insert(Uri uri, ContentValues contentvalues) {
@Override
public Uri insert(Uri uri, ContentValues contentvalues) {
if (contentvalues == null)
return null;
......@@ -112,4 +113,8 @@ public class SyncContentProvider extends ContentProvider {
String[] as) {
return 0;
}
public void close() {
dbHelper.getWritableDatabase().close();
}
}
......@@ -116,16 +116,29 @@ public class ArtefactExpandableListAdapterActivity extends Activity {
// A content view has now be set so lets set the title.
((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.app_name));
if (VERBOSE)
Log.v(TAG, "onCreate() called");
if (VERBOSE) Log.v(TAG, "onCreate() called");
}
// public void onResume() {
// super.onResume();
@Override
public void onResume() {
//if (DEBUG) Log.d(TAG, "in onResume");
super.onResume();
/* Opens the options menu (normally opened when you touch the menu button)
* If openOptionsMenu() called in activity - can break app as window etc not fully built
* so do this way
*/
//new Handler().postDelayed(new Runnable() {
// public void run() {
// openOptionsMenu();
// }
//}, 1000);
// if ( VERBOSE ) Log.v(TAG, "onResume() calls loadSavedArtefacts");
// updateView();
// }
}
@Override
public void onDestroy() {
super.onDestroy();
......@@ -143,7 +156,8 @@ public class ArtefactExpandableListAdapterActivity extends Activity {
// If none then we show introduction screen
if (a_array == null || a_array.length <= 0) {
// Show the introduction screen
//if (DEBUG) Log.d(TAG, "showing introduction");
// Show the introduction screen, hide saved items list
((RelativeLayout) findViewById(R.id.introduction)).setVisibility(View.VISIBLE);
((TextView) findViewById(R.id.artefacts_help)).setText(Html.fromHtml(getString(R.string.artefacts_help)));
((RelativeLayout) findViewById(R.id.artefacts)).setVisibility(View.GONE);
......@@ -151,12 +165,13 @@ public class ArtefactExpandableListAdapterActivity extends Activity {
// Else we have some artefacts to show lets load them up in our
// ExpandableListAdapter
} else {
//if (DEBUG) Log.d(TAG, "showing saved items");
adapter = new ArtefactExpandableListAdapter(this, new ArrayList<String>(),
new ArrayList<ArrayList<Artefact>>());
listview = (ExpandableListView) findViewById(R.id.listView);
listview.setAdapter(adapter);
// Hide the introduction bits
// Hide the introduction bits, show saved items list
((RelativeLayout) findViewById(R.id.introduction)).setVisibility(View.GONE);
((RelativeLayout) findViewById(R.id.artefacts)).setVisibility(View.VISIBLE);
......@@ -171,11 +186,18 @@ public class ArtefactExpandableListAdapterActivity extends Activity {
adapter.notifyDataSetChanged();
listview.invalidate();
}
}
public void myOnClickStartBut(View v) {
openOptionsMenu();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//if (DEBUG) Log.d(TAG, "in onCreateOptionsMenu");
boolean result = super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
......
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