Skip to content

Bug #149904 fix: Display incorrect message when content data not foun… #18

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public interface Constant {
String SERVER_ERROR = "SERVER_ERROR";
String CONNECTION_ERROR = "CONNECTION_ERROR";
String PAGE_FETCH_ERROR = "PAGE_FETCH_ERROR";
String NO_DATA_FOUND = "NO_DATA_FOUND";
String VALIDATION_ERROR = "VALIDATION_ERROR";
String GENIE_SERVICE_NOT_INSTALLED = "GENIE_SERVICE_NOT_INSTALLED";
String INVALID_FILE = "INVALID_FILE";
Expand Down
4 changes: 4 additions & 0 deletions genie-core/src/main/java/org/ekstep/genie/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ public static void processSearchFailure(TextView textView, GenieResponse genieRe
textView.setText(R.string.error_timeout);
} else if (Constant.PAGE_FETCH_ERROR.equalsIgnoreCase(error)) {
textView.setText(R.string.error_timeout);
} else if (Constant.NO_DATA_FOUND.equalsIgnoreCase(error) && genieResponse.getStatus()) {
textView.setText(R.string.error_search_no_content);
}else if (Constant.NO_DATA_FOUND.equalsIgnoreCase(error) && !genieResponse.getStatus()) {
textView.setText(R.string.error_sync_validation);
}
}
}
Expand Down
40 changes: 38 additions & 2 deletions genie-core/src/main/res/layout/fragment_dummy_fragment.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand Down Expand Up @@ -4537,7 +4538,42 @@
android:textColor="@color/dark_grey"
android:textSize="16sp" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/grey2" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView

android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/size_10"
android:paddingTop="@dimen/size_10"
android:text="@string/error_search_no_content"
android:textColor="@color/dark_grey"
android:textSize="16sp" />

<org.ekstep.genie.customview.EkStepNotoTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/size_10"
android:paddingTop="@dimen/size_10"
android:text="@string/error_search_no_content"
android:textColor="@color/dark_grey"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>

</RelativeLayout>
</RelativeLayout>
3 changes: 1 addition & 2 deletions genie-core/src/main/res/values-hi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -445,5 +445,4 @@
<string name="msg_no_sdcard_found">No sdcard found.</string>
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<!--storage settings dialog strings end-->

</resources>
</resources>
3 changes: 1 addition & 2 deletions genie-core/src/main/res/values-kn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -445,5 +445,4 @@
<string name="msg_no_sdcard_found">No sdcard found.</string>
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<!--storage settings dialog strings end-->

</resources>
</resources>
2 changes: 1 addition & 1 deletion genie-core/src/main/res/values-mr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -445,4 +445,4 @@
<string name="msg_no_sdcard_found">No sdcard found.</string>
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<!--storage settings dialog strings end-->
</resources>
</resources>
3 changes: 1 addition & 2 deletions genie-core/src/main/res/values-pa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -478,5 +478,4 @@
<string name="msg_no_sdcard_found">No sdcard found.</string>
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<!--storage settings dialog strings end-->

</resources>
</resources>
3 changes: 1 addition & 2 deletions genie-core/src/main/res/values-ta/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,4 @@
<string name="msg_no_sdcard_found">No sdcard found.</string>
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<!--storage settings dialog strings end-->

</resources>
</resources>
3 changes: 1 addition & 2 deletions genie-core/src/main/res/values-te/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,5 +446,4 @@
<string name="msg_no_sdcard_found">No sdcard found.</string>
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<!--storage settings dialog strings end-->

</resources>
</resources>
3 changes: 1 addition & 2 deletions genie-core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,4 @@
<string name="error_app_not_found">Application not found. Please choose another share option</string>
<string name="select_switch_option">Please select an option</string>
<!--storage settings dialog strings end-->

</resources>
</resources>