Skip to content

Instantly share code, notes, and snippets.

View hossinasaadi's full-sized avatar
🌍
Home

Hossin Asaadi hossinasaadi

🌍
Home
  • Amsterdam
View GitHub Profile
@hossinasaadi
hossinasaadi / activity-launchmode.xml
Created December 31, 2018 19:01 — forked from Yincan/activity-launchmode.xml
Android Activity LaunchMode attribute
<activity android:launchMode = ["standard" | "singleTop" | "singleTask" | "singleInstance"] ../>
@hossinasaadi
hossinasaadi / orientationChange.js
Created July 27, 2018 15:12 — forked from mynameispj/orientationChange.js
jQuery event that fires when the orientation (portrait, landscape) of a mobile device changes
window.addEventListener("orientationchange", function() {
alert(window.orientation);
//do whatever you want on orientation change here
}, false);
@hossinasaadi
hossinasaadi / toolbarcolor
Created January 31, 2018 11:21 — forked from androidcodehunter/toolbarcolor
How to change toolbar back arrow color and title color?
From theme
<style name="SearchToolbar" parent="Theme.AppCompat.Light.NoActionBar">
//toolbar back arrow color
<item name="android:textColorSecondary">@android:color/white</item>
//toolbar title color
<item name="android:textColorPrimary">@android:color/white</item>
</style>
Also we can do it from java code:
@hossinasaadi
hossinasaadi / custom-search-acf-wordpress.php
Created November 29, 2017 16:12 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}