Skip to content

Commit

Permalink
1.0.2 : UI changes; drop Chinese app name '千寻记事本' and use 'DereHelper…
Browse files Browse the repository at this point in the history
…' for all languages
  • Loading branch information
wxwang committed Mar 23, 2018
1 parent 161689d commit eef34ec
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 93 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DereHelper

非官方CGSS安卓工具APP,中文名暂定为千寻记事本</br>
本项目为偶像大师灰姑娘手游的安卓端非官方工具APP</br>

Helper Android APP for THE iDOLM@STER Cinderella Girls: Starlight Stage(デレステ). All the data is from API provided by other sites and has nothing to do with the official application.

Expand All @@ -9,6 +9,9 @@ Helper Android APP for THE iDOLM@STER Cinderella Girls: Starlight Stage(デレ
* **Card and Character(English)** https://starlight.kirara.ca
* **Image** https://truecolor.kirara.ca

## Building
* Require Android Studio 2.3 (Will move to 3.0 later...)
* Comment the signingConfigs & google services(analytics) in gradle files(\DereHelper\app\build.gradle), because the related files are private.

## Screenshot

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/lazyeraser/imas/cgss/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,13 @@ public static boolean igCaseContain(String s1, String s2){
return s2.toLowerCase().contains(s1.toLowerCase());
}

public static String getVoice(long object_id, long use, long index) {
long a = (object_id << 40) | ((use & 0xFF) << 24) | ((index & 0xFF) << 16) | 0x11AB;

a &= 0xFFFFFFFFFFFFFFFFL;
a ^= 0x1042FC1040200700L;
String basename = Long.toHexString(a).substring(1);

return String.format("va2/%s.mp3", basename);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private void initDialog(){
.setCancelClickListener(dialog ->{
dialog.dismiss();
mainViewModel.haveUpdate.set(false);
Messenger.getDefault().sendNoMsg(TOKEN_DATA_UPDATED);
// Messenger.getDefault().sendNoMsg(TOKEN_DATA_UPDATED);
})
.setConfirmClickListener(alertDialog -> {
alertDialog.dismiss();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public class CardListViewModel extends BaseViewModel {

public CardListViewModel(BaseActivity context) {
super(context);

if (!umi.getSP(SharedHelper.KEY_AUTO_DATA)){
loadData();
/*if (!umi.getSP(SharedHelper.KEY_AUTO_DATA)){
loadData();
}
}*/
cardDataList.addOnPropertyChangedCallback(new android.databinding.Observable.OnPropertyChangedCallback() {
@Override
public void onPropertyChanged(android.databinding.Observable sender, int propertyId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.databinding.ObservableFloat;
import android.support.v4.util.Pair;
import android.text.TextUtils;
import android.widget.Toast;

import com.lazyeraser.imas.cgss.entity.Card;
import com.lazyeraser.imas.cgss.entity.CardIndex;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable-v21/selector_white.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@android:color/darker_gray">
<item android:id="@android:id/mask" android:drawable="@color/light_gray"/>
<item android:id="@android:id/mask" android:drawable="@color/white"/>
<!--<item android:bottom="1px">
<shape>
<solid android:color="@android:color/white"/>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout-v21/umi_actionbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
android:id="@+id/actionBar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/actionBar_btn_start_img"
android:layout_marginStart="8dp"
android:textSize="@dimen/base_text_size"
android:textColor="@color/white"/>

Expand Down
158 changes: 85 additions & 73 deletions app/src/main/res/layout/item_list_card.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
android:layout_height="70dp"
android:background="@drawable/selector_white">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="8dp"
android:textSize="32sp"
android:textColor="#30666666"
android:text="@{viewModel.cardRare}"/>
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_alignParentEnd="true"-->
<!--android:layout_alignParentBottom="true"-->
<!--android:layout_marginEnd="8dp"-->
<!--android:textSize="32sp"-->
<!--android:textColor="#30666666"-->
<!--android:text="@{viewModel.cardRare}"/>-->

<ImageView
android:id="@+id/card_icon"
Expand All @@ -35,30 +35,33 @@
android:layout_centerVertical="true"
android:layout_alignParentStart="true" />

<TextView
android:id="@+id/item_txt"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="chara name"
android:layout_toEndOf="@+id/card_icon"
android:layout_alignTop="@id/card_icon"
android:layout_marginTop="4dp"
android:layout_marginStart="8dp"
android:textSize="@dimen/txt_2"
android:textColor="@color/txtBlack"
android:text="@{viewModel.card.getName_only()}"/>
android:layout_centerVertical="true">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="card title"
android:layout_toEndOf="@+id/card_icon"
android:layout_alignBottom="@id/card_icon"
android:layout_marginBottom="4dp"
android:layout_marginStart="8dp"
android:textSize="@dimen/txt_2"
android:textColor="@color/txtGray"
android:text="@{viewModel.cardTitle}"/>
<TextView
android:id="@+id/chara_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="chara name"
android:textSize="16dp"
android:textColor="@color/txtBlack"
android:text="@{viewModel.card.getName_only()}"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/chara_name"
android:layout_marginTop="8dp"
android:hint="card title"
android:textSize="@dimen/txt_1"
android:textColor="@color/txtGrayL"
android:text="@{viewModel.cardTitle}"/>

</RelativeLayout>

<!-- <LinearLayout
android:id="@+id/status_tag"
Expand Down Expand Up @@ -101,58 +104,67 @@
</LinearLayout>-->

<LinearLayout
android:id="@+id/status_values"
android:layout_width="200dp"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:orientation="horizontal">
android:layout_centerVertical="true">

<TextView
android:layout_width="0dp"
<LinearLayout
android:id="@+id/status_values"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getVisual_max() + viewModel.card.getBonus_visual())}"
android:textColor="@color/txt_vi"
android:textAlignment="center"
android:layout_weight="1"/>
android:layout_alignParentEnd="true"
android:orientation="horizontal"
android:layout_marginEnd="0dp">

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getVisual_max() + viewModel.card.getBonus_visual())}"
android:textColor="@color/txt_vi"
android:textAlignment="center"
android:layout_weight="1"/>

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getVocal_max() + viewModel.card.getBonus_vocal())}"
android:textColor="@color/txt_vo"
android:textAlignment="center"
android:layout_weight="1"/>

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getDance_max() + viewModel.card.getBonus_dance())}"
android:textColor="@color/txt_da"
android:textAlignment="center"
android:layout_weight="1"/>

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getOverall_max() + viewModel.card.getOverall_bonus())}"
android:textColor="@color/txt_all"
android:textAlignment="center"
android:layout_weight="1"/>

</LinearLayout>

<TextView
android:layout_width="0dp"
android:layout_below="@+id/status_values"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getVocal_max() + viewModel.card.getBonus_vocal())}"
android:textColor="@color/txt_vo"
android:textAlignment="center"
android:layout_weight="1"/>

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getDance_max() + viewModel.card.getBonus_dance())}"
android:textColor="@color/txt_da"
android:textAlignment="center"
android:layout_weight="1"/>

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(viewModel.card.getOverall_max() + viewModel.card.getOverall_bonus())}"
android:textColor="@color/txt_all"
android:textAlignment="center"
android:layout_weight="1"/>

</LinearLayout>

<TextView
android:layout_below="@+id/status_values"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/txtGray"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@+id/item_txt"
android:gravity="end"
android:ellipsize="start"
android:layout_marginEnd="6dp"
android:text="@{viewModel.skill}"/>
android:textColor="@color/txtGrayL"
android:layout_alignParentEnd="true"
android:gravity="end"
android:ellipsize="start"
android:layout_marginEnd="16dp"
android:textSize="@dimen/txt_1"
android:text="@{viewModel.skill}"/>

</RelativeLayout>

<View
android:layout_marginStart="-4dp"
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/layout/umi_actionbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
android:id="@+id/actionBar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="@dimen/base_text_size"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/actionBar_btn_start_img"
android:layout_marginStart="8dp"
android:textSize="18sp"
android:textColor="@color/white"/>

<ImageView
Expand All @@ -41,7 +43,7 @@
android:id="@+id/actionBar_txtBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/base_text_size_large"
android:textSize="@dimen/base_text_size_medium"
android:textColor="@color/white"
android:layout_marginEnd="16dp"
android:layout_alignParentEnd="true"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">DereHelper</string><!--ちひろのメモ帳-->
<!--<string name="app_name">DereHelper</string>&lt;!&ndash;ちひろのメモ帳&ndash;&gt;-->
<string name="other">その他</string>
<string name="empty">なし</string>
<string name="skill_empty">特技なし</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<item name="android:windowAllowEnterTransitionOverlap">false</item>
<item name="android:windowAllowReturnTransitionOverlap">false</item>
<item name="android:actionBarStyle">@style/Umi.CustomActionBarStyle</item>
<item name="android:actionBarSize">40dp</item>
<item name="android:actionBarSize">48dp</item>
<item name="colorPrimary">@color/colorPrimary</item>
<!-- AppCompatEditText默认状态状态设置底线颜色 -->
<item name="colorControlNormal">@color/gray</item>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">千寻记事本</string>
<!--<string name="app_name">千寻记事本</string>-->
<string name="other">其他</string>
<string name="empty">无</string>
<string name="skill_empty">无技能</string>
Expand Down Expand Up @@ -97,7 +97,7 @@
<string name="settings_auto_data">自动检查数据更新</string>
<string name="settings_auto_app">自动检查APP更新</string>
<string name="settings_default_tran">默认开启翻译</string>
<string name="permission_denied_hint">Producer,请授予千寻权限以正常下载自动更新哦</string>
<string name="permission_denied_hint">Producer,请授予APP权限以正常下载自动更新哦</string>


<!--0.9.6-->
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">千尋記事本</string>
<!--<string name="app_name">千尋記事本</string>-->
<string name="other">其他</string>
<string name="empty">無</string>
<string name="skill_empty">無技能</string>
Expand Down Expand Up @@ -97,7 +97,7 @@
<string name="settings_auto_data">自動檢查數據更新</string>
<string name="settings_auto_app">自動檢查APP更新</string>
<string name="settings_default_tran">默認開啟翻譯</string>
<string name="permission_denied_hint">Producer,請授予千尋權限以正常下載自動更新哦</string>
<string name="permission_denied_hint">Producer,請授予APP權限以正常下載自動更新哦</string>


<!--0.9.6-->
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">千尋記事本</string>
<!--<string name="app_name">千尋記事本</string>-->
<string name="other">其他</string>
<string name="empty">無</string>
<string name="skill_empty">無技能</string>
Expand Down Expand Up @@ -97,7 +97,7 @@
<string name="settings_auto_data">自動檢查數據更新</string>
<string name="settings_auto_app">自動檢查APP更新</string>
<string name="settings_default_tran">默認開啟翻譯</string>
<string name="permission_denied_hint">Producer,請授予千尋權限以正常下載自動更新哦</string>
<string name="permission_denied_hint">Producer,請授予APP權限以正常下載自動更新哦</string>


<!--0.9.6-->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<dimen name="base_text_size">16sp</dimen>
<dimen name="base_text_size_medium">14sp</dimen>
<dimen name="base_text_size_large">15sp</dimen>
<dimen name="base_text_size_large">20sp</dimen>

<dimen name="card_view_margin">0dp</dimen>
<dimen name="status_bar_padding">0dp</dimen>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<style name="Umi.ActionBarTheme.White" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/Umi.CustomActionBarStyle</item>
<item name="actionBarSize">40dp</item>
<item name="actionBarSize">56dp</item>
<item name="colorPrimary">@color/colorPrimary</item>
<!-- AppCompatEditText默认状态状态设置底线颜色 -->
<item name="colorControlNormal">@color/gray</item>
Expand Down

0 comments on commit eef34ec

Please sign in to comment.