Skip to content

Instantly share code, notes, and snippets.

View tylerjromeo's full-sized avatar

Tyler Romeo tylerjromeo

View GitHub Profile
@tylerjromeo
tylerjromeo / targets.xml
Last active December 11, 2021 09:33
MsBuild targets to edit android build version in android manifest and iOS build version in info.plist
<Target Name="BeforeBuild" Condition=" $(SetVersion) == true ">
<XmlPoke XmlInputPath="Info.plist" Query="//dict/key[. = 'CFBundleVersion']/following-sibling::string[1]" Value="$(BuildNumber)" />
<XmlPoke XmlInputPath="Info.plist" Query="//dict/key[. = 'CFBundleShortVersionString']/following-sibling::string[1]" Value="1.0.$(BuildNumber)" />
</Target>
<Target Name="BeforeBuild" Condition=" $(SetVersion) == true ">
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="&lt;Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' /&gt;" Query="manifest/@android:versionCode" Value="$(BuildNumber)" />
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="&lt;Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' /&gt;" Query="manifest/@android:versionName" Value="1.0.$(BuildNumber)" />
</Target>
if (orderFilter == orderNum && pagerAdapter != null && files.length == pagerAdapter
.getCount()
&& (files.length == 0 || files[0].hashCode() == pagerAdapter
.getMemoryHash(0))) {
return true;
}
public boolean doesHalt(Process p) {
killProcess(p);
return true;
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
@tylerjromeo
tylerjromeo / gist:6798094
Created October 2, 2013 18:15
weird style
<style name="EventInfoStyle">
<item name="android:textSize">18sp</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:textSize">15sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/textGray</item>
<item name="android:textSize">11sp</item>
<item name="android:textStyle">normal</item>
Iterator<GraphUser> iter = users.iterator();
List<GraphUser> newList = new ArrayList<GraphUser>();
while(iter.hasNext()) {
GraphUser user = iter.next();
if(user.theThingYouWant()){
newList.add(user);
}
}