Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master branch after completion of GSoC EndTerm 2016 #151

Merged
merged 85 commits into from
Aug 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
da9bc97
Added DictationModel.class
opticod Jul 4, 2016
e63647b
Added DictationAdapter.java
opticod Jul 4, 2016
ef4eae1
Added DictationTemplate.java
opticod Jul 4, 2016
6137843
Added dictation layouts + updated strings.xml
opticod Jul 4, 2016
da9624b
Added DictationTemplate in the template list
opticod Jul 4, 2016
bfcbded
Added dictation_content.xml
opticod Jul 10, 2016
a38f5be
Added DictationApp.apk
opticod Jul 10, 2016
93b5365
Added dictation simulator's adapter
opticod Jul 10, 2016
2e0ca91
Added dictation simulator's resource values
opticod Jul 10, 2016
f36a995
Added dictation simulator's layouts
opticod Jul 10, 2016
06c1783
Updated dictation template for simulator support and apk generation
opticod Jul 10, 2016
875f21e
Added dictation simulator's Utilities + constants
opticod Jul 10, 2016
14b5653
Added dictation simulator's data files
opticod Jul 10, 2016
0f61184
Added dictation simulator's frgaments
opticod Jul 11, 2016
78028cb
Added missing drawables
opticod Jul 11, 2016
96a29f2
FIXED #150 :: Wrong template Id is retrieved after loading a project.
opticod Jul 14, 2016
b7579ea
1. Reduced the distance between the cards. 2. Added Progress Bar to l…
opticod Jul 15, 2016
1d8989d
Adding Meta Base Adapter for Match The Following Template
opticod Jul 16, 2016
1737676
FIXED :: Project Deletion Crash of App
opticod Jul 16, 2016
3e6fde4
Added new designs for Match the following Template
opticod Jul 16, 2016
4093e5a
Adding Base Adapter for Match The Following Template
opticod Jul 16, 2016
70fe777
Adding Meta Base Model for Match The Following Template
opticod Jul 17, 2016
21491f9
Adding Base Model for Match The Following Template
opticod Jul 17, 2016
90b03fa
Adding main template file for Match The Following Template
opticod Jul 17, 2016
609e1c6
Adding meta layouts for Match The Following Template
opticod Jul 17, 2016
1a8e79e
Adding base layouts for Match The Following Template
opticod Jul 17, 2016
02b953e
Attaching Match the following template in template list
opticod Jul 18, 2016
8aa29fa
Added match_content basic xml
opticod Jul 28, 2016
6e17b87
Added MatchTemplateApp.apk
opticod Jul 28, 2016
3c6cccd
Updated colors.xml + dimens.xml + strings.xml to support match_template
opticod Jul 29, 2016
a096916
Added match_template simulator's main fragment layouts
opticod Jul 29, 2016
5cef70c
Added match_template simulator's detail fragment layouts
opticod Jul 29, 2016
d09c19d
Added match_template simulator's list_item_info
opticod Jul 29, 2016
5deb61b
Added match_template simulator's drawables
opticod Jul 30, 2016
3cd3963
Added match_template simulator's adapters
opticod Jul 30, 2016
4f9e7c4
Added match_template simulator's MainFragment
opticod Jul 30, 2016
3e84712
Added match_template simulator's splash fragment
opticod Jul 30, 2016
372e85b
Added match_template simulator's DetailFragment
opticod Jul 30, 2016
3c76f6c
Added match_template simulator's models
opticod Jul 30, 2016
40d58da
Added match_template simulator's database files
opticod Jul 30, 2016
76b20b5
Added match_template simulator's fetch_xml_task + dataUtils + constan…
opticod Jul 30, 2016
85ed1af
Added thumbnails
opticod Aug 2, 2016
20c1d82
Added values + strings + styles + dimens + colors LearnSpellingTemplate
opticod Aug 7, 2016
11e1e23
Added updated LearnSpellingsApp.apk
opticod Aug 7, 2016
efdbfbd
Added drawables + nav_header_main_spell.xml + app_bar_main_spell.xml
opticod Aug 7, 2016
4776f15
Added app_bar_response_spell.xml + content_main_spell.xml + content_r…
opticod Aug 7, 2016
4a81a63
Added fragment_last_spell.xml + fragment_main_spell.xml + fragment_re…
opticod Aug 7, 2016
ff50724
Added nav_header_main_spell.xml + updated spelling_dialog_spellinginp…
opticod Aug 7, 2016
5504b57
Added Databse Utils file for spellingTemplate simulator
opticod Aug 7, 2016
3da9142
Added SplashFragment.java + ResponseFragment.java
opticod Aug 7, 2016
e0e69b2
Added LastFragment.java + MainFragment.java
opticod Aug 7, 2016
b206630
Removed old simulators java files
opticod Aug 7, 2016
879c47a
Updating new simulator path to template
opticod Aug 7, 2016
7450628
Added updated new FlashCardTemplateApp.apk
opticod Aug 9, 2016
dc69bce
Removed old files
opticod Aug 9, 2016
a870e27
Added data files for flash_card_template simulator
opticod Aug 9, 2016
3b19778
Updated values colors+dimens+strings
opticod Aug 9, 2016
35da2c2
Added animations + widgets + constants
opticod Aug 9, 2016
bb36259
Added necessary drawables for flash_template_simulator
opticod Aug 9, 2016
bacd583
Added answer_layout_flash_card.xml + app_bar_main_flash.xml
opticod Aug 9, 2016
5876465
Added content_main_flash.xml + fragment_last_flash.xml
opticod Aug 9, 2016
22640a4
Added remaining layouts for flash_template simulator
opticod Aug 10, 2016
6759957
Added all fragments for flash_simulator + finally attching new design…
opticod Aug 10, 2016
bb37141
Added thumbnail of flash_template
opticod Aug 10, 2016
21570e8
Added updated QuizTemplateApp.apk
opticod Aug 13, 2016
d9ea423
Removed old design of quiz_template
opticod Aug 13, 2016
d3e3427
Made changes in comprehension_simulator design
opticod Aug 13, 2016
5ed2463
Updated dimens + strings for quiz_template
opticod Aug 13, 2016
bcc3e12
Added data files to handle quiz_simulator
opticod Aug 13, 2016
6b130ff
Added all fragments for quiz_template + constants
opticod Aug 13, 2016
1ce09a6
Finally attaching the newly created quizTemplate simulator link
opticod Aug 13, 2016
93d297b
Updated thumbnail of quiz_template
opticod Aug 13, 2016
4a001b2
Next Version is set to 2.0.0 with version code 2 for apk. #54
opticod Aug 15, 2016
d999842
#35, SingleLine Template Name
opticod Aug 15, 2016
805c83f
Added backOnPressed to hide the navigationDrawer
opticod Aug 15, 2016
9a25823
Fixed #14 : Back button not working in Slider Menu.
opticod Aug 19, 2016
a785099
Added #83 : Share Project Feature
opticod Aug 19, 2016
57d0dd2
Changed template editor listView to recyclerView
opticod Aug 20, 2016
3ce6b60
MatchTemplate entries made single line
opticod Aug 21, 2016
210a2fd
Updated MatchTemplate assets apk
opticod Aug 21, 2016
760f521
Making Production Ready + Code CleanUp + Improved Code Quality - 4
opticod Aug 21, 2016
4f5e5e7
Added mobile site address in youtube video info fetching
opticod Aug 21, 2016
75c2e21
Added asynchronous loading of template thumbnail
opticod Aug 22, 2016
7132a74
Added few changes on feedback
opticod Aug 22, 2016
38a6743
Added documentations
opticod Aug 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions source-code/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ android {
applicationId "org.buildmlearn.toolkit"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
versionCode 2
versionName "2.0.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import static org.hamcrest.core.IsInstanceOf.instanceOf;

/**
* Espresso test designed to test all the functionalities of Comprehension template
* Created by anupam (opticod) on 7/6/16.
*/

Expand Down
1 change: 1 addition & 0 deletions source-code/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".activity.HomeActivity"
Expand Down
Binary file added source-code/app/src/main/assets/DictationApp.apk
Binary file not shown.
Binary file modified source-code/app/src/main/assets/FlashCardTemplateApp.apk
100755 → 100644
Binary file not shown.
Binary file modified source-code/app/src/main/assets/LearnSpellingsApp.apk
100755 → 100644
Binary file not shown.
Binary file added source-code/app/src/main/assets/MatchApp.apk
Binary file not shown.
Binary file modified source-code/app/src/main/assets/QuizTemplateApp.apk
100755 → 100644
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildmlearn_application type="DictationTemplate">
<author>
<name>Anupam</name>
</author>
<title>Dictation</title>
<data>
<item>
<dictation_title>Dream of the Rarebit Fiend</dictation_title>
<dictation_passage>Dream of the Rarebit Fiend was a newspaper comic strip by American cartoonist Winsor McCay, begun September 10, 1904, that depicted fantastic bizarre dreams. It was McCay's second successful strip after Little Sammy Sneeze secured him a position on the cartoon staff of the New York Herald. Rarebit Fiend was printed in the Evening Telegram, a newspaper published by the Herald. The strip had no continuity or recurring characters.</dictation_passage>
</item>
<item>
<dictation_title>Earthworks</dictation_title>
<dictation_passage>Bill Bruford's Earthworks were a British jazz band led by drummer Bill Bruford. The band recorded several albums for Editions EG, Discipline Global Mobile and Summerfold Records.

Earthworks went through several line-ups: in addition to the band's accomplishments as a unit, Earthworks was a training ground for Django Bates, Iain Ballamy, Patrick Clahar, Mark Hodgson, Steve Hamilton and Gwilym Simcock. The final band line-up featured previously established jazz musicians in the form of Chick Corea sideman Tim Garland and veteran bass player Laurence Cottle. In interviews during the band's earlier years, Bruford sometimes compared his responsibilities within it as being similar to those of Art Blakey with the Jazz Messengers, in that he was providing an environment for young British jazz players to gain attention and experience before going on to become well-known players and bandleaders in their own right.</dictation_passage>
</item>
</data>
</buildmlearn_application>
38 changes: 38 additions & 0 deletions source-code/app/src/main/assets/template_assets/match_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildmlearn_application type="MatchTemplate">
<author>
<name>Anupam</name>
</author>
<title>Country Match</title>
<data>
<meta_details>
<meta_title>Match the countries</meta_title>
<meta_first_list_title>Country</meta_first_list_title>
<meta_second_list_title>Capital</meta_second_list_title>
</meta_details>
<item>
<first_list_item>India</first_list_item>
<second_list_item>New Delhi</second_list_item>
</item>
<item>
<first_list_item>Bangladesh</first_list_item>
<second_list_item>Dhaka</second_list_item>
</item>
<item>
<first_list_item>Malaysia</first_list_item>
<second_list_item>Kuala Lumpur</second_list_item>
</item>
<item>
<first_list_item>Pakistan</first_list_item>
<second_list_item>Islamabad</second_list_item>
</item>
<item>
<first_list_item>Portugal</first_list_item>
<second_list_item>Lisbon</second_list_item>
</item>
<item>
<first_list_item>Syria</first_list_item>
<second_list_item>Damascus</second_list_item>
</item>
</data>
</buildmlearn_application>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

import org.buildmlearn.toolkit.R;

import java.util.Locale;

/**
* @brief Gives brief info about BuildmLearn community and toolkit
*/
Expand All @@ -30,9 +32,10 @@ protected void onCreate(Bundle savedInstanceState) {
pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
String version = pInfo.versionName;
assert findViewById(R.id.app_version) != null;
((TextView)findViewById(R.id.app_version)).setText("Version: " + version);
((TextView) findViewById(R.id.app_version)).setText(String.format(Locale.ENGLISH, "Version: %s", version));
} catch (PackageManager.NameNotFoundException e) {
assert findViewById(R.id.app_version) != null;
assert ((TextView) findViewById(R.id.app_version)) != null;
((TextView)findViewById(R.id.app_version)).setText("Version: 1.0");
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class HomeActivity extends AppCompatActivity
implements NavigationDrawerFragment.NavigationDrawerCallbacks {

private Section currentSection;
private NavigationDrawerFragment mNavigationDrawerFragment;

/**
* {@inheritDoc}
Expand All @@ -37,7 +38,7 @@ protected void onCreate(Bundle savedInstanceState) {
/*
Fragment managing the behaviors, interactions and presentation of the navigation drawer.
*/
NavigationDrawerFragment mNavigationDrawerFragment = (NavigationDrawerFragment)
mNavigationDrawerFragment = (NavigationDrawerFragment)
getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);

// Set up the drawer.
Expand Down Expand Up @@ -81,7 +82,7 @@ public void onNavigationDrawerItemSelected(int position) {
if (currentSection == null || selectedMenuItem != currentSection) {
currentSection = selectedMenuItem;
FragmentManager fm = getFragmentManager();
FragmentTransaction ft = fm.beginTransaction().setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
FragmentTransaction ft = fm.beginTransaction().setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE).addToBackStack(null);
Fragment f = fm.findFragmentById(R.id.container);
if (f != null) {
if (currentSection.isKeep()) {
Expand All @@ -104,4 +105,15 @@ public void onNavigationDrawerItemSelected(int position) {
}
}

@Override
public void onBackPressed() {
if (mNavigationDrawerFragment.isDrawerOpen()) {
mNavigationDrawerFragment.closeDrawer();
return;
}
if (getFragmentManager().getBackStackEntryCount() <= 1) {
finish();
}
super.onBackPressed();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ListAdapter;

import org.buildmlearn.toolkit.R;
import org.buildmlearn.toolkit.adapter.TemplateAdapter;
Expand All @@ -28,20 +26,21 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_template);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
ActionBar actionBar = getSupportActionBar();
assert actionBar != null;
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
ListAdapter mAdapter = new TemplateAdapter(this);
AbsListView mListView = (AbsListView) findViewById(android.R.id.list);
mListView.setAdapter(mAdapter);
TemplateAdapter mAdapter = new TemplateAdapter(this);
RecyclerView mRecyclerView = (RecyclerView) findViewById(android.R.id.list);
assert mRecyclerView != null;
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));

mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
mAdapter.setOnClickListener(new TemplateAdapter.SetOnClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

public void onItemClick(int position) {
Intent intent = new Intent(getApplicationContext(), TemplateEditor.class);
intent.putExtra(Constants.TEMPLATE_ID, position);
startActivity(intent);

}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected void onCreate(Bundle savedInstanceState) {
findViewById(R.id.button_add_item).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (templateId == 5 && selectedTemplate.currentMetaEditorAdapter().isEmpty()) {
if ((templateId == 5 || templateId == 7) && selectedTemplate.currentMetaEditorAdapter().isEmpty()) {
selectedTemplate.addMetaData(TemplateEditor.this);
} else {
selectedTemplate.addItem(TemplateEditor.this);
Expand Down Expand Up @@ -301,13 +301,11 @@ private void setUpTemplateEditor() {
selectedTemplate = (TemplateInterface) templateObject;
selectedTemplate.setTemplateId(templateId);
populateListView(selectedTemplate.newTemplateEditorAdapter(this));
if (templateId == 5) {
if (templateId == 5 || templateId == 7) {
populateMetaView(selectedTemplate.newMetaEditorAdapter(this));
}
setUpActionBar();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();
}
}
Expand All @@ -325,7 +323,7 @@ private void restoreTemplateEditor(Bundle savedInstanceState) {
finish();
} else {
populateListView(selectedTemplate.currentTemplateEditorAdapter());
if (templateId == 5) {
if (templateId == 5 || templateId == 7) {
populateMetaView(selectedTemplate.currentMetaEditorAdapter());
}
setUpActionBar();
Expand Down Expand Up @@ -397,20 +395,36 @@ public void onClick(View v) {
new BottomSheet.Builder(this).sheet(R.menu.bottom_sheet_template).listener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
String savedFilePath;
switch (id) {
case R.id.save_project:
saveProject();
break;

case R.id.share_project:
savedFilePath = saveProject();
if (savedFilePath == null || savedFilePath.length() == 0) {
return;
}
Uri fileUri = Uri.fromFile(new File(savedFilePath));
ArrayList<Uri> uris = new ArrayList<>();
Intent sendIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
sendIntent.setType("application/zip");
uris.add(fileUri);
sendIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
startActivity(Intent.createChooser(sendIntent, null));
break;

case R.id.share_apk:

String savedFilePath = saveProject();
savedFilePath = saveProject();
if (savedFilePath == null || savedFilePath.length() == 0) {
return;
}
String keyPassword = getString(R.string.key_password);
String aliasName = getString(R.string.alias_name);
String aliaspassword = getString(R.string.alias_password);
KeyStoreDetails keyStoreDetails = new KeyStoreDetails("TestKeyStore.jks", keyPassword, aliasName, aliaspassword);
KeyStoreDetails keyStoreDetails = new KeyStoreDetails(keyPassword, aliasName, aliaspassword);
SignerThread signer = new SignerThread(getApplicationContext(), selectedTemplate.getApkFilePath(), saveProject(), keyStoreDetails, selectedTemplate.getAssetsFilePath(), selectedTemplate.getAssetsFileName(TemplateEditor.this));

mApkGenerationDialog = new MaterialDialog.Builder(TemplateEditor.this)
Expand Down Expand Up @@ -471,7 +485,7 @@ public void onFail(Exception e) {
keyPassword = getString(R.string.key_password);
aliasName = getString(R.string.alias_name);
aliaspassword = getString(R.string.alias_password);
keyStoreDetails = new KeyStoreDetails("TestKeyStore.jks", keyPassword, aliasName, aliaspassword);
keyStoreDetails = new KeyStoreDetails(keyPassword, aliasName, aliaspassword);
signer = new SignerThread(getApplicationContext(), selectedTemplate.getApkFilePath(), saveProject(), keyStoreDetails, selectedTemplate.getAssetsFilePath(), selectedTemplate.getAssetsFileName(TemplateEditor.this));

mApkGenerationDialog = new MaterialDialog.Builder(TemplateEditor.this)
Expand Down Expand Up @@ -600,8 +614,10 @@ private String saveProject() {
EditText authorEditText = (EditText) findViewById(R.id.author_name);
EditText titleEditText = (EditText) findViewById(R.id.template_title);
assert findViewById(R.id.author_name) != null;
assert ((EditText) findViewById(R.id.author_name)) != null;
String author = ((EditText) findViewById(R.id.author_name)).getText().toString();
assert findViewById(R.id.template_title) != null;
assert ((EditText) findViewById(R.id.template_title)) != null;
String title = ((EditText) findViewById(R.id.template_title)).getText().toString();
if ("".equals(author)) {
assert authorEditText != null;
Expand Down Expand Up @@ -637,7 +653,7 @@ private String saveProject() {
doc.appendChild(rootElement);
Element dataElement = doc.createElement("data");
rootElement.appendChild(dataElement);
if (selectedTemplate.getItems(doc).size() == 0 || (selectedTemplate.getItems(doc).size() < 2 && templateId == 5)) {
if (selectedTemplate.getItems(doc).size() == 0 || (selectedTemplate.getItems(doc).size() < 2 && (templateId == 5 || templateId == 7))) {
Toast.makeText(this, "Unable to perform action: No Data", Toast.LENGTH_SHORT).show();
return null;
}
Expand Down Expand Up @@ -679,9 +695,11 @@ public void onBackPressed() {
* @return Absolute path of the saved file. Null if there is some error.
* @brief Saves the current project into a .buildmlearn file.
*/
protected String saveDraft() {
private String saveDraft() {

assert ((EditText) findViewById(R.id.author_name)) != null;
String author = ((EditText) findViewById(R.id.author_name)).getText().toString();
assert ((EditText) findViewById(R.id.template_title)) != null;
String title = ((EditText) findViewById(R.id.template_title)).getText().toString();


Expand Down Expand Up @@ -808,8 +826,9 @@ private void parseSavedFile(String path) {

Object templateObject = templateClass.newInstance();
selectedTemplate = (TemplateInterface) templateObject;
selectedTemplate.setTemplateId(templateId);
populateListView(selectedTemplate.loadProjectTemplateEditor(this, items));
if (templateId == 5) {
if (templateId == 5 || templateId == 7) {
populateMetaView(selectedTemplate.loadProjectMetaEditor(this, doc));
}
File draftDir = new File(toolkit.getDraftDir());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ protected void onCreate(Bundle savedInstanceState) {
ViewPager mPager = (ViewPager) findViewById(R.id.pager);
// mPager.setAdapter(mAdapter);

assert mPager != null;
mPager.setAdapter(mAdapter);


CirclePageIndicator mIndicator = (CirclePageIndicator) findViewById(R.id.indicator);
assert mIndicator != null;
mIndicator.setViewPager(mPager);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@
import org.buildmlearn.toolkit.views.TextViewPlus;

import java.util.ArrayList;
import java.util.Locale;

/**
* Created by scopeinfinity on 10/3/16.
*/

/**
* @brief Adapter used for DraftsFragment to show the items
*/
public class DraftProjectAdapter extends BaseAdapter {

private Context mContext;
private ArrayList<SavedProject> data;
private final Context mContext;
private final ArrayList<SavedProject> data;

public DraftProjectAdapter(Context mContext, ArrayList<SavedProject> data) {
this.mContext = mContext;
Expand Down Expand Up @@ -68,8 +73,8 @@ public View getView(int position, View convertView, ViewGroup parent) {
}

SavedProject projectData = getItem(position);
holder.draftSubtitle.setText("Last Modified: " + projectData.getTime() );
holder.draftTitle.setText("Drafted on "+projectData.getDate());
holder.draftSubtitle.setText(String.format(Locale.ENGLISH, "Last Modified: %s", projectData.getTime()));
holder.draftTitle.setText(String.format(Locale.ENGLISH, "Drafted on %s", projectData.getDate()));
holder.draftIcon.setText("D");
convertView.setTag(holder);
return convertView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

public class SavedApiAdapter extends BaseAdapter {

private Context mContext;
private ArrayList<SavedApi> data;
private final Context mContext;
private final ArrayList<SavedApi> data;

public SavedApiAdapter(Context mContext, ArrayList<SavedApi> data) {
this.mContext = mContext;
Expand Down Expand Up @@ -72,7 +72,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
}

SavedApi apiData = getItem(position);
holder.details.setText("Modified: " + apiData.getDate() + ", Author: " + apiData.getAuthor());
holder.details.setText(String.format(Locale.ENGLISH, "Modified: %s, Author: ", apiData.getDate(), apiData.getAuthor()));
holder.apkName.setText(apiData.getName());
holder.projectIcon.setText(apiData.getName().substring(0, 1).toUpperCase(Locale.US));
convertView.setTag(holder);
Expand Down
Loading