This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v7.widget.CardView | |
xmlns:card_view="http://schemas.android.com/apk/res-auto" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/card_view" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
card_view:cardCornerRadius="4dp" | |
android:layout_margin="5dp"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.NullPointerException | |
at android.support.v7.widget.RecyclerView.findMinMaxChildLayoutPositions(RecyclerView.java:3481) | |
at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3226) | |
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3122) | |
at android.support.v7.widget.RecyclerView.onLayout_Original(RecyclerView.java:3568) | |
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java) | |
at android.view.View.layout(View.java:17520) | |
at android.view.ViewGroup.layout(ViewGroup.java:5612) | |
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) | |
at android.view.View.layout(View.java:17520) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_timetables" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Profile1Activity extends Activity { | |
//TextViews to show details of volume and brightness | |
private TextView tVBrightness, tVVolume; | |
//SeekBars to set volume and brightness | |
private SeekBar sbVolume, sbBrightness; | |
//AudioManager object, that will get and set volume | |
private AudioManager audioManager; | |
//Variable to store brightness value | |
private int brightness; | |
//Content resolver used as a handle to the system's settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The call to the method requiring resource ids | |
setRoundCornersStyleFromTo(R.drawable.rounded_corners_orange, "#29B6F6"); | |
//The actual method | |
private void setRoundCornersStyleFromTo(int resource, String color){ | |
try { | |
//some code here | |
}catch (Exception e){ | |
//some exception handling here | |
} |