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
@implementation UITableViewCell (ProgressIndicator) | |
- (void)showProgress:(BOOL)show { | |
if(show) { | |
UIActivityIndicatorView *progress = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; | |
UIView *progressView = [[UIView alloc] initWithFrame:CGRectMake(0,0,20,20)]; | |
[progressView addSubview: progress]; | |
if(self.accessoryView) { | |
progressView.frame = self.accessoryView.bounds; | |
} | |
progress.center = progressView.center; |
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
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { | |
if (indexPath.row%2 == 0) { | |
UIColor *altCellColor = [UIColor colorWithWhite:0.7 alpha:0.1]; | |
cell.backgroundColor = altCellColor; | |
} | |
} |
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
//discount BG | |
_discountBackgroundView = [[UIImageView alloc] initWithImage:[UIImage MSRetailScannerImageNamed:@"Bargain"]]; | |
UIImage* mask = [UIImage MSRetailScannerImageNamed:@"Bargain-mask"]; | |
if (mask) | |
{ | |
_discountBackgroundView.layer.mask = [CALayer layer]; | |
_discountBackgroundView.layer.mask.frame = _discountBackgroundView.layer.bounds; | |
_discountBackgroundView.layer.mask.contents = (__bridge id)[mask CGImage]; | |
} |
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
<set xmlns:android="http://schemas.android.com/apk/res/android" | |
android:fillAfter="true" | |
android:fillEnabled="true"> | |
<rotate | |
android:duration="1600" | |
android:fromDegrees="0" | |
android:pivotX="50%" | |
android:pivotY="50%" | |
android:startOffset="10" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item android:id="@android:id/background"> | |
<shape> | |
<corners android:radius="5dip" /> | |
<gradient | |
android:angle="270" | |
android:centerColor="#ff5a5d5a" |
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
// Start lengthy operation in a background thread | |
new Thread(new Runnable() { | |
public void run() { | |
while (mProgressStatus < 100) { | |
mProgressStatus = doWork(); | |
// Update the progress bar | |
mHandler.post(new Runnable() { | |
public void run() { | |
mProgress.setProgress(mProgressStatus); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="white">#FFFFFF</color> | |
<color name="yellow">#FFFF00</color> | |
<color name="fuchsia">#FF00FF</color> | |
<color name="red">#FF0000</color> | |
<color name="silver">#C0C0C0</color> | |
<color name="gray">#808080</color> | |
<color name="olive">#808000</color> | |
<color name="purple">#800080</color> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="White">#FFFFFF</color> | |
<color name="Ivory">#FFFFF0</color> | |
<color name="LightYellow">#FFFFE0</color> | |
<color name="Yellow">#FFFF00</color> | |
<color name="Snow">#FFFAFA</color> | |
<color name="FloralWhite">#FFFAF0</color> | |
<color name="LemonChiffon">#FFFACD</color> | |
<color name="Cornsilk">#FFF8DC</color> |
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
#!/bin/bash | |
match="large" | |
for i in ./cover/*/*; do | |
folder=$(dirname $i) | |
fname=$(basename $i) | |
if [[ "$fname" == *$match* ]]; then | |
#tgt=$(echo $i | sed -e "s/$re_match/$replace/") | |
mv "$i" "$folder/large_cover.jpg" |