Posts

Showing posts with the label Overflow

Android: Styling Overflow Menu In Action Bar

Answer : I did it this way: <style name="Theme.yourapp" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="android:actionBarWidgetTheme">@style/Theme.yourapp.Widget</item> </style> <style name="Theme.yourapp.Widget" parent="@style/Theme.AppCompat"> <item name="android:textColor">@android:color/black</item> </style> For simplicity, the android: namespace pertains to anything built into the OS while anything without android: as the namespace would pertain to your application (and the libraries you are using). Most, if not all, support libraries for the ActionBar will try to use the native ActionBar implementation and therefor use the android: namespace attributes in your styles. When the native ActionBar is not available it would use the libraries implementation and the non- android: namespaced attributes. This is why you must specify every attribute w...

Carry Flag, Auxiliary Flag And Overflow Flag In Assembly

Answer : Carry Flag The rules for turning on the carry flag in binary/integer math are two: The carry flag is set if the addition of two numbers causes a carry out of the most significant (leftmost) bits added. 1111 + 0001 = 0000 (carry flag is turned on) The carry (borrow) flag is also set if the subtraction of two numbers requires a borrow into the most significant (leftmost) bits subtracted. 0000 - 0001 = 1111 (carry flag is turned on) Otherwise, the carry flag is turned off (zero). 0111 + 0001 = 1000 (carry flag is turned off [zero]) 1000 - 0001 = 0111 (carry flag is turned off [zero]) In unsigned arithmetic, watch the carry flag to detect errors. In signed arithmetic, the carry flag tells you nothing interesting. Overflow Flag The rules for turning on the overflow flag in binary/integer math are two: If the sum of two numbers with the sign bits off yields a result number with the sign bit on, the "overflow" flag is turned on. 0100 + 0100 = 1000 ...