This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Override point for customization after application launch. | |
//let splitViewController = self.window!.rootViewController as! UISplitViewController | |
//splitViewController.delegate = self | |
let window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
self.window = window | |
window.rootViewController = MasterViewController() | |
window.makeKeyAndVisible() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MasterViewController: UIViewController { | |
var activityIndicatorView: UIActivityIndicatorView = UIActivityIndicatorView() | |
var baseView: UIView = UIView() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
baseView.frame = CGRect.zero; | |
baseView.translatesAutoresizingMaskIntoConstraints = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableIntegration | |
public class ExampleConfiguration { | |
@Bean | |
IntegrationFlow inboundFlow( | |
ErrorManager errorManager, | |
SeatSelector seatSelector, | |
Prioritizer priority | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableBatchProcessing | |
public class XmlParsingApplication { | |
@Bean | |
public StaxEventItemReader itemReader() throws Exception { | |
StaxEventItemReader reader = new StaxEventItemReader<>(); | |
reader.setName("birthday"); | |
reader.setResource(new ClassPathResource("all_members.xml")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onLoadFinished(Loader<Cursor> loader, final Cursor data) { | |
switch (loader.getId()) { | |
case FRUIT_LOADER: | |
//do things with the fruits data | |
break; | |
case VEGGIE_LOADER: | |
//do things with the vegetables data | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NutritionFactFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor> { | |
public static final int FRUIT_LOADER = 1; | |
public static final int VEGGIE_LOADER = 2; | |
... | |
@Override | |
public Loader<Cursor> onCreateLoader(int id, Bundle args) { | |
switch (id) { | |
case FRUIT_LOADER: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NutritionFactFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor> { | |
public static final int FRUIT_LOADER = 1; | |
public static final int VEGGIE_LOADER = 2; | |
... | |
@Override | |
public Loader<Cursor> onCreateLoader(int id, Bundle args) { | |
switch (id) { | |
case FRUIT_LOADER: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories{ | |
flatDir{ | |
dirs 'libs' | |
} | |
} | |
dependencies { | |
//Design and Aminations | |
compile 'com.android.support:cardview-v7:23.1.1' | |
compile (name:'library-2.4.1', ext:'aar') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flipButton.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
if (mCardSideShowing.equals(CardSide.FRONT)) { | |
getActivity().getFragmentManager() | |
.beginTransaction() | |
.setCustomAnimations(R.animator.card_flip_right_in, R.animator.card_flip_right_out, R.animator.card_flip_left_in, R.animator.card_flip_left_out) | |
.replace(R.id.card_fragment_container, new CardBackFragment()) | |
.commit(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleViewController: UITableViewController { | |
@IBOutlet var someTextLabel: UITextLabel! | |
class func loadFromStoryboard() -> ExampleViewController | |
{ | |
let controller = UIStoryboard(name:"Main", bundle:NSBundle(forClass:self)) | |
.instantiateViewControllerWithIdentifier("ExampleViewController") | |
as! ExampleViewController |
OlderNewer