Merge branch 'identity_drawer' into 'develop'
change identity drawer See merge request tom79/fedilab!960
This commit is contained in:
commit
d929c870f9
|
@ -18,7 +18,7 @@ import android.content.Context;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -61,11 +61,10 @@ public class IdentityProofsAdapter extends RecyclerView.Adapter {
|
|||
holder.proof_name.setOnClickListener(v -> {
|
||||
Helper.openBrowser(context, identityProof.getProfile_url());
|
||||
});
|
||||
holder.proof_name_network.setText(context.getString(R.string.verified_by, identityProof.getProvider()));
|
||||
holder.proof_name_network.setText(context.getString(R.string.verified_by, identityProof.getProvider(),Helper.shortDateToString(identityProof.getUpdated_at())));
|
||||
holder.proof_container.setOnClickListener(v -> {
|
||||
Helper.openBrowser(context, identityProof.getProof_url());
|
||||
});
|
||||
holder.proof_date.setText(Helper.shortDateToString(identityProof.getUpdated_at()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,15 +78,14 @@ public class IdentityProofsAdapter extends RecyclerView.Adapter {
|
|||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView proof_name, proof_name_network, proof_date;
|
||||
private LinearLayout proof_container;
|
||||
private TextView proof_name, proof_name_network;
|
||||
private ConstraintLayout proof_container;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
proof_name = itemView.findViewById(R.id.proof_name);
|
||||
proof_name_network = itemView.findViewById(R.id.proof_name_network);
|
||||
proof_container = itemView.findViewById(R.id.proof_container);
|
||||
proof_date = itemView.findViewById(R.id.proof_date);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,50 +14,60 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_verified_user"
|
||||
android:contentDescription="@string/verified_user" />
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/proof_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp" />
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/proof_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:layout_margin="4dp"
|
||||
android:background="@drawable/green_border"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/proof_icon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/verified_user"
|
||||
android:src="@drawable/ic_verified_user"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/proof_name_network"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/proof_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
android:id="@+id/proof_date"
|
||||
android:textStyle="italic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
/>
|
||||
</LinearLayout>
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:ellipsize="end"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/proof_name_network"
|
||||
app:layout_constraintEnd_toStartOf="@id/proof_arrow"
|
||||
app:layout_constraintStart_toEndOf="@id/proof_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/proof_name_network"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:ellipsize="end"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/proof_arrow"
|
||||
app:layout_constraintStart_toEndOf="@id/proof_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/proof_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/proof_arrow"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/ic_keyboard_arrow_right"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1210,5 +1210,5 @@
|
|||
<string name="list_of_twitter_accounts">Twitter usernames space separated</string>
|
||||
<string name="identity_proofs">Identity proofs</string>
|
||||
<string name="verified_user">Verified identity</string>
|
||||
<string name="verified_by">Verified by %1$s</string>
|
||||
<string name="verified_by">Verified by %1$s (%2$s)</string>
|
||||
</resources>
|
Loading…
Reference in New Issue