parent
6e6bfaa932
commit
2b4064f3b7
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="96dp"
|
||||||
|
android:height="96dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/textsecure_primary"
|
||||||
|
android:pathData="M18,7l-1.41,-1.41 -6.34,6.34 1.41,1.41L18,7zM22.24,5.59L11.66,16.17 7.48,12l-1.41,1.41L11.66,19l12,-12 -1.42,-1.41zM0.41,13.41L6,19l1.41,-1.41L1.83,12 0.41,13.41z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:background="#FF2090ea">
|
||||||
|
|
||||||
|
<TextView android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:id="@+id/blurb"
|
||||||
|
android:textSize="@dimen/onboarding_title_size"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="20dp"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:text="@string/experience_upgrade_preference_fragment__read_receipts_are_here"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
|
<FrameLayout android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:layout_marginTop="20dp">
|
||||||
|
|
||||||
|
<ImageView android:layout_width="170dp"
|
||||||
|
android:layout_height="170dp"
|
||||||
|
android:src="@drawable/circle_tintable"
|
||||||
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
|
<ImageView android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
app:srcCompat="@drawable/read_receipt_vector"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/subblurb"
|
||||||
|
android:textSize="@dimen/onboarding_subtitle_size"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="20dp"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:text="@string/experience_upgrade_preference_fragment__optionally_see_and_share_when_messages_have_been_read"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.SwitchCompat
|
||||||
|
android:id="@+id/preference"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:enabled="true"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/experience_upgrade_preference_fragment__enable_read_receipts"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
app:theme="@style/Color1SwitchStyle"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,41 @@
|
|||||||
|
package org.thoughtcrime.securesms;
|
||||||
|
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v7.widget.SwitchCompat;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||||
|
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||||
|
|
||||||
|
public class ReadReceiptsIntroFragment extends Fragment {
|
||||||
|
|
||||||
|
public static ReadReceiptsIntroFragment newInstance() {
|
||||||
|
ReadReceiptsIntroFragment fragment = new ReadReceiptsIntroFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReadReceiptsIntroFragment() {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View v = inflater.inflate(R.layout.experience_upgrade_preference_fragment, container, false);
|
||||||
|
SwitchCompat preference = ViewUtil.findById(v, R.id.preference);
|
||||||
|
|
||||||
|
preference.setChecked(TextSecurePreferences.isReadReceiptsEnabled(getContext()));
|
||||||
|
preference.setOnCheckedChangeListener((buttonView, isChecked) -> TextSecurePreferences.setReadReceiptsEnabled(getContext(), isChecked));
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue