mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2024-11-12 19:18:34 -05:00
Add the downloader activity
Also untrack a whole lot of appcompat that shouldn't have been included
This commit is contained in:
parent
090d866250
commit
b20d0aa819
4
MinimalBible/.settings/org.eclipse.jdt.core.prefs
Normal file
4
MinimalBible/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
@ -1,27 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.bspeice.minimalbible"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name="org.bspeice.minimalbible.BibleViewer"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.bspeice.minimalbible"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name="org.bspeice.minimalbible.BibleViewer"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.bspeice.minimalbible.activities.downloader.DownloaderActivity"
|
||||
android:label="@string/title_activity_downloader" >
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
@ -1,27 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.bspeice.minimalbible"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name="org.bspeice.minimalbible.BibleViewer"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.bspeice.minimalbible"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name="org.bspeice.minimalbible.BibleViewer"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.bspeice.minimalbible.activities.downloader.DownloaderActivity"
|
||||
android:label="@string/title_activity_downloader" >
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
# cache for current jar dependency. DO NOT EDIT.
|
||||
# format is <lastModified> <length> <SHA-1> <path>
|
||||
# Encoding is UTF-8
|
||||
1397435239000 627582 cb6883d96005bc85b3e868f204507ea5b4fa9bbf /home/bspeice/workspace/MinimalBible/MinimalBible/libs/android-support-v4.jar
|
||||
1389983490000 627582 cb6883d96005bc85b3e868f204507ea5b4fa9bbf /home/bspeice/workspace/MinimalBible/appcompat_v7/libs/android-support-v4.jar
|
||||
1397601216283 627582 cb6883d96005bc85b3e868f204507ea5b4fa9bbf C:\Users\bspeice\git\MinimalBible\MinimalBible\libs\android-support-v4.jar
|
||||
1397601220438 627582 cb6883d96005bc85b3e868f204507ea5b4fa9bbf C:\Users\bspeice\git\MinimalBible\appcompat_v7\libs\android-support-v4.jar
|
||||
|
Binary file not shown.
@ -32,7 +32,7 @@
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_drawer"
|
||||
android:name="org.bspeice.minimalbible.NavigationDrawerFragment"
|
||||
android:name="org.bspeice.minimalbible.activities.NavigationDrawerFragment"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
|
11
MinimalBible/res/layout/activity_downloader.xml
Normal file
11
MinimalBible/res/layout/activity_downloader.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".DownloaderActivity" >
|
||||
|
||||
</RelativeLayout>
|
@ -7,4 +7,4 @@
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"
|
||||
tools:context="org.bspeice.minimalbible.NavigationDrawerFragment" />
|
||||
tools:context="org.bspeice.minimalbible.activities.NavigationDrawerFragment" />
|
||||
|
9
MinimalBible/res/menu/downloader.xml
Normal file
9
MinimalBible/res/menu/downloader.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_settings"/>
|
||||
|
||||
</menu>
|
@ -12,5 +12,10 @@
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_downloads"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/title_activity_downloader" />
|
||||
|
||||
</menu>
|
||||
|
8
MinimalBible/res/values-sw600dp/dimens.xml
Normal file
8
MinimalBible/res/values-sw600dp/dimens.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Customize dimensions originally defined in res/values/dimens.xml (such as
|
||||
screen margins) for sw600dp devices (e.g. 7" tablets) here.
|
||||
-->
|
||||
|
||||
</resources>
|
9
MinimalBible/res/values-sw720dp-land/dimens.xml
Normal file
9
MinimalBible/res/values-sw720dp-land/dimens.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Customize dimensions originally defined in res/values/dimens.xml (such as
|
||||
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
|
||||
-->
|
||||
<dimen name="activity_horizontal_margin">128dp</dimen>
|
||||
|
||||
</resources>
|
@ -1,13 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Minimal Bible</string>
|
||||
<string name="title_section1">Section 1</string>
|
||||
<string name="title_section2">Section 2</string>
|
||||
<string name="title_section3">Section 3</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="action_example">Example action</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Minimal Bible</string>
|
||||
<string name="title_section1">Section 1</string>
|
||||
<string name="title_section2">Section 2</string>
|
||||
<string name="title_section3">Section 3</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="action_example">Example action</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_downloader">Downloads</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1,8 +1,12 @@
|
||||
package org.bspeice.minimalbible;
|
||||
|
||||
import org.bspeice.minimalbible.activities.NavigationDrawerFragment;
|
||||
import org.bspeice.minimalbible.activities.downloader.DownloaderActivity;
|
||||
|
||||
import com.readystatesoftware.systembartint.SystemBarTintManager;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@ -106,6 +110,8 @@ public class BibleViewer extends ActionBarActivity implements
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
} else if (id == R.id.action_downloads) {
|
||||
startActivity(new Intent(this, DownloaderActivity.class));
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
@ -1,4 +1,12 @@
|
||||
package org.bspeice.minimalbible;
|
||||
package org.bspeice.minimalbible.activities;
|
||||
|
||||
import org.bspeice.minimalbible.R;
|
||||
import org.bspeice.minimalbible.R.drawable;
|
||||
import org.bspeice.minimalbible.R.id;
|
||||
import org.bspeice.minimalbible.R.layout;
|
||||
import org.bspeice.minimalbible.R.menu;
|
||||
import org.bspeice.minimalbible.R.string;
|
||||
import org.bspeice.minimalbible.activities.downloader.DownloaderActivity;
|
||||
|
||||
import com.readystatesoftware.systembartint.SystemBarTintManager;
|
||||
|
||||
@ -9,6 +17,7 @@ import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.ActionBarDrawerToggle;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
@ -0,0 +1,60 @@
|
||||
package org.bspeice.minimalbible.activities.downloader;
|
||||
|
||||
import org.bspeice.minimalbible.R;
|
||||
import org.bspeice.minimalbible.R.layout;
|
||||
import org.bspeice.minimalbible.R.menu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.view.Menu;
|
||||
|
||||
public class DownloaderActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_downloader);
|
||||
|
||||
displayInternetWarning();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.downloader, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void displayInternetWarning() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
DownloadDialogListener dialogListener = new DownloadDialogListener();
|
||||
builder.setMessage("About to contact servers to download content. Continue?")
|
||||
.setPositiveButton("Yes", dialogListener).setNegativeButton("No", dialogListener)
|
||||
.setCancelable(false).show();
|
||||
}
|
||||
|
||||
private void downloadModules() {
|
||||
|
||||
}
|
||||
|
||||
private class DownloadDialogListener implements DialogInterface.OnClickListener {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
switch (which){
|
||||
case DialogInterface.BUTTON_POSITIVE:
|
||||
// Clicked ready to continue
|
||||
downloadModules();
|
||||
break;
|
||||
|
||||
case DialogInterface.BUTTON_NEGATIVE:
|
||||
// Not going to continue, still show what has
|
||||
// already been downloaded.
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
4
appcompat_v7/.settings/org.eclipse.jdt.core.prefs
Normal file
4
appcompat_v7/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
# cache for current jar dependency. DO NOT EDIT.
|
||||
# format is <lastModified> <length> <SHA-1> <path>
|
||||
# Encoding is UTF-8
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user