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.v4.widget.DrawerLayout 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:id="@+id/drawer_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
tools:openDrawer="start"> |
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 interface NoticiaOnClickListener{ | |
public void onClickNoticia(View view, int idx); | |
} |
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
private NoticiaOnClickListener noticiaOnClickListener; |
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
@Override | |
public void onBindViewHolder(final NoticiaViewHolder holder, final int position) { | |
//Click | |
if (noticiaOnClickListener != null){ | |
holder.itemView.setOnClickListener(new View.OnClickListener() { |
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
private NoticiaAdapter.NoticiaOnClickListener onClickNoticia() { | |
return new NoticiaAdapter.NoticiaOnClickListener() { | |
@Override | |
public void onClickNoticia(View view, int idx) { | |
Noticia c = noticias.get(idx); |
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
<android.support.design.widget.TextInputLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="8dp" | |
android:layout_marginBottom="8dp"> | |
<EditText android:id="@+id/input_email" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="Número de Cliente" /> | |
</android.support.design.widget.TextInputLayout> |
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 static final String QUERY_PARAMETER = "q"; | |
public void onClickOpenAddressButton(View v) { | |
// COMPLETED (5) Store an address in a String | |
String addressString = "1600 Amphitheatre Parkway, CA"; | |
// COMPLETED (6) Use Uri.Builder with the appropriate scheme and query to form the Uri for the address | |
Uri.Builder builder = new Uri.Builder(); | |
builder.scheme("geo") | |
.path("0,0") |
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.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/app_bar_layout" |
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.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="false"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/app_bar_layout" |
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 MainActivity extends AppCompatActivity { | |
private CardView cardView; | |
private Boolean isCollapsed = true; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
OlderNewer