Skip to content

Instantly share code, notes, and snippets.

View gamebusterz's full-sized avatar
🍞

Sailesh Choyal gamebusterz

🍞
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/sb_ques_answer"
android:background="@android:color/background_dark"
android:padding="@dimen/activity_horizontal_margin"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
public class SB_QA_defaultFragment extends Fragment{
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
// return super.onCreateView(inflater, container, savedInstanceState);
return inflater.inflate(R.layout.sb_qa_default_layout,container,false);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:background="@android:color/background_dark"
xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="@dimen/activity_horizontal_margin"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:baselineAligned="false"
11-14 18:37:31.510 17430-17430/com.example.yankee.cw E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.yankee.cw, PID: 17430
Theme: themes:{default=overlay:jahirfiquitiva.themes.meliornui, iconPack:system, fontPkg:jahirfiquitiva.themes.meliornui, com.android.systemui=overlay:jahirfiquitiva.themes.meliornui, com.android.systemui.navbar=overlay:jahirfiquitiva.themes.meliornui}
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.yankee.cw/com.example.yankee.cw.cw_home}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
app:cardUseCompatPadding="true"
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
@gamebusterz
gamebusterz / Layout2.xml
Created October 27, 2016 08:32
Enclosed the contents of CoordinatorLayout in a LinearLayout, scrolling of the NestedScrollView works.
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/background_dark"
android:layout_height="match_parent"
android:padding="0dip"
tools:context=".LoginActivity">
<android.support.v7.widget.Toolbar
package com.example.yankee.cw;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;