Skip to content

Commit

Permalink
Rinominati layout
Browse files Browse the repository at this point in the history
Rinominati i vecchi leyout per i cursor e array adapter con nomi più adatti per il nuovo RecyclerView adapter
  • Loading branch information
ncvescera committed Aug 12, 2020
1 parent 5b93e5e commit 8d49f33
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public DatabaseRecyclerViewAdapter() {
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_cursoradapter, parent, false);
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_dbactivity_recyclerview, parent, false);
DatabaseRecyclerViewAdapter.ViewHolder holder = new DatabaseRecyclerViewAdapter.ViewHolder(view);

return holder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ScanRecyclerViewAdapter(ArrayList<Rete> reti) {
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_arrayadapter, parent, false);
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_mainactivity_recyclerview, parent, false);
ViewHolder holder = new ViewHolder(view);

return holder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void onReceive(Context local_context, Intent intent) {
locationHandler.requestUpdate();

// update ListView content with the new data by a CutstomArrayAdapter
//WifiAdapter adapter = new WifiAdapter(context,R.layout.layout_arrayadapter, data);
//WifiAdapter adapter = new WifiAdapter(context,R.layout.layout_mainactivity_recyclerview, data);
ScanRecyclerViewAdapter adapter = new ScanRecyclerViewAdapter(data);

MainActivity.recyclerView.setAdapter(adapter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.app.Activity;
import android.content.DialogInterface;
import android.database.Cursor;
import android.graphics.Color;
import android.util.Log;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -37,7 +36,7 @@ public static void displayEditPasswordAlertBox(Activity context, final Rete obj)
AlertDialog.Builder builder = new AlertDialog.Builder(context);

LayoutInflater inflater = LayoutInflater.from(context);
View dialog_layout = inflater.inflate(R.layout.dialog_layout, null);
View dialog_layout = inflater.inflate(R.layout.layout_alertbox, null);

// getting EditText ref
final EditText text = (EditText) dialog_layout.findViewById(R.id.edittext);
Expand Down Expand Up @@ -81,7 +80,7 @@ public static void displayUpdatePasswordAlertBox(Activity context, final TextVie
AlertDialog.Builder builder = new AlertDialog.Builder(context);

LayoutInflater inflater = LayoutInflater.from(context);
View dialog_layout = inflater.inflate(R.layout.dialog_layout, null);
View dialog_layout = inflater.inflate(R.layout.layout_alertbox, null);

// getting EditText ref.
final EditText text = (EditText) dialog_layout.findViewById(R.id.edittext);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="wrap_content">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:id="@+id/dbRecyclerViewLinearLayout">

<TextView
android:id="@+id/cursor_SSID"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".20"
android:text="SSID"/>

<TextView
android:id="@+id/cursor_dettagli"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".20"
android:gravity="center|top"
android:text="Dettagli" />

<TextView
android:id="@+id/cursor_level"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".10"
android:gravity="center|top"
android:text="Level" />

<TextView
android:id="@+id/cursor_password"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".25"
android:clickable="true"
android:gravity="center|top"
android:text="Password" />

<TextView
android:id="@+id/cursor_position"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".25"
android:text="Password"
android:gravity="left"/>

</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="wrap_content">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:id="@+id/dbRecyclerViewLinearLayout">

<TextView
android:id="@+id/cursor_SSID"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".20"
android:text="SSID"/>

<TextView
android:id="@+id/cursor_dettagli"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".20"
android:gravity="center|top"
android:text="Dettagli" />

<TextView
android:id="@+id/cursor_level"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".10"
android:gravity="center|top"
android:text="Level" />

<TextView
android:id="@+id/cursor_password"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".25"
android:clickable="true"
android:gravity="center|top"
android:text="Password" />

<TextView
android:id="@+id/cursor_position"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".25"
android:text="Password"
android:gravity="left"/>

</LinearLayout>
</RelativeLayout>

0 comments on commit 8d49f33

Please sign in to comment.