Skip to content

Commit

Permalink
WD|Fix using CustomFontTextView. #4
Browse files Browse the repository at this point in the history
  • Loading branch information
baksosapi committed Nov 7, 2017
1 parent abb1859 commit c893f4a
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 44 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ subprojects {
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "http://cloudant.github.io/cloudant-sync-eap/repository" }
maven {
url "${projectDir}/opensrp-path/../libs/"
url "${projectDir}/opensrp-bidan/../libs/"
}
maven {
url "${projectDir}/opensrp-path-it/../libs/"
url "${projectDir}/opensrp-bidan-it/../libs/"
}
mavenLocal()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,66 @@
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.TextView;

import org.smartregister.bidan.R;
import org.smartregister.bidan.toolbar.LocationSwitcherToolbar;
import org.smartregister.view.customcontrols.CustomFontTextView;

/**
* Created by sid-tech on 11/7/17.
*/

public class BidanLandingActivity extends AppCompatActivity{
public class BidanLandingActivity extends AppCompatActivity {

private MenuItem updateMenuItem;
private MenuItem remainingFormsToSyncMenuItem;
private TextView ecRegisterClientCountView;
private TextView kartuIbuANCRegisterClientCountView;
private TextView kartuIbuPNCRegisterClientCountView;
private TextView anakRegisterClientCountView;
private TextView kohortKbCountView;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.bidan_landing);

ecRegisterClientCountView = (TextView) findViewById(R.id.txt_kartu_ibu_register_client_count);
kartuIbuANCRegisterClientCountView = (TextView) findViewById(R.id.txt_kartu_ibu_anc_register_client_count);
kartuIbuPNCRegisterClientCountView = (TextView) findViewById(R.id.txt_kartu_ibu_pnc_register_client_count);
anakRegisterClientCountView = (TextView) findViewById(R.id.txt_anak_client_count);
kohortKbCountView = (TextView) findViewById(R.id.txt_kohort_kb_register_count);
}

@Override
protected void onPause() {
super.onPause();
}

// BaseActivity
// @Override
// protected int getContentView() {
// return R.layout.bidan_landing;
// }

// @Override
// protected int getDrawerLayoutId() {
// return R.id.drawer_layout;
// }
//
// @Override
// protected int getToolbarId() {
// return LocationSwitcherToolbar.TOOLBAR_ID;
// }

// @Override
// protected Class onBackActivity() {
// return null;
// }
//
@Override
protected void onResume() {
super.onResume();
Expand All @@ -34,4 +72,5 @@ protected void onResume() {
protected void onDestroy() {
super.onDestroy();
}

}
52 changes: 18 additions & 34 deletions opensrp-bidan/src/main/res/layout-land/bidan_landing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
android:layout_margin="10dp"
android:src="@drawable/bidan_logo"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<!--<TextView-->
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/feedback_option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -63,24 +63,21 @@
android:src="@drawable/register_ec"
style="@style/ImageButton.Home.Register"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/cohort_mother"
style="@style/CustomFontTextViewStyle.Home.RegisterName"
android:textSize="18dp"
android:textStyle="bold" />

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTER"
style="@style/CustomFontTextViewStyle.Home.RegisterLabel"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/txt_kartu_ibu_register_client_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -99,22 +96,19 @@
android:src="@drawable/register_fp"
style="@style/ImageButton.Home.Register"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/cohort_fp"
style="@style/CustomFontTextViewStyle.Home.RegisterName"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTER"
style="@style/CustomFontTextViewStyle.Home.RegisterLabel"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/txt_kohort_kb_register_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -134,22 +128,19 @@
android:src="@drawable/register_anc"
style="@style/ImageButton.Home.Register"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ANC"
style="@style/CustomFontTextViewStyle.Home.RegisterName"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTER"
style="@style/CustomFontTextViewStyle.Home.RegisterLabel"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/txt_kartu_ibu_anc_register_client_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -169,22 +160,19 @@
android:src="@drawable/register_pnc"
style="@style/ImageButton.Home.Register"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="PNC"
style="@style/CustomFontTextViewStyle.Home.RegisterName"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTER"
style="@style/CustomFontTextViewStyle.Home.RegisterLabel"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/txt_kartu_ibu_pnc_register_client_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -204,22 +192,19 @@
android:src="@drawable/register_child"
style="@style/ImageButton.Home.Register"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/child_title"
style="@style/CustomFontTextViewStyle.Home.RegisterName"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTER"
style="@style/CustomFontTextViewStyle.Home.RegisterLabel"/>

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/txt_anak_client_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -242,8 +227,7 @@
android:layout_marginBottom="10dp"
android:orientation="horizontal">

<!--<org.smartregister.view.customControls.CustomFontTextView-->
<TextView
<org.smartregister.view.customcontrols.CustomFontTextView
android:id="@+id/btn_reporting"
android:layout_width="0dp"
android:layout_height="50dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.smartregister.path.org.smartregister.bidan.activity.BaseActivity">
tools:context="org.smartregister.bidan.activity.BaseActivity">

<include layout="@layout/toolbar_location_switcher" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.smartregister.path.org.smartregister.bidan.activity.BaseActivity">
tools:context="org.smartregister.bidan.activity.BaseActivity">

<include layout="@layout/toolbar_simple" />

Expand Down
2 changes: 1 addition & 1 deletion opensrp-bidan/src/main/res/layout/app_bar_stock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.smartregister.path.org.smartregister.bidan.activity.BaseActivity">
tools:context="org.smartregister.bidan.activity.BaseActivity">

<include layout="@layout/toolbar_stock" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="org.smartregister.path.org.smartregister.bidan.activity.ChildImmunizationActivity"
tools:context="org.smartregister.bidan.activity.ChildImmunizationActivity"
tools:showIn="@layout/app_bar_child_immunization">

<LinearLayout
Expand Down
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.smartregister.path.org.smartregister.bidan.activity.StockControlActivity$PlaceholderFragment">
tools:context="org.smartregister.bidan.activity.StockControlActivity$PlaceholderFragment">

<TextView
android:id="@+id/section_label"
Expand Down
2 changes: 1 addition & 1 deletion opensrp-bidan/src/main/res/menu/menu_stock_control.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.smartregister.path.org.smartregister.bidan.activity.StockControlActivity">
tools:context="org.smartregister.bidan.activity.StockControlActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'opensrp-app-path'
rootProject.name = 'opensrp-app-bidan'
include ':opensrp-bidan'

0 comments on commit c893f4a

Please sign in to comment.