Techbirds | Knowledge Hub | Page 38
As we know we have EditText Preference, CheckBox Preference but we don’t have any Button Preference. Here we discuss How to use Preference as a Button. Then for the java in your onCreate() Preference button = (Preference)findPreference(“button”); button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean
Read More →
660 total views, no views today
For maintaining the level screen,firstly rename the level numbers sprite as per the requirement e.g.we can numbered as level1.png,level2.png and so on.Then make a class(LevelSprite) which inherits the CCMenuItemImage and return each sprite as the level. //LevelSprite.h class LevelSprite : public cocos2d::CCMenuItemImage { private: public: virtual bool init(); static LevelSprite* create(int n,const char *pszFilename,const char
Read More →
1,264 total views, no views today
Hello friends. In this tutorial I am going to tell about how to mask an image (i.e. a CCSprite) in a circle or a star or whatever image you want. First of all you need a CCMask.h and CCMask.cpp classes. If they are not available in your cocos2d-x you can download them by clicking this
Read More →
4,489 total views, 1 views today
Here I am going to showing how to fetch list of all friends and followers on Twitter on a button click. Lets take a button ‘btnFetchFollowers’. On click of button list of friends and followers are displayed . Code on button’s click : btnFetchFollowers.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { // Fetch List
Read More →
1,755 total views, no views today
Now we are going to code the smooth scrolling of our Android ListView. What’s with the ViewHolder pattern? The ViewHolder design pattern enables you to access each list item view without the need for the look up, saving valuable processor cycles. Specifically, it avoids frequent call of findViewById() during ListView scrolling, and that will
Read More →
682 total views, no views today