Попробуйте следующее:
//Find the action bar for customizations
final ActionBar ab = getSupportActionBar();
assert ab != null;
//Make the action bar display an up arrow and set its drawable and color
ab.setDisplayHomeAsUpEnabled(true);
final Drawable upArrow = ResourcesCompat.getDrawable(
getResources(),
R.drawable.abc_ic_ab_back_mtrl_am_alpha, //this is the <- arrow from android resources. Change this to the thing you want.
null);
assert upArrow != null;
upArrow.setColorFilter(
ContextCompat.getColor(
getApplicationContext(),
R.color.white // change this to the color you want (or remove the setColorFilter call)
),
PorterDuff.Mode.SRC_ATOP);
ab.setHomeAsUpIndicator(upArrow);
Если у Вас есть.NET 3.5, Вы могли бы использовать Реверс LINQ?
foreach(var item in obEvtArgs.NewItems.Reverse())
{
...
}
(Принятие Вы говорите об универсальном IList),
NewItems является мой Список здесь... Это немного неуклюже все же.
for(int iLooper = obEvtArgs.NewItems.Count-1; iLooper >= 0; iLooper--)
{
GoViewBoy.Document.Add(CreateNodeFor(obEvtArgs.NewItems[iLooper] as IMySpecificObject, obNextPos));
}
На основе комментариев к ответу Davy и исходному ответу Gishu, Вы могли бросить свое со слабым контролем типов System.Collections.IList
к универсальному набору с помощью System.Linq.Enumerable.Cast
дополнительный метод:
var reversedCollection = obEvtArgs.NewItems
.Cast<IMySpecificObject>( )
.Reverse( );
Это удаляет шум обоих реверс for
цикл, и as
бросок для получения объекта со строгим контролем типов от исходного набора.