Skip to content

Commit

Permalink
Merge pull request #15 from elimu-ai/14-Rename-from-org.literacyapp-t…
Browse files Browse the repository at this point in the history
…o-elimu.ai

14 rename from org.literacyapp to elimu.ai
  • Loading branch information
nya-elimu authored Dec 15, 2018
2 parents cf7750f + 3125123 commit 5d2645b
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 161 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ android:

notifications:
email: false
slack: elimu-ai:5hNcmHPFkAETjJZjrkBlNTxr
12 changes: 5 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "org.literacyapp.storybooks"
applicationId "ai.elimu.storybooks"
minSdkVersion 21
targetSdkVersion 23
versionCode 1000001
versionName "1.0.1"
versionCode 2000000
versionName "2.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand All @@ -27,7 +27,7 @@ android {
repositories {
mavenLocal()
maven {
url "http://archiva.educativo.eu:8081/repository/internal/"
url "https://dl.bintray.com/elimu-ai/maven/"
}
maven {
url "https://jitpack.io"
Expand All @@ -42,10 +42,8 @@ dependencies {
})
testCompile 'junit:junit:4.12'

compile 'org.literacyapp:literacyapp-model:1.1.53'
compile 'org.literacyapp:contentprovider:1.0.9'
compile 'ai.elimu:model:1.2.10'
compile 'org.greenrobot:greendao:3.2.0'
compile 'org.literacyapp.analytics:eventtracker:1.0.3'

compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.literacyapp.storybooks;
package ai.elimu.storybooks;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
Expand All @@ -21,6 +21,6 @@ public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("org.literacyapp.storybooks", appContext.getPackageName());
assertEquals("ai.elimu.storybooks", appContext.getPackageName());
}
}
10 changes: 4 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.literacyapp.storybooks">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
package="ai.elimu.storybooks">

<application
android:allowBackup="true"
Expand All @@ -11,18 +9,18 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".MainActivity">
<activity android:name="ai.elimu.storybooks.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".StoryBooksActivity" />
<activity android:name="ai.elimu.storybooks.StoryBooksActivity" />

<activity
android:name=".TabbedActivity"
android:name="ai.elimu.storybooks.TabbedActivity"
android:label="@string/title_activity_tabbed"
android:theme="@style/AppTheme.NoActionBar"></activity>
</application>
Expand Down
29 changes: 29 additions & 0 deletions app/src/main/java/ai/elimu/storybooks/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package ai.elimu.storybooks;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

public class MainActivity extends AppCompatActivity {

private static final int PERMISSION_REQUEST_READ_EXTERNAL_STORAGE = 0;

@Override
protected void onCreate(Bundle savedInstanceState) {
Log.i(getClass().getName(), "onCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

@Override
protected void onStart() {
Log.i(getClass().getName(), "onStart");
super.onStart();

Intent intent = new Intent(this, StoryBooksActivity.class);
startActivity(intent);

finish();
}
}
79 changes: 79 additions & 0 deletions app/src/main/java/ai/elimu/storybooks/StoryBooksActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package ai.elimu.storybooks;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayout;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

//import ai.elimu.analytics.eventtracker.EventTracker;
//import ai.elimu.contentprovider.ContentProvider;
//import ai.elimu.contentprovider.model.content.StoryBook;
//import ai.elimu.contentprovider.util.MultimediaHelper;
//import ai.elimu.model.enums.GradeLevel;

import java.io.File;
import java.util.List;

public class StoryBooksActivity extends AppCompatActivity {

private GridLayout storyBooksGridLayout;

@Override
protected void onCreate(Bundle savedInstanceState) {
Log.i(getClass().getName(), "onCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_storybooks);

storyBooksGridLayout = (GridLayout) findViewById(R.id.storyBookGridLayout);

// List<StoryBook> storyBooks = ContentProvider.getAllStoryBooks(GradeLevel.LEVEL1);
// Log.i(getClass().getName(), "storyBooks.size(): " + storyBooks.size());
//
// for (final StoryBook storyBook : storyBooks) {
// View storyBookView = LayoutInflater.from(this).inflate(R.layout.activity_storybooks_cover_view, storyBooksGridLayout, false);
//
// File storyBookCoverFile = MultimediaHelper.getFile(storyBook.getCoverImage());
// Log.i(getClass().getName(), "storyBookCoverFile: " + storyBookCoverFile);
// if (storyBookCoverFile.exists()) {
// ImageView storyBookImageView = (ImageView) storyBookView.findViewById(R.id.storyBookCoverImageView);
// Bitmap bitmap = BitmapFactory.decodeFile(storyBookCoverFile.getAbsolutePath());
// storyBookImageView.setImageBitmap(bitmap);
// }
//
// TextView storyBookCoverTitleTextView = (TextView) storyBookView.findViewById(R.id.storyBookCoverTitleTextView);
// storyBookCoverTitleTextView.setText(storyBook.getTitle());
//
// storyBookView.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Log.i(getClass().getName(), "onClick");
//
// Log.i(getClass().getName(), "storyBook.getId(): " + storyBook.getId());
// Log.i(getClass().getName(), "storyBook.getTitle(): " + storyBook.getTitle());
//
// EventTracker.reportStoryBookLearningEvent(getApplicationContext(), storyBook.getId());
//
//// Intent intent = new Intent(getApplicationContext(), StoryBookActivity.class);
// Intent intent = new Intent(getApplicationContext(), TabbedActivity.class);
// intent.putExtra(TabbedActivity.EXTRA_KEY_STORYBOOK_ID, storyBook.getId());
// startActivity(intent);
// }
// });
//
// storyBooksGridLayout.addView(storyBookView);
// }
}

@Override
protected void onStart() {
Log.i(getClass().getName(), "onStart");
super.onStart();
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.literacyapp.storybooks;
package ai.elimu.storybooks;

import android.media.MediaPlayer;
import android.support.design.widget.FloatingActionButton;
Expand Down
62 changes: 0 additions & 62 deletions app/src/main/java/org/literacyapp/storybooks/MainActivity.java

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_tabbed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.literacyapp.storybooks.TabbedActivity">
tools:context="ai.elimu.storybooks.TabbedActivity">

<!--<android.support.design.widget.AppBarLayout-->
<!--android:id="@+id/appbar"-->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_tabbed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="org.literacyapp.storybooks.TabbedActivity$PlaceholderFragment">
tools:context="ai.elimu.storybooks.TabbedActivity$PlaceholderFragment">

<LinearLayout
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_tabbed.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.literacyapp.storybooks.TabbedActivity">
tools:context="ai.elimu.storybooks.ai.elimu.storybooks.TabbedActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.literacyapp.storybooks;
package ai.elimu.storybooks;

import org.junit.Test;

Expand Down

0 comments on commit 5d2645b

Please sign in to comment.