Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you have already have an OpenSRP client implementation and you want to migrate to the new form technology the procedure for doing do is as follows:

 

Code Block
languagejava
titleSecuredActivity.java
linenumberstrue
public abstract class SecuredActivity extends ActionBarActivity {
	// class specific code here
}

 

the associated activity syle is also changed to be descendant of AppCompact theme e.g on the android manifest make the following changes:

 

 

 
Code Block
languagexml
titleAndroidManifest.xml
linenumberstrue
<activity
            android:name=".view.activity.NativeECSmartRegisterActivity"
            android:screenOrientation="landscape"
            android:theme="@style/AppThemeNoTitle" />

 



 

 

 
where style/AppThemeNoTitle is defined under styles.xml file as
Code Block
languagexml
titlestyles.xml
linenumberstrue
<style name="AppThemeNoTitle" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowFullscreen">false</item> <!-- this is useful to prevent the keyboard from covering up the input fields -->
        <item name="android:windowContentOverlay">@null</item>
</style>