mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2025-01-07 22:49:44 -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
|
@ -22,6 +22,10 @@
|
||||
<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>
|
||||
|
@ -22,6 +22,10 @@
|
||||
<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.
@ -240,6 +240,7 @@ int id action_bar_root 0x7f05001a
|
||||
int id action_bar_subtitle 0x7f050023
|
||||
int id action_bar_title 0x7f050022
|
||||
int id action_context_bar 0x7f05001d
|
||||
int id action_downloads 0x7f050043
|
||||
int id action_example 0x7f050042
|
||||
int id action_menu_divider 0x7f050016
|
||||
int id action_menu_presenter 0x7f050017
|
||||
@ -324,11 +325,13 @@ int layout abc_popup_menu_item_layout 0x7f030014
|
||||
int layout abc_search_dropdown_item_icons_2line 0x7f030015
|
||||
int layout abc_search_view 0x7f030016
|
||||
int layout activity_bible_viewer 0x7f030017
|
||||
int layout fragment_main 0x7f030018
|
||||
int layout fragment_navigation_drawer 0x7f030019
|
||||
int layout support_simple_spinner_dropdown_item 0x7f03001a
|
||||
int menu global 0x7f0c0000
|
||||
int menu main 0x7f0c0001
|
||||
int layout activity_downloader 0x7f030018
|
||||
int layout fragment_main 0x7f030019
|
||||
int layout fragment_navigation_drawer 0x7f03001a
|
||||
int layout support_simple_spinner_dropdown_item 0x7f03001b
|
||||
int menu downloader 0x7f0c0000
|
||||
int menu global 0x7f0c0001
|
||||
int menu main 0x7f0c0002
|
||||
int string abc_action_bar_home_description 0x7f0a0001
|
||||
int string abc_action_bar_up_description 0x7f0a0002
|
||||
int string abc_action_menu_overflow_description 0x7f0a0003
|
||||
@ -345,8 +348,10 @@ int string abc_shareactionprovider_share_with_application 0x7f0a000b
|
||||
int string action_example 0x7f0a0013
|
||||
int string action_settings 0x7f0a0014
|
||||
int string app_name 0x7f0a000d
|
||||
int string hello_world 0x7f0a0016
|
||||
int string navigation_drawer_close 0x7f0a0012
|
||||
int string navigation_drawer_open 0x7f0a0011
|
||||
int string title_activity_downloader 0x7f0a0015
|
||||
int string title_section1 0x7f0a000e
|
||||
int string title_section2 0x7f0a000f
|
||||
int string title_section3 0x7f0a0010
|
||||
|
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>
|
@ -13,4 +13,9 @@
|
||||
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>
|
@ -9,5 +9,7 @@
|
||||
<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
|
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
|
Loading…
Reference in New Issue
Block a user