Swift-Android
6 years ago
9 changed files with 285 additions and 1 deletions
-
2.idea/misc.xml
-
75app/src/main/java/com/gmeremit/online/gmeremittance_native/customwidgets/CircularIndexView.java
-
54app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/view/ExchangeMethodV2Activity.java
-
BINapp/src/main/res/drawable-hdpi/outline_keyboard_arrow_down_white_24.png
-
BINapp/src/main/res/drawable-mdpi/outline_keyboard_arrow_down_white_24.png
-
BINapp/src/main/res/drawable-xhdpi/outline_keyboard_arrow_down_white_24.png
-
BINapp/src/main/res/drawable-xxhdpi/outline_keyboard_arrow_down_white_24.png
-
BINapp/src/main/res/drawable-xxxhdpi/outline_keyboard_arrow_down_white_24.png
-
155app/src/main/res/layout/activity_exchange_method_v2.xml
@ -0,0 +1,75 @@ |
|||
package com.gmeremit.online.gmeremittance_native.customwidgets; |
|||
|
|||
import android.content.Context; |
|||
import android.graphics.Canvas; |
|||
import android.graphics.Paint; |
|||
import android.support.annotation.NonNull; |
|||
import android.support.annotation.Nullable; |
|||
import android.util.AttributeSet; |
|||
import android.view.View; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
|
|||
public class CircularIndexView extends View { |
|||
Paint arcPaint; |
|||
|
|||
private static int STROKE_WIDTH; |
|||
private static int CIRCLE_RADIUS; |
|||
private int minWidth; |
|||
|
|||
private float multi; |
|||
|
|||
public CircularIndexView(@NonNull Context context) { |
|||
super(context); |
|||
init(); |
|||
} |
|||
|
|||
public CircularIndexView(@NonNull Context context, @Nullable AttributeSet attrs) { |
|||
super(context, attrs); |
|||
init(); |
|||
} |
|||
|
|||
public CircularIndexView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { |
|||
super(context, attrs, defStyleAttr); |
|||
init(); |
|||
} |
|||
|
|||
private void init() { |
|||
multi = getContext().getResources().getDisplayMetrics().density; |
|||
STROKE_WIDTH = (int) (2 * multi); |
|||
CIRCLE_RADIUS = (int) (10 * multi); |
|||
|
|||
arcPaint = new Paint(Paint.DITHER_FLAG); |
|||
arcPaint.setAntiAlias(true); |
|||
arcPaint.setDither(true); |
|||
arcPaint.setColor(getResources().getColor(R.color.colorPrimary)); |
|||
arcPaint.setStyle(Paint.Style.STROKE); |
|||
arcPaint.setStrokeWidth(STROKE_WIDTH); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { |
|||
int height = MeasureSpec.getSize(heightMeasureSpec); |
|||
|
|||
setMeasuredDimension(2*CIRCLE_RADIUS+getPaddingRight()+getPaddingLeft(), height); |
|||
} |
|||
|
|||
@Override |
|||
protected void onDraw(Canvas canvas) { |
|||
super.onDraw(canvas); |
|||
if (getHeight() >= (2*CIRCLE_RADIUS)) { |
|||
drawCircle(canvas); |
|||
drawVerticalLines(canvas); |
|||
} |
|||
} |
|||
|
|||
private void drawVerticalLines(Canvas canvas) { |
|||
canvas.drawLine(getWidth()/2,getHeight()/2+CIRCLE_RADIUS,getWidth()/2,getHeight(),arcPaint); |
|||
canvas.drawLine(getWidth()/2,getHeight()/2-CIRCLE_RADIUS,getWidth()/2,0,arcPaint); |
|||
} |
|||
|
|||
private void drawCircle(Canvas canvas) { |
|||
canvas.drawCircle(getWidth()/2,getHeight()/2,CIRCLE_RADIUS,arcPaint); |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.gmeremit.online.gmeremittance_native.exchange_rate.view; |
|||
|
|||
import android.app.ProgressDialog; |
|||
import android.content.Intent; |
|||
import android.os.Bundle; |
|||
import android.support.v7.app.AppCompatActivity; |
|||
import android.util.Log; |
|||
import android.view.View; |
|||
import android.widget.AdapterView; |
|||
import android.widget.ArrayAdapter; |
|||
import android.widget.Button; |
|||
import android.widget.LinearLayout; |
|||
import android.widget.ProgressBar; |
|||
import android.widget.RelativeLayout; |
|||
import android.widget.Spinner; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.ExchangeRateContract; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.adapter.CountrySpinnerAdapter; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.ExchangeRateModel; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.data.Currency; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.data.ExchangeRateResponse; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.presenter.ExchangeRatePresenter; |
|||
import com.gmeremit.online.gmeremittance_native.payout_location.model.data.CountryData; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoney.model.data.ExchangeRate; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoney.model.data.PayoutMethod; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoney.model.data.PayoutPartner; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoney.model.data.TransactionInfoResponse; |
|||
import com.gmeremit.online.gmeremittance_native.utils.Utils; |
|||
import com.gmeremit.online.gmeremittance_native.utils.other.Utility; |
|||
import com.google.gson.Gson; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
import butterknife.BindView; |
|||
import butterknife.ButterKnife; |
|||
import butterknife.OnClick; |
|||
|
|||
public class ExchangeMethodV2Activity extends AppCompatActivity { |
|||
|
|||
|
|||
|
|||
@Override |
|||
protected void onCreate(Bundle savedInstanceState) { |
|||
super.onCreate(savedInstanceState); |
|||
setContentView(R.layout.activity_exchange_method_v2); |
|||
ButterKnife.bind(this); |
|||
|
|||
} |
|||
|
|||
|
|||
} |
After Width: 36 | Height: 36 | Size: 172 B |
After Width: 24 | Height: 24 | Size: 148 B |
After Width: 48 | Height: 48 | Size: 211 B |
After Width: 72 | Height: 72 | Size: 237 B |
After Width: 96 | Height: 96 | Size: 303 B |
@ -0,0 +1,155 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<LinearLayout 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:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:padding="15dp" |
|||
android:orientation="vertical" |
|||
tools:context="com.gmeremit.online.gmeremittance_native.exchange_rate.view.ExchangeMethodV2Activity"> |
|||
|
|||
<include layout="@layout/layout_sendmoney_toolbar"/> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
<LinearLayout |
|||
android:padding="5dp" |
|||
android:orientation="vertical" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="match_parent"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/bank_label" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="You Send" |
|||
android:textColor="@color/darkgray" |
|||
android:textSize="14sp"/> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_marginTop="3dp" |
|||
android:id="@+id/currency_label" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="10,30,30,30" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="21sp"/> |
|||
</LinearLayout> |
|||
<FrameLayout |
|||
android:background="@color/blue" |
|||
android:paddingStart="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent"> |
|||
<LinearLayout |
|||
android:layout_gravity="center" |
|||
android:orientation="horizontal" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content"> |
|||
<ImageView |
|||
android:background="@drawable/alert" |
|||
android:layout_gravity="center" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:gravity="center" |
|||
android:text="KRW" |
|||
android:paddingStart="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:paddingRight="10dp" |
|||
android:paddingLeft="10dp" |
|||
android:textStyle="bold" |
|||
android:textColor="@color/white" |
|||
android:textSize="21sp"/> |
|||
|
|||
<View |
|||
android:layout_width="24dp" |
|||
android:layout_height="25dp" /> |
|||
</LinearLayout> |
|||
|
|||
</FrameLayout> |
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView |
|||
android:layout_width="wrap_content" |
|||
android:paddingStart="3dp" |
|||
android:paddingEnd="3dp" |
|||
android:layout_height="80dp" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:text="You Send" |
|||
android:textColor="@color/darkgray" |
|||
android:gravity="center_vertical" |
|||
android:textSize="14sp"/> |
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
<LinearLayout |
|||
android:padding="5dp" |
|||
android:orientation="vertical" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="match_parent"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Recipient Gets" |
|||
android:textColor="@color/darkgray" |
|||
android:textSize="14sp"/> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_marginTop="3dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="100,000.00" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="21sp"/> |
|||
</LinearLayout> |
|||
<FrameLayout |
|||
android:background="@color/blue" |
|||
android:paddingStart="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent"> |
|||
<LinearLayout |
|||
android:layout_gravity="center" |
|||
|
|||
android:orientation="horizontal" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content"> |
|||
<ImageView |
|||
android:background="@drawable/alert" |
|||
android:layout_gravity="center" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:gravity="center" |
|||
android:text="KRW" |
|||
android:paddingStart="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:paddingRight="10dp" |
|||
android:paddingLeft="10dp" |
|||
android:textStyle="bold" |
|||
android:textColor="@color/white" |
|||
android:textSize="21sp"/> |
|||
<ImageView |
|||
android:layout_gravity="center" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:background="@drawable/outline_keyboard_arrow_down_white_24"/> |
|||
|
|||
</LinearLayout> |
|||
|
|||
</FrameLayout> |
|||
</LinearLayout> |
|||
|
|||
</LinearLayout> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue