Skip to content

Commit

Permalink
- Add setContentView() use note to README.
Browse files Browse the repository at this point in the history
- Moved `CustomFontCache.java` to util package.
  • Loading branch information
avluis committed Oct 4, 2016
1 parent e36697c commit 8249589
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class IntroActivity extends AppIntro {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Note here that we DO NOT use setContentView();

// Add your slide fragments here.
// AppIntro will automatically generate the dots indicator and buttons.
addSlide(firstFragment);
Expand Down Expand Up @@ -83,6 +85,8 @@ public class IntroActivity extends AppIntro {
}
```

_Note above that we DID NOT use setContentView();_

Finally, declare the activity in your Manifest like so:

``` xml
Expand Down Expand Up @@ -262,7 +266,7 @@ Do you need inspiration? A lot of apps are using AppIntro out there:
<img src="https://github.com/PaoloRotolo/AppIntro/blob/master/art/Screenshot_2015-06-03-12-42-10.png" width="300">

## Apps using AppIntro
If you are using AppIntro in your app and would like to be listed here, please let us know by opening a [new issue](https://github.com/PaoloRotolo/AppIntro/issues/new)!
If you are using AppIntro in your app and would like to be listed here, please let us know by commenting in [this issue](https://github.com/PaoloRotolo/AppIntro/issues/325)!

* [Numix Hermes](https://play.google.com/store/apps/details?id=org.numixproject.hermes)
* [Audio Reminder Pro](https://play.google.com/store/apps/details?id=com.brandon.audioreminderpro)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.widget.LinearLayout;
import android.widget.TextView;

import com.github.paolorotolo.appintro.util.CustomFontCache;
import com.github.paolorotolo.appintro.util.LogHelper;

public abstract class AppIntro extends AppIntroBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.github.paolorotolo.appintro.util.CustomFontCache;
import com.github.paolorotolo.appintro.util.LogHelper;

public abstract class AppIntroBaseFragment extends Fragment implements ISlideSelectionListener,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.github.paolorotolo.appintro;
package com.github.paolorotolo.appintro.util;

import android.content.Context;
import android.graphics.Typeface;

import com.github.paolorotolo.appintro.util.LogHelper;

import java.util.Hashtable;

/**
Expand All @@ -28,16 +26,16 @@ public static Typeface get(String tfn, Context ctx) {

return tf;
} catch (Exception e) {
if (tfn.equals("")){
if (("").equals(tfn)) {
LogHelper.w(TAG, e, "Empty path");
}else {
} else {
LogHelper.w(TAG, e, tfn);
}

return null;
}
} else {
return tf;
}

}
}

0 comments on commit 8249589

Please sign in to comment.