2544
        if (
2545
                descendantFocusability != FOCUS_AFTER_DESCENDANTS ||
2546
                        // No focusable descendants
2547
                        (focusableCount == views.size())) {
2548
            // Note that we can't call the superclass here, because it will
2549
            // add all views in.  So we need to do the same thing View does.
2550
            if (!isFocusable()) {
2551
                return;
2552
            }
2553
            if ((focusableMode & FOCUSABLES_TOUCH_MODE) == FOCUSABLES_TOUCH_MODE &&
2554
                    isInTouchMode() && !isFocusableInTouchMode()) {
2555
                return;
2556
            }
2557
            if (views != null) {
2558
                views.add(this);
2559
            }
2560
        }
2561
    }
2562
2563
    /**
2564
     * We only want the current page that is being shown to be touchable.
2565
     */
2566
    @Override
2567
    public void addTouchables(ArrayList<View> views) {
2568
        // Note that we don't call super.addTouchables(), which means that
2569
        // we don't call View.addTouchables().  This is okay because a ViewPager
2570
        // is itself not touchable.
2571
        for (int i = 0; i < getChildCount(); i++) {
2572
            final View child = getChildAt(i);
2573
            if (child.getVisibility() == VISIBLE) {
2574
                ItemInfo ii = infoForChild(child);
2575
                if (ii != null && ii.position == mCurItem) {
2576
                    child.addTouchables(views);
2577
                }
2578
            }
2579
        }
2580
    }
2581
2582
    /**
2583
     * We only want the current page that is being shown to be focusable.
2584
     */
2585
    @Override
2586
    protected boolean onRequestFocusInDescendants(int direction,
2587
                                                  Rect previouslyFocusedRect) {
2588
        int index;
2589
        int increment;
2590
        int end;
2591
        int count = getChildCount();
2592
        if ((direction & FOCUS_FORWARD) != 0) {
2593
            index = 0;
2594
            increment = 1;
2595
            end = count;
2596
        } else {
2597
            index = count - 1;
2598
            increment = -1;
2599
            end = -1;
2600
        }
2601
        for (int i = index; i != end; i += increment) {
2602
            View child = getChildAt(i);
2603
            if (child.getVisibility() == VISIBLE) {
2604
                ItemInfo ii = infoForChild(child);
2605
                if (ii != null && ii.position == mCurItem) {
2606
                    if (child.requestFocus(direction, previouslyFocusedRect)) {
2607
                        return true;
2608
                    }
2609
                }
2610
            }
2611
        }
2612
        return false;
2613
    }
2614
2615
    @Override
2616
    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
2617
        // Dispatch scroll events from this ViewPager.
2618
        if (event.getEventType() == AccessibilityEventCompat.TYPE_VIEW_SCROLLED) {
2619
            return super.dispatchPopulateAccessibilityEvent(event);
2620
        }
2621
2622
        // Dispatch all other accessibility events from the current page.
2623
        final int childCount = getChildCount();
2624
        for (int i = 0; i < childCount; i++) {
2625
            final View child = getChildAt(i);
2626
            if (child.getVisibility() == VISIBLE) {
2627
                final ItemInfo ii = infoForChild(child);
2628
                if (ii != null && ii.position == mCurItem &&
2629
                        child.dispatchPopulateAccessibilityEvent(event)) {
2630
                    return true;
2631
                }
2632
            }
2633
        }
2634
2635
        return false;
2636
    }
2637
2638
    @Override
2639
    protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
2640
        return new LayoutParams();
2641
    }
2642
2643
    @Override
2644
    protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
2645
        return generateDefaultLayoutParams();
2646
    }
2647
2648
    @Override
2649
    protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
2650
        return p instanceof LayoutParams && super.checkLayoutParams(p);
2651
    }
2652
2653
    @Override
2654
    public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
2655
        return new LayoutParams(getContext(), attrs);
2656
    }
2657
2658
    class MyAccessibilityDelegate extends AccessibilityDelegateCompat {
2659
2660
        @Override
2661
        public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
2662
            super.onInitializeAccessibilityEvent(host, event);
2663
            event.setClassName(ViewPager.class.getName());
2664
            final AccessibilityRecordCompat recordCompat = AccessibilityRecordCompat.obtain();
2665
            recordCompat.setScrollable(canScroll());
2666
            if (event.getEventType() == AccessibilityEventCompat.TYPE_VIEW_SCROLLED
2667
                    && mAdapter != null) {
2668
                recordCompat.setItemCount(mAdapter.getCount());
2669
                recordCompat.setFromIndex(mCurItem);
2670
                recordCompat.setToIndex(mCurItem);
2671
            }
2672
        }
2673
2674
        @Override
2675
        public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
2676
            super.onInitializeAccessibilityNodeInfo(host, info);
2677
            info.setClassName(ViewPager.class.getName());
2678
            info.setScrollable(canScroll());
2679
            if (internalCanScrollVertically(1)) {
2680
                info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
2681
            }
2682
            if (internalCanScrollVertically(-1)) {
2683
                info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
2684
            }
2685
        }
2686
2687
        @Override
2688
        public boolean performAccessibilityAction(View host, int action, Bundle args) {
2689
            if (super.performAccessibilityAction(host, action, args)) {
2690
                return true;
2691
            }
2692
            switch (action) {
2693
                case AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD: {
2694
                    if (internalCanScrollVertically(1)) {
2695
                        setCurrentItem(mCurItem + 1);
2696
                        return true;
2697
                    }
2698
                }
2699
                return false;
2700
                case AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD: {
2701
                    if (internalCanScrollVertically(-1)) {
2702
                        setCurrentItem(mCurItem - 1);
2703
                        return true;
2704
                    }
2705
                }
2706
                return false;
2707
            }
2708
            return false;
2709
        }
2710
2711
        private boolean canScroll() {
2712
            return (mAdapter != null) && (mAdapter.getCount() > 1);
2713
        }
2714
    }
2715
2716
    private class PagerObserver extends DataSetObserver {
2717
        @Override
2718
        public void onChanged() {
2719
            dataSetChanged();
2720
        }
2721
2722
        @Override
2723
        public void onInvalidated() {
2724
            dataSetChanged();
2725
        }
2726
    }
2727
2728
    /**
2729
     * Layout parameters that should be supplied for views added to a
2730
     * ViewPager.
2731
     */
2732
    public static class LayoutParams extends ViewGroup.LayoutParams {
2733
        /**
2734
         * true if this view is a decoration on the pager itself and not
2735
         * a view supplied by the adapter.
2736
         */
2737
        public boolean isDecor;
2738
2739
        /**
2740
         * Gravity setting for use on decor views only:
2741
         * Where to position the view page within the overall ViewPager
2742
         * container; constants are defined in {@link Gravity}.
2743
         */
2744
        public int gravity;
2745
2746
        /**
2747
         * Width as a 0-1 multiplier of the measured pager width
2748
         */
2749
        float heightFactor = 0.f;
2750
2751
        /**
2752
         * true if this view was added during layout and needs to be measured
2753
         * before being positioned.
2754
         */
2755
        boolean needsMeasure;
2756
2757
        /**
2758
         * Adapter position this view is for if !isDecor
2759
         */
2760
        int position;
2761
2762
        /**
2763
         * Current child index within the ViewPager that this view occupies
2764
         */
2765
        int childIndex;
2766
2767
        public LayoutParams() {
2768
            super(FILL_PARENT, FILL_PARENT);
2769
        }
2770
2771
        public LayoutParams(Context context, AttributeSet attrs) {
2772
            super(context, attrs);
2773
2774
            final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS);
2775
            gravity = a.getInteger(0, Gravity.TOP);
2776
            a.recycle();
2777
        }
2778
    }
2779
2780
    static class ViewPositionComparator implements Comparator<View> {
2781
        @Override
2782
        public int compare(View lhs, View rhs) {
2783
            final LayoutParams llp = (LayoutParams) lhs.getLayoutParams();
2784
            final LayoutParams rlp = (LayoutParams) rhs.getLayoutParams();
2785
            if (llp.isDecor != rlp.isDecor) {
2786
                return llp.isDecor ? 1 : -1;
2787
            }
2788
            return llp.position - rlp.position;
2789
        }
2790
    }
2791
}

+ 7 - 0
app/src/main/res/anim/bottom_in_anim.xml

@ -0,0 +1,7 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<set xmlns:android="http://schemas.android.com/apk/res/android">
3
    <translate
4
        android:duration="300"
5
        android:fromYDelta="100%p"
6
        android:toYDelta="0" />
7
</set>

+ 7 - 0
app/src/main/res/anim/bottom_out_anim.xml

@ -0,0 +1,7 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<set xmlns:android="http://schemas.android.com/apk/res/android">
3
    <translate
4
        android:duration="300"
5
        android:fromYDelta="0"
6
        android:toYDelta="100%p" />
7
</set>

app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/mima.png → app/src/main/res/drawable-xxhdpi/mima.png


app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/rentou.png → app/src/main/res/drawable-xxhdpi/rentou.png


app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/shanche.png → app/src/main/res/drawable-xxhdpi/shanche.png


app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/top.png → app/src/main/res/drawable-xxhdpi/top.png


app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/tubiao1.png → app/src/main/res/drawable-xxhdpi/tubiao1.png


app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/zhuangtailan.png → app/src/main/res/drawable-xxhdpi/zhuangtailan.png


app/src/main/res/drawable-xxhdpi/drawable-xxhdpi/zhucaozuolan.png → app/src/main/res/drawable-xxhdpi/zhucaozuolan.png


+ 12 - 0
app/src/main/res/drawable/bg_bottom_dialog.xml

@ -0,0 +1,12 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:shape="rectangle">
4
5
    <corners
6
        android:topLeftRadius="6dp"
7
        android:topRightRadius="6dp" />
8
9
    <solid android:color="#424242" />
10
11
12
</shape>

+ 10 - 0
app/src/main/res/drawable/bg_comment_report.xml

@ -0,0 +1,10 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:shape="rectangle">
4
5
    <corners android:radius="15dp" />
6
7
    <solid android:color="#606060" />
8
9
10
</shape>

+ 10 - 0
app/src/main/res/drawable/bg_topic.xml

@ -0,0 +1,10 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:shape="rectangle">
4
5
    <corners android:radius="6dp" />
6
7
    <solid android:color="#b3303030" />
8
9
10
</shape>

+ 48 - 0
app/src/main/res/layout/activity_videodetails.xml

@ -0,0 +1,48 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent"
5
    android:background="#424242">
6
7
8
    <com.electric.chargingpile.view.sview.VerticalViewPager
9
        android:id="@+id/pager_video"
10
        android:layout_width="match_parent"
11
        android:layout_height="match_parent" />
12
13
14
    <RelativeLayout
15
        android:layout_width="match_parent"
16
        android:layout_height="48dp">
17
18
19
        <TextView
20
            android:id="@+id/vd_title_tv"
21
            android:layout_width="wrap_content"
22
            android:layout_height="wrap_content"
23
            android:layout_centerInParent="true"
24
            android:text="待问答问题"
25
            android:textColor="#ffffff"
26
            android:textSize="18sp" />
27
28
29
        <ImageView
30
            android:id="@+id/vd_title_back"
31
            android:layout_width="wrap_content"
32
            android:layout_height="match_parent"
33
            android:layout_alignParentLeft="true"
34
            android:paddingLeft="15dp"
35
            android:paddingRight="15dp"
36
            android:src="@drawable/tubiao1" />
37
38
        <ImageView
39
            android:id="@+id/vd_title_dot"
40
            android:layout_width="wrap_content"
41
            android:layout_height="match_parent"
42
            android:layout_alignParentRight="true"
43
            android:paddingLeft="15dp"
44
            android:paddingRight="15dp"
45
            android:src="@drawable/tubiao1" />
46
47
    </RelativeLayout>
48
</RelativeLayout>

+ 11 - 0
app/src/main/res/layout/fragment_shortvideo.xml

@ -0,0 +1,11 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent">
5
6
    <com.electric.chargingpile.view.sview.VerticalViewPager
7
        android:id="@+id/pager_video"
8
        android:layout_width="match_parent"
9
        android:layout_height="match_parent" />
10
11
</android.support.constraint.ConstraintLayout>

+ 130 - 0
app/src/main/res/layout/item_show_comment.xml

@ -0,0 +1,130 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="wrap_content"
5
    android:layout_marginTop="20dp">
6
7
    <LinearLayout
8
        android:id="@+id/item_user_comment_like"
9
        android:layout_width="wrap_content"
10
        android:layout_height="18dp"
11
        android:layout_alignParentEnd="true"
12
        android:layout_marginTop="3dp"
13
        android:layout_marginEnd="19dp"
14
        android:gravity="center_vertical">
15
16
        <ImageView
17
            android:id="@+id/item_user_like_img"
18
            android:layout_width="18dp"
19
            android:layout_height="18dp"
20
            android:background="#fff" />
21
22
        <TextView
23
            android:id="@+id/item_user_like_count"
24
            android:layout_width="wrap_content"
25
            android:layout_height="wrap_content"
26
            android:layout_marginStart="4dp"
27
            android:text="1000"
28
            android:textColor="#888"
29
            android:textSize="12sp" />
30
    </LinearLayout>
31
32
33
    <ImageView
34
        android:id="@+id/item_user_avatar"
35
        android:layout_width="20dp"
36
        android:layout_height="20dp"
37
        android:layout_marginStart="15dp"
38
        android:layout_marginTop="6dp"
39
        android:background="#3df" />
40
41
42
    <TextView
43
        android:id="@+id/item_user_name"
44
        android:layout_width="wrap_content"
45
        android:layout_height="wrap_content"
46
        android:layout_marginStart="5dp"
47
        android:layout_toEndOf="@+id/item_user_avatar"
48
        android:text="12sp12sp12sp"
49
        android:textColor="#fff"
50
        android:textSize="12sp" />
51
52
    <TextView
53
        android:id="@+id/item_user_time"
54
        android:layout_width="wrap_content"
55
        android:layout_height="wrap_content"
56
        android:layout_below="@+id/item_user_name"
57
        android:layout_alignStart="@+id/item_user_name"
58
        android:layout_marginStart="5dp"
59
        android:text="12sp12sp12sp"
60
        android:textColor="#888"
61
        android:textSize="12sp" />
62
63
64
    <TextView
65
        android:id="@+id/item_user_con"
66
        android:layout_width="wrap_content"
67
        android:layout_height="wrap_content"
68
        android:layout_below="@+id/item_user_time"
69
        android:layout_alignStart="@+id/item_user_name"
70
        android:layout_marginStart="5dp"
71
        android:layout_marginTop="10dp"
72
        android:text="12sp12sp12sp"
73
        android:textColor="#fff"
74
        android:textSize="14sp" />
75
76
    <LinearLayout
77
        android:id="@+id/item_user_operation"
78
        android:layout_width="wrap_content"
79
        android:layout_height="22dp"
80
        android:layout_below="@+id/item_user_con"
81
        android:layout_alignStart="@+id/item_user_name"
82
        android:layout_marginTop="10dp"
83
        android:layout_marginBottom="22dp"
84
        android:gravity="center_vertical">
85
86
        <LinearLayout
87
            android:id="@+id/item_user_report_ll"
88
            android:layout_width="wrap_content"
89
            android:layout_height="match_parent"
90
            android:layout_marginEnd="10dp"
91
            android:background="@drawable/bg_comment_report"
92
            android:gravity="center_vertical">
93
94
            <ImageView
95
                android:layout_width="16dp"
96
                android:layout_height="16dp"
97
                android:layout_marginStart="9dp"
98
                android:background="#fff" />
99
100
            <TextView
101
                android:id="@+id/item_user_report_count"
102
                android:layout_width="wrap_content"
103
                android:layout_height="wrap_content"
104
                android:layout_marginStart="5dp"
105
                android:layout_marginEnd="9dp"
106
                android:text="1000回复"
107
                android:textColor="#c2c2c2"
108
                android:textSize="12sp" />
109
        </LinearLayout>
110
111
112
        <TextView
113
            android:id="@+id/item_user_delete"
114
            android:layout_width="wrap_content"
115
            android:layout_height="22dp"
116
            android:gravity="center"
117
            android:text="删除"
118
            android:textColor="#c2c2c2"
119
            android:textSize="12sp" />
120
    </LinearLayout>
121
122
    <View
123
        android:layout_width="match_parent"
124
        android:layout_height="1dp"
125
        android:layout_below="@+id/item_user_operation"
126
        android:layout_marginStart="16dp"
127
        android:background="#505050" />
128
129
130
</RelativeLayout>

+ 85 - 0
app/src/main/res/layout/sv_video_publish_info.xml

@ -0,0 +1,85 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="wrap_content"
5
    android:background="@drawable/bg_bottom_dialog">
6
7
8
    <View
9
        android:id="@+id/video_publish_close"
10
        android:layout_width="22dp"
11
        android:layout_height="22dp"
12
        android:layout_alignParentEnd="true"
13
        android:layout_marginTop="14dp"
14
        android:layout_marginEnd="14dp"
15
        android:background="#fff" />
16
17
18
    <LinearLayout
19
        android:id="@+id/video_publish_topic"
20
        android:layout_width="wrap_content"
21
        android:layout_height="wrap_content"
22
        android:layout_marginStart="15dp"
23
        android:layout_marginTop="15dp"
24
        android:layout_marginEnd="40dp"
25
        android:layout_marginBottom="10dp"
26
        android:background="@drawable/bg_topic"
27
        android:gravity="center_vertical"
28
        android:minHeight="30dp">
29
30
        <View
31
            android:layout_width="12dp"
32
            android:layout_height="12dp"
33
            android:layout_marginStart="12dp"
34
            android:layout_marginEnd="4dp"
35
            android:background="#fff" />
36
37
        <TextView
38
            android:id="@+id/video_publish_topic_con"
39
            android:layout_width="wrap_content"
40
            android:layout_height="wrap_content"
41
            android:layout_margin="5dp"
42
            android:text="显示出所有文字内容显示出所有文字内容显示出所有文字内容"
43
            android:textColor="#fff"
44
            android:textSize="11sp" />
45
    </LinearLayout>
46
47
    <LinearLayout
48
        android:id="@+id/video_publish_user_ll"
49
        android:layout_width="wrap_content"
50
        android:layout_height="20dp"
51
        android:layout_below="@+id/video_publish_topic"
52
        android:layout_marginStart="15dp"
53
        android:gravity="center_vertical"
54
        android:orientation="horizontal">
55
56
        <ImageView
57
            android:id="@+id/video_publish_user_avatar"
58
            android:layout_width="20dp"
59
            android:layout_height="20dp"
60
            android:background="#3df" />
61
62
        <TextView
63
            android:id="@+id/video_publish_user_name"
64
            android:layout_width="wrap_content"
65
            android:layout_height="wrap_content"
66
            android:layout_marginStart="6dp"
67
            android:text="12sp12sp12sp"
68
            android:textColor="#fff"
69
            android:textSize="12sp" />
70
    </LinearLayout>
71
72
    <TextView
73
        android:layout_width="match_parent"
74
        android:layout_height="wrap_content"
75
        android:layout_below="@+id/video_publish_user_ll"
76
        android:layout_marginStart="30dp"
77
        android:layout_marginTop="15dp"
78
        android:layout_marginEnd="30dp"
79
        android:layout_marginBottom="35dp"
80
        android:maxHeight="320dp"
81
        android:text="asfsfsfsfsfsafsafsfsfsaf"
82
        android:textColor="#fff"
83
        android:textSize="14sp" />
84
85
</RelativeLayout>

+ 204 - 0
app/src/main/res/layout/view_show_bottom.xml

@ -0,0 +1,204 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<merge xmlns:android="http://schemas.android.com/apk/res/android">
3
4
    <RelativeLayout
5
        android:id="@+id/sv_show_bottom"
6
        android:layout_width="match_parent"
7
        android:layout_height="50dp"
8
        android:layout_alignParentBottom="true">
9
10
        <LinearLayout
11
            android:id="@+id/sv_show_forward"
12
            android:layout_width="wrap_content"
13
            android:layout_height="30dp"
14
            android:layout_alignParentRight="true"
15
            android:layout_centerVertical="true"
16
            android:layout_marginRight="15dp"
17
            android:gravity="center_vertical">
18
19
            <ImageView
20
                android:layout_width="30dp"
21
                android:layout_height="30dp"
22
                android:layout_centerVertical="true"
23
                android:background="#fff" />
24
25
            <TextView
26
                android:layout_width="wrap_content"
27
                android:layout_height="wrap_content"
28
                android:text="转发"
29
                android:textSize="12sp" />
30
31
        </LinearLayout>
32
33
        <LinearLayout
34
            android:id="@+id/sv_show_comment_count_ll"
35
            android:layout_width="wrap_content"
36
            android:layout_height="30dp"
37
            android:layout_centerVertical="true"
38
            android:layout_marginRight="15dp"
39
            android:layout_toStartOf="@+id/sv_show_forward"
40
            android:gravity="center_vertical">
41
42
            <ImageView
43
                android:layout_width="30dp"
44
                android:layout_height="30dp"
45
                android:layout_centerVertical="true"
46
                android:background="#fff" />
47
48
            <TextView
49
                android:id="@+id/sv_show_comment_count_tv"
50
                android:layout_width="wrap_content"
51
                android:layout_height="wrap_content"
52
                android:text="1230w"
53
                android:textSize="12sp" />
54
55
        </LinearLayout>
56
57
        <LinearLayout
58
            android:id="@+id/sv_show_like_ll"
59
            android:layout_width="wrap_content"
60
            android:layout_height="30dp"
61
            android:layout_centerVertical="true"
62
            android:layout_marginRight="15dp"
63
            android:layout_toStartOf="@+id/sv_show_comment_count_ll"
64
            android:gravity="center_vertical">
65
66
            <ImageView
67
                android:id="@+id/sv_show_like_img"
68
                android:layout_width="30dp"
69
                android:layout_height="30dp"
70
                android:layout_centerVertical="true"
71
                android:background="#fff" />
72
73
            <TextView
74
                android:id="@+id/sv_show_like_tv"
75
                android:layout_width="wrap_content"
76
                android:layout_height="wrap_content"
77
                android:text="12我30w"
78
                android:textSize="12sp" />
79
80
        </LinearLayout>
81
82
        <LinearLayout
83
            android:id="@+id/sv_show_comment_ll"
84
            android:layout_width="match_parent"
85
            android:layout_height="match_parent"
86
            android:layout_centerVertical="true"
87
            android:layout_marginRight="15dp"
88
            android:layout_toStartOf="@+id/sv_show_like_ll"
89
            android:gravity="center_vertical">
90
91
            <ImageView
92
                android:layout_width="30dp"
93
                android:layout_height="30dp"
94
                android:layout_centerVertical="true"
95
                android:layout_marginLeft="15dp"
96
                android:background="#fff" />
97
98
            <TextView
99
                android:layout_width="wrap_content"
100
                android:layout_height="wrap_content"
101
                android:text="写评论"
102
                android:textSize="12sp" />
103
104
        </LinearLayout>
105
106
    </RelativeLayout>
107
108
    <View
109
        android:layout_width="match_parent"
110
        android:layout_height="1dp"
111
        android:layout_above="@+id/sv_show_bottom"
112
        android:background="#505050" />
113
114
    <TextView
115
        android:id="@+id/sv_show_tvcon"
116
        android:layout_width="match_parent"
117
        android:layout_height="wrap_content"
118
        android:layout_above="@+id/sv_show_bottom"
119
        android:layout_marginLeft="39dp"
120
        android:layout_marginRight="39dp"
121
        android:layout_marginBottom="23dp"
122
        android:ellipsize="end"
123
        android:maxLines="3"
124
        android:text="3-超出三行的,点击文字,上滑弹窗,显示出所有文字内容,根据内容自适应高度,最高为一半屏幕高度,字数超高,以滚动条滑动显示。3-超出三行的,点击文字,上滑弹窗,显示出所有文字内容,根据内容自适应高度,最高为一半屏幕高度,字数超高,以滚动条滑动显示。"
125
        android:textSize="14sp" />
126
127
    <View
128
        android:id="@+id/sv_show_tvcon_more"
129
        android:layout_width="30dp"
130
        android:layout_height="30dp"
131
        android:layout_above="@+id/sv_show_bottom"
132
        android:layout_alignParentEnd="true"
133
        android:layout_marginBottom="28dp"
134
        android:background="@color/__picker_black_40" />
135
136
    <RelativeLayout
137
        android:id="@+id/sv_show_user_info"
138
        android:layout_width="wrap_content"
139
        android:layout_height="34dp"
140
        android:layout_above="@+id/sv_show_tvcon"
141
        android:layout_marginLeft="15dp"
142
        android:layout_marginBottom="5dp"
143
        android:background="#2ff">
144
145
        <ImageView
146
            android:id="@+id/sv_show_user_avatar"
147
            android:layout_width="20dp"
148
            android:layout_height="20dp"
149
            android:layout_centerVertical="true"
150
            android:background="#fff" />
151
152
        <TextView
153
            android:id="@+id/sv_show_user_name"
154
            android:layout_width="wrap_content"
155
            android:layout_height="wrap_content"
156
            android:layout_marginLeft="5dp"
157
            android:layout_toEndOf="@+id/sv_show_user_avatar"
158
            android:text="adsdasasdad"
159
            android:textColor="#fff"
160
            android:textSize="12sp" />
161
162
        <TextView
163
            android:id="@+id/sv_show_user_time"
164
            android:layout_width="wrap_content"
165
            android:layout_height="wrap_content"
166
            android:layout_below="@+id/sv_show_user_name"
167
            android:layout_alignLeft="@+id/sv_show_user_name"
168
            android:text="adsdasasdad"
169
            android:textColor="#fff"
170
            android:textSize="12sp" />
171
    </RelativeLayout>
172
173
174
    <LinearLayout
175
        android:id="@+id/sv_show_topic"
176
        android:layout_width="wrap_content"
177
        android:layout_height="30dp"
178
        android:layout_above="@+id/sv_show_user_info"
179
        android:layout_marginStart="15dp"
180
        android:layout_marginEnd="15dp"
181
        android:layout_marginBottom="10dp"
182
        android:background="#b3303030"
183
        android:gravity="center_vertical">
184
185
        <View
186
            android:layout_width="12dp"
187
            android:layout_height="12dp"
188
            android:layout_marginStart="12dp"
189
            android:layout_marginEnd="4dp"
190
            android:background="#fff" />
191
192
        <TextView
193
            android:id="@+id/sv_show_topic_con"
194
            android:layout_width="wrap_content"
195
            android:layout_height="wrap_content"
196
            android:layout_marginRight="12dp"
197
            android:ellipsize="end"
198
            android:maxLines="1"
199
            android:text="显示出所有文字内容显示出所有文字内容显示出所有文字内容显示出所有文字内容显示出所有文字内容显示出所有文字内容显示出所有文字内容"
200
            android:textColor="#fff"
201
            android:textSize="11sp" />
202
    </LinearLayout>
203
204
</merge>

+ 74 - 0
app/src/main/res/layout/view_show_comment.xml

@ -0,0 +1,74 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="wrap_content"
5
    android:background="@drawable/bg_bottom_dialog">
6
7
    <TextView
8
        android:id="@+id/show_comment_title"
9
        android:layout_width="wrap_content"
10
        android:layout_height="wrap_content"
11
        android:layout_centerHorizontal="true"
12
        android:layout_marginTop="10dp"
13
        android:text="12sp12sp12sp"
14
        android:textColor="#c2c2c2"
15
        android:textSize="14sp" />
16
17
18
    <View
19
        android:id="@+id/show_comment_close"
20
        android:layout_width="22dp"
21
        android:layout_height="22dp"
22
        android:layout_alignParentEnd="true"
23
        android:layout_marginTop="9dp"
24
        android:layout_marginEnd="14dp"
25
        android:background="#fff" />
26
27
    <View
28
        android:layout_width="match_parent"
29
        android:layout_height="1dp"
30
        android:layout_marginTop="40dp"
31
        android:background="#505050" />
32
33
    <android.support.v7.widget.RecyclerView
34
        android:id="@+id/show_comment_lv"
35
        android:layout_width="wrap_content"
36
        android:layout_height="320dp"
37
        android:layout_marginBottom="54dp"
38
        android:layout_marginTop="40dp" />
39
40
    <LinearLayout
41
        android:layout_width="match_parent"
42
        android:layout_height="wrap_content"
43
        android:layout_below="@+id/show_comment_lv"
44
        android:background="#535353"
45
        android:layout_marginTop="-54dp"
46
        android:gravity="center_vertical"
47
        android:minHeight="54dp">
48
49
        <EditText
50
            android:id="@+id/show_comment_ed"
51
            android:layout_width="0dp"
52
            android:layout_height="wrap_content"
53
            android:layout_marginStart="14dp"
54
            android:layout_weight="1"
55
            android:background="@drawable/bg_comment_report"
56
            android:hint="写评论"
57
            android:minHeight="30dp"
58
            android:paddingStart="14dp"
59
            android:paddingEnd="14dp"
60
            android:textColorHint="#7e7e7e" />
61
62
        <TextView
63
            android:id="@+id/show_comment_publish"
64
            android:layout_width="wrap_content"
65
            android:layout_height="match_parent"
66
            android:gravity="center"
67
            android:paddingStart="13dp"
68
            android:paddingEnd="13dp"
69
            android:text="发布"
70
            android:textColor="#7e7e7e"
71
            android:textSize="14sp" />
72
    </LinearLayout>
73
74
</RelativeLayout>

+ 13 - 0
app/src/main/res/layout/view_show_view.xml

@ -0,0 +1,13 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent">
5
6
    <ImageView
7
        android:layout_width="match_parent"
8
        android:layout_height="match_parent"
9
        android:background="#fff0" />
10
11
    <include layout="@layout/view_show_bottom" />
12
13
</RelativeLayout>

+ 15 - 0
app/src/main/res/layout/view_show_zoom.xml

@ -0,0 +1,15 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent">
5
6
7
    <com.electric.chargingpile.widge.photoview.ZoomingViewpager
8
        android:id="@+id/view_show_zoomingphoto"
9
        android:layout_width="match_parent"
10
        android:layout_height="match_parent" />
11
12
13
    <include layout="@layout/view_show_bottom" />
14
15
</RelativeLayout>

+ 2 - 0
app/src/main/res/values/color.xml

@ -170,6 +170,8 @@
170 170
    <color name="color_888888">#888888</color>
171 171
    <color name="color_fb9349">#fb9349</color>
172 172

173
    <color name="sv_black">#FF000000</color>
174
    <color name="sv_white">#FFFFFF</color>
173 175

174 176

175 177


+ 12 - 0
app/src/main/res/values/strings.xml

@ -192,4 +192,16 @@
192 192
193 193
    <string name="refund_tip">退款说明:\n1、可退款金额为实际充值金额,不含充值赠送、添加站点赠送和活动赠送金额。申请退款时,赠送金额将清零,请慎重选择;\n2、退款过程中,账户将被冻结,无法充值,使用支付宝免密支付充电不受影响;\n3、微信充值订单6个月内,支付宝充值订单3个月内将原路返回,超出时间我们将联系您取得新的退款方式;\n4、退款将于3-7个工作日内完成,请耐心等待。</string>
194 194
195
196
    <string name="refresh_pull_to_refresh">Slide down to refresh</string>
197
    <string name="refresh_release_to_refresh">Release to refresh</string>
198
    <string name="refresh_refreshing">Refreshing...</string>
199
    <string name="refresh_succeed">Refreshed</string>
200
    <string name="refresh_fail">Refreshing failed</string>
201
    <string name="refresh_pullup_to_load">Slide up to upload more</string>
202
    <string name="refresh_release_to_load">Release to upload</string>
203
    <string name="refresh_loading">Loading...</string>
204
    <string name="refresh_load_succeed">Loading succeeded</string>
205
    <string name="refresh_load_succeed_nomore">That\'s All!</string>
206
    <string name="refresh_load_fail">Loading failed</string>
195 207
</resources>

+ 30 - 9
app/src/main/res/values/styles.xml

@ -1,4 +1,5 @@
1 1
<resources>
2

2 3
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
3 4
        <item name="colorPrimary">@color/colorPrimary</item>
4 5
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@ -55,18 +56,18 @@
55 56
    <style name="Widget.ProgressBar.RegularProgressBar">
56 57
        <item name="android:indeterminateOnly">false</item>
57 58
        <item name="android:progressDrawable">@drawable/progressbar</item>
58
        <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
59
        <item name="android:indeterminateDrawable">
60
            @android:drawable/progress_indeterminate_horizontal
61
        </item>
59 62
        <item name="android:minHeight">1dip</item>
60 63
        <item name="android:maxHeight">10dip</item>
61 64
    </style>
62 65

63 66

64
        <!--<style name="MyRatingBar" parent="@android:style/Widget.RatingBar">-->
65
            <!--<item name="android:progressDrawable">@drawable/circle_rating_bar_full</item>-->
66

67
        <!--</style>-->
68

67
    <!--<style name="MyRatingBar" parent="@android:style/Widget.RatingBar">-->
68
    <!--<item name="android:progressDrawable">@drawable/circle_rating_bar_full</item>-->
69 69

70
    <!--</style>-->
70 71

71 72

72 73
    <style name="roomRatingBar" parent="@android:style/Widget.RatingBar">
@ -82,8 +83,6 @@
82 83
    </style>
83 84

84 85

85

86

87 86
    <style name="appointent_time_item_style">
88 87
        <item name="android:textColor">@drawable/appointent_item_tv_color_selector</item>
89 88
        <item name="android:layout_width">fill_parent</item>
@ -191,16 +190,19 @@
191 190
        <item name="android:windowBackground">@android:color/transparent</item>
192 191
        <item name="android:windowContentOverlay">@null</item>
193 192
    </style>
194
    <style name="dialogAnim" parent="android:Animation" >
193

194
    <style name="dialogAnim" parent="android:Animation">
195 195
        <item name="android:windowEnterAnimation">@anim/dialog_show</item>
196 196
        <item name="android:windowExitAnimation">@anim/dialog_dismiss</item>
197 197
    </style>
198

198 199
    <style name="divider_horizontal"><!-- 水平分割线 -->
199 200
        <item name="android:layout_width">fill_parent</item>
200 201
        <item name="android:layout_height">0.01dp</item>
201 202
        <item name="android:background">@android:color/darker_gray</item>
202 203
        <item name="android:orientation">vertical</item>
203 204
    </style>
205

204 206
    <style name="divider_vertical"><!-- 垂直分割线 -->
205 207
        <item name="android:layout_width">0.01dp</item>
206 208
        <item name="android:layout_height">fill_parent</item>
@ -220,6 +222,25 @@
220 222
        <item name="android:windowCloseOnTouchOutside">false</item>
221 223
    </style>
222 224

225

226
    <style name="bottomDialogStyle">
227
        <item name="android:windowBackground">@android:color/transparent</item>
228
        <item name="android:windowContentOverlay">@null</item>
229
        <item name="android:windowIsFloating">true</item>
230
        <item name="android:windowFrame">@null</item>
231
        <item name="android:backgroundDimEnabled">false</item>
232
        <item name="android:windowNoTitle">true</item>
233
        <item name="android:windowIsTranslucent">true</item>
234
        <item name="android:windowCloseOnTouchOutside">true</item>
235
        <item name="android:windowAnimationStyle">@style/BottomDialogAnimation</item>
236
    </style>
237

238
    <style name="BottomDialogAnimation">
239
        <item name="android:windowEnterAnimation">@anim/bottom_in_anim</item>
240
        <item name="android:windowExitAnimation">@anim/bottom_out_anim</item>
241
    </style>
242

243

223 244
    <style name="AnimationPreview">
224 245
        <item name="android:windowEnterAnimation">@anim/fade_in</item>
225 246
        <item name="android:windowExitAnimation">@anim/fade_out</item>

cdzApp - Gogs: Go Git Service

充电桩app代码

huyuguo 319397b60f 配置信息优化 5 anni fa
..
src b98aa2e34f 代码修改 5 anni fa
.gitignore e1cf244fe0 remove Useless dependence 7 anni fa
build.gradle 319397b60f 配置信息优化 5 anni fa
proguard-rules.pro e1cf244fe0 remove Useless dependence 7 anni fa