I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 27be4aac authored by str4d's avatar str4d
Browse files

Adjusted weighting of two-pane layout, set AddressbookActivity to use it

parent f4f84918
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:id="@+id/detail_fragment" android:id="@+id/detail_fragment"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="3" /> android:layout_weight="2" />
</LinearLayout> </LinearLayout>
......
...@@ -15,9 +15,29 @@ import android.view.MenuItem; ...@@ -15,9 +15,29 @@ import android.view.MenuItem;
public class AddressbookActivity extends I2PActivityBase public class AddressbookActivity extends I2PActivityBase
implements AddressbookFragment.OnAddressSelectedListener, implements AddressbookFragment.OnAddressSelectedListener,
SearchView.OnQueryTextListener { SearchView.OnQueryTextListener {
/**
* Whether or not the activity is in two-pane mode, i.e. running on a tablet
* device.
*/
private boolean mTwoPane;
@Override
protected boolean canUseTwoPanes() {
return true;
}
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if (findViewById(R.id.detail_fragment) != null) {
// The detail container view will be present only in the
// large-screen layouts (res/values-large and
// res/values-sw600dp). If this view is present, then the
// activity should be in two-pane mode.
mTwoPane = true;
}
// Start with the base view // Start with the base view
if (savedInstanceState == null) { if (savedInstanceState == null) {
AddressbookFragment f = new AddressbookFragment(); AddressbookFragment f = new AddressbookFragment();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment