Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Overstreet chrisoverstreet

View GitHub Profile
View blank_image_gradient.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<size
android:height="439px"
android:width="780px"/>
<gradient
android:startColor="#000000"
android:endColor="#424242"
android:angle="45"
android:type="linear"/>
View activity_fragment.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.bignerdranch.android.beatbox.BeatBoxActivity">
</FrameLayout>
View SingleFragmentActivity.java
public abstract class SingleFragmentActivity extends AppCompatActivity {
protected abstract Fragment createFragment();
@LayoutRes
protected int getLayoutResId() {
return R.layout.activity_fragment;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
You can’t perform that action at this time.