Skip to content

Instantly share code, notes, and snippets.

@AdamMc331
Created August 25, 2015 13:57
Show Gist options
  • Save AdamMc331/945e5c750aa79f3aa8fe to your computer and use it in GitHub Desktop.
Save AdamMc331/945e5c750aa79f3aa8fe to your computer and use it in GitHub Desktop.
Layout
<LinearLayout
android:id="@+id/parent_linear_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/top_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/middle_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/bottom_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Get the top text view
TextView top = (TextView) findViewById(R.id.top_text_view);
// Get the bottom text view
TextView bottom = (TextView) findViewById(R.id.bottom_text_view);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment