Skip to content

Commit

Permalink
crash issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmud6390 committed Dec 14, 2020
1 parent 9511631 commit 5adb7af
Showing 3 changed files with 186 additions and 172 deletions.
Original file line number Diff line number Diff line change
@@ -113,6 +113,10 @@ public MemberHistoryContract.Presenter getPresenter() {
private MemberHistoryAdapter.OnClickAdapter onClickAdapter = new MemberHistoryAdapter.OnClickAdapter() {
@Override
public void onClick(int position, MemberHistoryData content) {
if(content.getEventType().equalsIgnoreCase("Vaccination")
|| content.getEventType().equalsIgnoreCase("Recurring Service")){
return;
}
startFormActivity(content);
}
};
Original file line number Diff line number Diff line change
@@ -361,7 +361,7 @@ public ArrayList<VisitLog> getAllVisitLog(String baseEntityId) {
}
public ArrayList<VisitLog> getAllVisitLogForFamily(String familyId) {
SQLiteDatabase database = getReadableDatabase();
String selection = FAMILY_ID + " = ? " + COLLATE_NOCASE;
String selection = FAMILY_ID + " = ? " + COLLATE_NOCASE+" and ("+VISIT_TYPE+"!='"+HnppConstants.EVENT_TYPE.FORUM_ADULT+"' and "+VISIT_TYPE+"!='"+HnppConstants.EVENT_TYPE.FORUM_WOMEN+"' and "+VISIT_TYPE+"!='"+HnppConstants.EVENT_TYPE.FORUM_NCD+"' and "+VISIT_TYPE+"!='"+HnppConstants.EVENT_TYPE.FORUM_ADO+"' and "+VISIT_TYPE+"!='"+HnppConstants.EVENT_TYPE.FORUM_CHILD+"')";
String[] selectionArgs = new String[]{familyId};
try{
net.sqlcipher.Cursor cursor = database.query(VISIT_LOG_TABLE_NAME, TABLE_COLUMNS, selection, selectionArgs, null, null, VISIT_DATE + " DESC");
352 changes: 181 additions & 171 deletions opensrp-brac-hnpp/src/main/res/layout/activity_forum.xml
Original file line number Diff line number Diff line change
@@ -46,191 +46,201 @@
android:layout_height="wrap_content"/>

</RelativeLayout>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/kishori_forum"
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_women"
android:layout_margin="10dp"
android:layout_gravity="center"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_kishori"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_marginLeft="10dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/kishori_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_women"
android:layout_margin="10dp"
android:layout_gravity="center"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_kishori"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_marginLeft="10dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>


</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/nari_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_adolescent"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_nari"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/nari_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_adolescent"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_nari"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>


</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/child_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_child"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_child"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/child_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_child"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_child"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>


</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/ncd_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_sugar_blood_level"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_ncd"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/ncd_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_sugar_blood_level"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_ncd"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>


</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/adult_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_familiar"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_adult"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/adult_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_familiar"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="@string/title_adult"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>


</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/history_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_history"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="পূর্বের ফোরাম"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_margin="5dp"
android:padding="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
android:id="@+id/history_forum"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/ic_history"
android:layout_margin="10dp"
android:layout_width="80dp"
android:layout_height="80dp"/>
<org.smartregister.view.customcontrols.CustomFontTextView
android:text="পূর্বের ফোরাম"
android:textColor="@color/black"
android:textSize="25sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>


</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

</android.support.v7.widget.CardView>

</LinearLayout>

0 comments on commit 5adb7af

Please sign in to comment.