Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backwards compatible Switch

Tags:

android

ICS has a Switch component. It does what we need. Is there anything out there backward compatible to (about) 2.2? Couldn't find anything obvious.


Looks like somebody built this:

https://github.com/Prototik/KFramework-SW.git

like image 579
Kevin Galligan Avatar asked Feb 17 '12 00:02

Kevin Galligan


People also ask

Will Nintendo Switch have backwards compatibility?

Nintendo reportedly hints at making its next console backwards compatible with the Nintendo Switch. Following the announcement that the Nintendo Switch has sold 103.54million units since it was launched in March 2017, the company reportedly spoke on the future of its consoles in a new Q&A with investors (thanks, VGC).

Can you play Wii U games on Switch?

No. Nintendo 3DS and Wii U games purchased through Nintendo eShop do not carry over to Nintendo Switch. The Nintendo Switch is an all-new way to play, and does not include backwards compatibility with digital or physical games designed for other systems.

Is Switch backwards compatible with 3DS?

The short answer is no. The Switch only accepts its own proprietary cartridges, while downloaded games from its online store are saved on the console's internal storage or on an SD card inserted into it. The Switch has no disc drive, and its cartridge slot won't accept DS or 3DS cartridges.

Can you play old DS games on Nintendo Switch?

And it's not. You can't play Nintendo DS games on the newer console in official terms. The fact is DS games, and Switch games have different cartridges. In other words, even though the Switch could technically run any game in the DS family, the Switch has no cartridge slot for DS titles.


2 Answers

Android support AppCompat library from version 21.0.0 contains android.support.v7.widget.SwitchCompat to provide compability back to API v7. https://developer.android.com/reference/android/support/v7/widget/SwitchCompat.html

Include it like this with gradle:

compile 'com.android.support:appcompat-v7:21.0.0'

It can be used in layouts like this:

<android.support.v7.widget.SwitchCompat />

In addition it has showText attribute to make styling easier - which seems to be missing from native andriod Switch.

like image 175
kotucz Avatar answered Oct 13 '22 01:10

kotucz


Switch is only on 4.0+

If you want to make an app that uses switch on 4.0+ devices what you need to do is declare two layouts. The first in layout-v14 which will be what's used on ICS devices. In your layout folder make use of CheckBox.

In your code make use of the CompoundButton class when getting/setting data from the switch or checkbox. You'll find that CompoundButton works well for this.

like image 24
Lee Avatar answered Oct 13 '22 00:10

Lee