Seguinte quero fazer com que este layout(de id div_externa) abaixo fique ancorado no bottom da tela. Mas reparem no seguinte ele esta com 0dp de height propositalmente, nao quero que ela apareça a menos que eu clique no botao. Ate entao tudo bem funciona perfeitamente...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF8800"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="osval.com.searchpeople.teste_act"
tools:showIn="@layout/app_bar_teste_act">
<RelativeLayout
android:id="@+id/div_externa"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#FF555555"
android:orientation="horizontal"
android:animateLayoutChanges="true"></RelativeLayout>
</RelativeLayout>
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
runOnUiThread(new Runnable() {
@Override
public void run() {
RelativeLayout rl = (RelativeLayout) findViewById(R.id.div_externa);
LayoutTransition lrl = rl.getLayoutTransition();
switch (lock){
case "Fechado" :
lrl.enableTransitionType(LayoutTransition.CHANGING);
rl.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT,
RelativeLayout.LayoutParams.MATCH_PARENT));
lock = "Aberto";
break;
case "Aberto" :
rl.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 0));
lock = "Fechado";
break;
default:
break;
}
}
});
}
});
tudo isso esta "dentro" do NavigationDrawer Layout padrao criado pelo android studio