diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java index c2f3d6c..54c7368 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java @@ -2,8 +2,6 @@ package cy.agorise.crystalwallet.activities; import android.media.MediaPlayer; import android.os.Bundle; -import android.os.PersistableBundle; -import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; @@ -13,18 +11,25 @@ import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.SurfaceHolder; import android.view.SurfaceView; +import android.widget.ImageView; import butterknife.BindView; import butterknife.ButterKnife; +import butterknife.OnClick; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.fragments.BalanceFragment; +import cy.agorise.crystalwallet.fragments.GeneralSettingsFragment; /** - * Created by seven on 12/28/17. + * Created by seven on 12/28/17. + * */ public class SettingsActivity extends AppCompatActivity{ + @BindView(R.id.ivGoBack) + public ImageView ivGoBack; + @BindView(R.id.pager) public ViewPager mPager; @@ -74,20 +79,19 @@ public class SettingsActivity extends AppCompatActivity{ } private class SettingsPagerAdapter extends FragmentStatePagerAdapter { - public SettingsPagerAdapter(FragmentManager fm) { + SettingsPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { switch (position){ - /*case 0: - return null; - case 1: + case 0: + return new GeneralSettingsFragment(); + /*case 1: return null; case 2: return null;*/ - case 0: case 1: case 2: case 3: @@ -103,4 +107,9 @@ public class SettingsActivity extends AppCompatActivity{ return 4; } } + + @OnClick(R.id.ivGoBack) + public void goBack(){ + onBackPressed(); + } } diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java new file mode 100644 index 0000000..7be6e28 --- /dev/null +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java @@ -0,0 +1,42 @@ +package cy.agorise.crystalwallet.fragments; + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import butterknife.ButterKnife; +import cy.agorise.crystalwallet.R; + +/** + * Created by xd on 12/28/17. + */ + +public class GeneralSettingsFragment extends Fragment { + public GeneralSettingsFragment() { + // Required empty public constructor + } + + public static GeneralSettingsFragment newInstance() { + GeneralSettingsFragment fragment = new GeneralSettingsFragment(); + Bundle args = new Bundle(); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + View v = inflater.inflate(R.layout.fragment_general_settings, container, false); + ButterKnife.bind(this, v); + + return v; + } +} diff --git a/app/src/main/res/drawable/ic_arrow_back.xml b/app/src/main/res/drawable/ic_arrow_back.xml new file mode 100644 index 0000000..f6c7026 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_back.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_info_outline.xml b/app/src/main/res/drawable/ic_info_outline.xml new file mode 100644 index 0000000..075d9be --- /dev/null +++ b/app/src/main/res/drawable/ic_info_outline.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 2f9417c..f030f1a 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -11,7 +11,7 @@ @@ -49,8 +49,38 @@ android:layout_height="match_parent"> + android:layout_height="30dp" + android:layout_marginStart="8dp" + app:srcCompat="@drawable/ic_arrow_back" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + android:contentDescription="@string/go_back_arrow" /> + + + + diff --git a/app/src/main/res/layout/fragment_general_settings.xml b/app/src/main/res/layout/fragment_general_settings.xml new file mode 100644 index 0000000..0a58521 --- /dev/null +++ b/app/src/main/res/layout/fragment_general_settings.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d7fb9ff..84ccf5b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -470,4 +470,7 @@ Security Backups Accounts + Go back arrow + Settings + Info icon