Revert "Remove the build flavors"

This reverts commit c38dad605a.
This commit is contained in:
Bradlee Speice
2014-11-06 19:57:13 -05:00
parent dc9700e268
commit 72f375ff9f
15 changed files with 112 additions and 24 deletions

View File

@ -1,9 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity
android:name="org.bspeice.minimalbible.test.activity.FragmentTestActivity"
android:label="@string/title_activity_fragment_test" />
</application>
</manifest>

View File

@ -1,68 +0,0 @@
package org.bspeice.minimalbible.test.activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import org.bspeice.minimalbible.R;
import java.util.concurrent.CountDownLatch;
public class FragmentTestActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fragment_test);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.fragment_test, menu);
return true;
}
@Override
@SuppressWarnings("all") // Leave the if-statement verbose
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void startFragment(Fragment f) {
final FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager.beginTransaction()
.add(R.id.container, f)
.commit();
// Do the ugly work of waiting for the transaction to complete...
final CountDownLatch signal = new CountDownLatch(1);
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
fragmentManager.executePendingTransactions();
signal.countDown();
}
});
try {
signal.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}

View File

@ -1,7 +0,0 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.bspeice.minimalbible.test.activity.FragmentTestActivity"
tools:ignore="MergeRootFrame" />

View File

@ -1,10 +0,0 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.bspeice.minimalbible.test.activity.FragmentTestActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
</menu>

View File

@ -1,6 +0,0 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View File

@ -1,5 +0,0 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View File

@ -1,5 +0,0 @@
<resources>
<string name="title_activity_fragment_test">FragmentTestActivity</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
</resources>