Skip to content

Instantly share code, notes, and snippets.

View githubmor's full-sized avatar

Morteza Darzi githubmor

  • Pooya Samane Diva
  • Babol
View GitHub Profile
ObjectAnimator fadeAnim = ObjectAnimator.ofFloat(tvLabel, "alpha", 0.2f);
fadeAnim.start();
<StackPanel
Grid.Row="0" Margin="10"
Orientation="Horizontal">
<Button
Width="75" HorizontalAlignment="Left"
VerticalAlignment="Top"
Command="{Binding Delete}"
Content="Delete" />
<Button
Width="75" HorizontalAlignment="Left"
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="android:textViewStyle">@style/creditCardText</item>
</style>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/textViewFont" />
<style name="textViewFont">
<item name="android:fontFamily">@font/shabnam_font</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<font-family
xmlns:app="http://schemas.android.com/apk/res-auto">
<font
app:fontStyle="normal"
app:fontWeight="400"
app:font="@font/shabnam" />
</font-family>
public abstract class BaseActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new MyExceptionHandler(BaseActivity.this);
}
}
public class MyExceptionHandler implements Thread.UncaughtExceptionHandler {
public static final String EXTRA_MY_EXCEPTION_HANDLER = "EXTRA_MY_EXCEPTION_HANDLER";
private final Activity context;
private final Thread.UncaughtExceptionHandler rootHandler;
public MyExceptionHandler(Activity context) {
this.context = context;
// we should store the current exception handler -- to invoke it for all not handled exceptions ...
rootHandler = Thread.getDefaultUncaughtExceptionHandler();
// we replace the exception handler now with us -- we will properly dispatch the exceptions ...