Comments (6)
Simply implements the callback setOnItemClickedListener() and implements your startActivity() there.
from android-satellite-menu.
can you show me how, thank you..
from android-satellite-menu.
@shkschneider
i have this method can you show me how to implement activity coz I want to click on the icon button to open an Activity
from android-satellite-menu.
am also interested in this question how can i make it click able to open a new activity
from android-satellite-menu.
you can try to use intent to open other activity
from android-satellite-menu.
i solved it by downloading a source code called protoshop and compared the programs and i resulted to this
public class SatelliteMenuActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SatelliteMenu menu = (SatelliteMenu) findViewById(R.id.menu);
// Set from XML, possible to programmatically set
// float distance = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 170, getResources().getDisplayMetrics());
// menu.setSatelliteDistance((int) distance);
// menu.setExpandDuration(500);
// menu.setCloseItemsOnClick(false);
// menu.setTotalSpacingDegree(60);
List<SatelliteMenuItem> items = new ArrayList<SatelliteMenuItem>();
items.add(new SatelliteMenuItem(4, R.drawable.ic_1));
items.add(new SatelliteMenuItem(4, R.drawable.ic_3));
items.add(new SatelliteMenuItem(4, R.drawable.ic_4));
items.add(new SatelliteMenuItem(3, R.drawable.ic_5));
items.add(new SatelliteMenuItem(2, R.drawable.ic_6));
items.add(new SatelliteMenuItem(1, R.drawable.ic_2));
// items.add(new SatelliteMenuItem(5, R.drawable.sat_item));
menu.addItems(items);
menu.setOnItemClickedListener(new SateliteClickedListener() {
public void eventOccured(int id) {
Log.i("sat", "Clicked on " + id);
switch (id) {
case 4:
Intent intent = new Intent(SatelliteMenuActivity.this, SecondActivity.class);
startActivity(intent);
break;
case 3:
Intent intent1 = new Intent(SatelliteMenuActivity.this, SecondActivity.class);
startActivity(intent1);
break;
case 2:
Intent intent11 = new Intent(SatelliteMenuActivity.this, SecondActivity.class);
startActivity(intent11);;
break;
case 1:
Intent intent111 = new Intent(SatelliteMenuActivity.this, SecondActivity.class);
startActivity(intent111);
break;
default:
break;
}
}
});
}
}
which works thanks that what i was asking for
from android-satellite-menu.
Related Issues (20)
- rotating diffrent item .
- Add title for each menu item HOT 3
- How to take menu on right side of screen HOT 6
- fix this issue
- xml attributes do not work
- 360度のメニューが表示されるように改良しました
- sat_main traslation on rotate right
- redraw satellite items
- Satelitte menu in actionbar?
- Can we add touch and drag gesture on menu rather than touch?? HOT 1
- BadParcelableException HOT 4
- Center menu HOT 2
- always on Top
- SetOnClickListener on only the button? HOT 2
- Setting up in gradle project missing
- Adding programmatically
- Adding library to project HOT 1
- the itemclickEvent should be after the itemIn animation
- Can I close it in the other area?
- How To Compile In Android Studio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-satellite-menu.